From 098adfe8898bafc2bd9097fb73d22297407ff13c Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 23 Feb 2008 15:59:30 +0000 Subject: [PATCH] common_select/poll(): Consider all negative timeout values as infinite timeout, not just -1. Paranoia only, since that should happen anyway. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24082 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/wait_for_objects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/wait_for_objects.cpp b/src/system/kernel/wait_for_objects.cpp index 1e5e482e5b..180dc090ea 100644 --- a/src/system/kernel/wait_for_objects.cpp +++ b/src/system/kernel/wait_for_objects.cpp @@ -220,7 +220,7 @@ common_select(int numFDs, fd_set *readSet, fd_set *writeSet, fd_set *errorSet, // wait for something to happen status = acquire_sem_etc(sync->sem, 1, - B_CAN_INTERRUPT | (timeout != -1 ? B_ABSOLUTE_TIMEOUT : 0), timeout); + B_CAN_INTERRUPT | (timeout >= 0 ? B_ABSOLUTE_TIMEOUT : 0), timeout); // restore the old signal mask if (sigMask != NULL) @@ -325,7 +325,7 @@ common_poll(struct pollfd *fds, nfds_t numFDs, bigtime_t timeout, bool kernel) locker.Unlock(); status = acquire_sem_etc(sync->sem, 1, - B_CAN_INTERRUPT | (timeout != -1 ? B_ABSOLUTE_TIMEOUT : 0), timeout); + B_CAN_INTERRUPT | (timeout >= 0 ? B_ABSOLUTE_TIMEOUT : 0), timeout); // deselect file descriptors