Lines Matching refs:nbytes

288 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes);
289 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes);
290 static ssize_t ep0_consume(struct thread *t, const void *buf, size_t nbytes);
291 static ssize_t fill_in_buf(struct thread *t, void *buf, size_t nbytes);
292 static ssize_t empty_out_buf(struct thread *t, const void *buf, size_t nbytes);
435 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes) in read_wrap() argument
437 return read(t->fd, buf, nbytes); in read_wrap()
440 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes) in write_wrap() argument
442 return write(t->fd, buf, nbytes); in write_wrap()
453 fill_in_buf(struct thread *ignore, void *buf, size_t nbytes) in fill_in_buf() argument
462 memset(buf, 0, nbytes); in fill_in_buf()
466 for (p = buf, i = 0; i < nbytes; ++i, ++p) in fill_in_buf()
471 return fread(buf, 1, nbytes, stdin); in fill_in_buf()
474 return nbytes; in fill_in_buf()
478 empty_out_buf(struct thread *ignore, const void *buf, size_t nbytes) in empty_out_buf() argument
490 for (p = buf, len = 0; len < nbytes; ++p, ++len) in empty_out_buf()
496 for (p = buf, len = 0; len < nbytes; ++p, ++len) in empty_out_buf()
504 ret = fwrite(buf, nbytes, 1, stdout); in empty_out_buf()
512 for (p = buf, len = 0; len < nbytes; ++p, ++len) { in empty_out_buf()
540 ep0_consume(struct thread *ignore, const void *buf, size_t nbytes) in ep0_consume() argument
557 for (n = nbytes / sizeof *event; n; --n, ++event) in ep0_consume()
575 return nbytes; in ep0_consume()