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/thread.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/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 2bd50658c..1eab04d55 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -37,6 +37,7 @@ details. */
#include "fhandler.h"
#include "dtable.h"
#include "cygheap.h"
+#include "ntdll.h"
extern "C" void __fp_lock_all ();
extern "C" void __fp_unlock_all ();
@@ -742,7 +743,7 @@ pthread::testcancel ()
if (cancelstate == PTHREAD_CANCEL_DISABLE)
return;
- if (WaitForSingleObject (cancel_event, 0) == WAIT_OBJECT_0)
+ if (IsEventSignalled (cancel_event))
cancel_self ();
}