diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-04-29 12:27:11 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-04-29 12:27:11 +0400 |
commit | bd139e52b44f2a066e6908e1cf84a85e16aa502a (patch) | |
tree | ba46a72f732304c27a23729d34f57d439f56d1f2 /winsup/cygwin/cygthread.cc | |
parent | 12eac211c9d8cfe8304b0232cd472bc005d71745 (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/cygthread.cc')
-rw-r--r-- | winsup/cygwin/cygthread.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc index b59140ef9..ef8a4d575 100644 --- a/winsup/cygwin/cygthread.cc +++ b/winsup/cygwin/cygthread.cc @@ -1,7 +1,7 @@ /* cygthread.cc Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, - 2009 2010 Red Hat, Inc. + 2009, 2010, 2011 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -12,6 +12,7 @@ details. */ #include <stdlib.h> #include "sigproc.h" #include "cygtls.h" +#include "ntdll.h" #undef CloseHandle @@ -298,7 +299,7 @@ cygthread::terminate_thread () if (!inuse || exiting) goto force_notterminated; - if (ev && !(terminated = WaitForSingleObject (ev, 0) != WAIT_OBJECT_0)) + if (ev && !(terminated = !IsEventSignalled (ev))) ResetEvent (ev); MEMORY_BASIC_INFORMATION m; |