kevent: Restore old EV_EOF semantics
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 23 Sep 2011 06:23:53 +0000 (14:23 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 23 Sep 2011 06:23:53 +0000 (14:23 +0800)
commit3bcb6e5e80cb05cecaddd866d4b15b428334b9aa
tree6e9a4e442f3375c528972ccd8dc3a126795c5ac9
parent23a031e34d5e83e747ad3907f5e72c1175f7ad94
kevent: Restore old EV_EOF semantics

- EV_EOF should be set when the other side closed the connection, even
  if there are data pending in the read buffer (the old semantics).
- EV_NODATA is added to indicate there are no more data pending in the
  buffer and EOF is detected (EV_EOF is also set in this situation).

Kernel code now tests EV_NODATA instead of EV_EOF, since EV_NODATA
delivers the information which was delivered by the EV_EOF before
this commit.

DragonFly-Bug: http://bugs.dragonflybsd.org/issue1998
17 files changed:
sys/dev/misc/cmx/cmx.c
sys/dev/misc/kbd/kbd.c
sys/dev/video/bktr/bktr_os.c
sys/dev/video/cxm/cxm.c
sys/kern/kern_event.c
sys/kern/sys_generic.c
sys/kern/sys_pipe.c
sys/kern/tty.c
sys/kern/tty_pty.c
sys/kern/uipc_socket.c
sys/sys/event.h
sys/vfs/devfs/devfs_core.c
sys/vfs/fifofs/fifo_vnops.c
sys/vfs/gnu/ext2fs/ext2_vnops.c
sys/vfs/hammer/hammer_vnops.c
sys/vfs/tmpfs/tmpfs_vnops.c
sys/vfs/ufs/ufs_vnops.c