summaryrefslogtreecommitdiffstats
path: root/usr.bin/sendbug/sendbug.c
diff options
context:
space:
mode:
authorjakemsr <jakemsr@openbsd.org>2007-07-31 03:34:13 +0000
committerjakemsr <jakemsr@openbsd.org>2007-07-31 03:34:13 +0000
commit4da17a026e10dca05709fb3bb07aa836129d02c7 (patch)
tree2c21979e02c41b51892295d9fa8dcbbb70b75c72 /usr.bin/sendbug/sendbug.c
parentpass command line options to audiotest_rw through OPTS, e.g. (diff)
downloadwireguard-openbsd-4da17a026e10dca05709fb3bb07aa836129d02c7.tar.xz
wireguard-openbsd-4da17a026e10dca05709fb3bb07aa836129d02c7.zip
set the blocksize to the size of the read/write buffers.
the blocksize matters for the poll() cases because we pass the poll when reading from the device when there is any data in the record buffer. since data is transfered into the buffer in blocksize chunks, if there was no and now is some data in the buffer, there is probably about blocksize bytes of data in the buffer. if in non-blocking mode, which is common when using poll(), and we try to read() more bytes than are in the record buffer, we will receive an EAGAIN. if we read() in blocksize chunks, we will never try to read more than is available. a more eloquent version of the above description should be in audio(4).
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
0 files changed, 0 insertions, 0 deletions