Lines Matching defs:nbytes
336 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes);
337 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes);
338 static ssize_t ep0_consume(struct thread *t, const void *buf, size_t nbytes);
339 static ssize_t fill_in_buf(struct thread *t, void *buf, size_t nbytes);
340 static ssize_t empty_out_buf(struct thread *t, const void *buf, size_t nbytes);
483 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes)
485 return read(t->fd, buf, nbytes);
488 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes)
490 return write(t->fd, buf, nbytes);
501 fill_in_buf(struct thread *ignore, void *buf, size_t nbytes)
510 memset(buf, 0, nbytes);
514 for (p = buf, i = 0; i < nbytes; ++i, ++p)
519 return fread(buf, 1, nbytes, stdin);
522 return nbytes;
526 empty_out_buf(struct thread *ignore, const void *buf, size_t nbytes)
538 for (p = buf, len = 0; len < nbytes; ++p, ++len)
544 for (p = buf, len = 0; len < nbytes; ++p, ++len)
552 ret = fwrite(buf, nbytes, 1, stdout);
560 for (p = buf, len = 0; len < nbytes; ++p, ++len) {
588 ep0_consume(struct thread *ignore, const void *buf, size_t nbytes)
605 for (n = nbytes / sizeof *event; n; --n, ++event)
623 return nbytes;