Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-04-29 12:27:11 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-04-29 12:27:11 +0400
commitbd139e52b44f2a066e6908e1cf84a85e16aa502a (patch)
treeba46a72f732304c27a23729d34f57d439f56d1f2 /winsup/cygwin/fhandler_fifo.cc
parent12eac211c9d8cfe8304b0232cd472bc005d71745 (diff)
* ntdll.h (IsEventSignalled): New inline function.
* cygthread.cc (cygthread::terminate_thread): Use IsEventSignalled in place of WaitForSingleObject on event with 0 timeout. * fhandler.cc (fhandler_base_overlapped::has_ongoing_io): Ditto. * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto. (fhandler_fifo::wait): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * select.cc (verify_tty_slave): Ditto. * thread.cc (pthread::testcancel): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler_fifo.cc')
-rw-r--r--winsup/cygwin/fhandler_fifo.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 9142947ed..35bc54dfe 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -21,6 +21,7 @@
#include "sigproc.h"
#include "cygtls.h"
#include "shared_info.h"
+#include "ntdll.h"
fhandler_fifo::fhandler_fifo ():
fhandler_base_overlapped (), wait_state (fifo_unknown), dummy_client (NULL)
@@ -48,7 +49,7 @@ fhandler_fifo::open_nonserver (const char *npname, unsigned low_flags,
return h;
if (&_my_tls != _main_tls)
yield ();
- else if (WaitForSingleObject (signal_arrived, 0) == WAIT_OBJECT_0)
+ else if (IsEventSignalled (signal_arrived))
{
set_errno (EINTR);
return NULL;
@@ -224,7 +225,7 @@ fhandler_fifo::wait (bool iswrite)
__seterrno ();
return false;
}
- else if (WaitForSingleObject (signal_arrived, 0) != WAIT_OBJECT_0)
+ else if (!IsEventSignalled (signal_arrived))
continue;
else if (_my_tls.call_signal_handler ())
continue;