kernel - kqueue select support
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 23 Jun 2010 04:59:29 +0000 (21:59 -0700)
committerSamuel J. Greear <sjg@thesjg.com>
Wed, 30 Jun 2010 00:31:45 +0000 (00:31 +0000)
commit8acdf1cfa6e56d6bf85dba89692dd5d2f6078d3a
treecbdde2f86b3c46b3efba3e70a437517f9db2d16c
parent6dcd6ba9b263d4c9414f431ec3c90dc70616aeb2
kernel - kqueue select support

* Fix bug in kevent timeout handling.  Only go to non-blocking once
  (*res) is non-zero.

* Use stack-declared kfd_set structures for select operations on
  64 or fewer descriptors.

* Refactor the select_copyin() loop.

* Fix bug in serial number decoding in the select_copyout() loop.

* Do not use EV_CLEAR, this can cause temporary EOF conditions to
  reset improperly.  Do not use EV_ONESHOT either.  Leave the event
  in the kqueue, it will speed things up when select() is called in
  a loop (the events will already exist).

* Implement ptckqfilter ... implement kqfilter functions for pty's and
  ptc's instead of using the tty kqfilter functions which do not work
  properly for ptc control terminals.

* Change getbits/putbits from macros to inline functions.
sys/kern/kern_event.c
sys/kern/sys_generic.c
sys/kern/tty_pty.c