kernel - kqueue - Bug fixing pass
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 26 Jun 2010 21:02:36 +0000 (14:02 -0700)
committerSamuel J. Greear <sjg@thesjg.com>
Wed, 30 Jun 2010 00:31:46 +0000 (00:31 +0000)
commit679058fbe81291592277c174e94476a721d3e049
tree4b798e614967390edfc0cec1d4a4f775709d956c
parent7fbfbe29dd9bbc67bab3988a5a1f684c1e3bfd3e
kernel - kqueue - Bug fixing pass

* We cannot terminate the loop when events are received if all the
  events are spurious (none were collected by the copyout).

* Move the WOULDBLOCK -> 0 handling out of kqueue_scan() and into
  kern_kevent().

* Preset (*errorp) to 0 so it is set definitively for all cases, including
  degenerate cases.

* Allow an infinite number of events when doselect() calls kern_kevent()
  to avoid premature termination on successive calls which could occur
  due to spurious events.

* Fix a bug in dopoll() where the bytes variable was calculated prior to
  the truncation of nfds.

* Fix copyin/copyout arguments.

* Add missing rel_mplock() in pipe_kqfilter()
sys/kern/kern_event.c
sys/kern/sys_generic.c
sys/kern/sys_pipe.c