kernel - implement serialno for kqueue poll handling part 1/2
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 9 Jul 2010 04:46:52 +0000 (21:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 9 Jul 2010 04:46:52 +0000 (21:46 -0700)
commitfe24d605c5ed729a65d5866e8b0622aaff1a13d6
treeec90f18a6da99005ff172e3e460ce612605677b7
parent2af7d4655ae615c261334ffc4dd79a6b7582d6c5
kernel - implement serialno for kqueue poll handling part 1/2

* The kqueue implementation for the poll system call was improperly
  triggering on spurious events.

* Adjust the poll support code to implement a serial number scheme
  similar to how the select code works.  The poll array index is also
  encoded.

* poll() handles unsupported POLLPRI and POLLRDBAND requests differently
  from select().  poll() ignores these requests if they are not supported
  (select returns an error).

  Allow kqfilter functions to return EPERM or EOPNOTSUPP to indicate
  an unsupported filter.  Return values will be fixed in part 2.
sys/kern/kern_event.c
sys/kern/sys_generic.c
sys/kern/sys_pipe.c