From b1aad5d86fa49f1152a2c8eefe7ca867f4fe3d6f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 25 Feb 2005 14:02:20 +0000 Subject: [PATCH] Regular files are always ready for I/O, no need to poll on them. --- server/fd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/fd.c b/server/fd.c index 8e9237cf3e7..c4c44459ffd 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1347,9 +1347,13 @@ void default_fd_remove_queue( struct object *obj, struct wait_queue_entry *entry /* default signaled() routine for objects that poll() on an fd */ int default_fd_signaled( struct object *obj, struct thread *thread ) { + int events, ret; struct fd *fd = get_obj_fd( obj ); - int events = fd->fd_ops->get_poll_events( fd ); - int ret = check_fd_events( fd, events ) != 0; + + if (fd->inode) return 1; /* regular files are always signaled */ + + events = fd->fd_ops->get_poll_events( fd ); + ret = check_fd_events( fd, events ) != 0; if (ret) set_fd_events( fd, 0 ); /* stop waiting on select() if we are signaled */