From 183ad8597c86a239a71c08364390e0b5d35065c2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 2 May 2011 18:48:11 +0000 Subject: [PATCH] * thread.cc (cancelable_wait): Remove test for main thread. * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_fifo.cc | 4 +--- winsup/cygwin/thread.cc | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e7f155dff..4b66e024d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-05-02 Corinna Vinschen + + * thread.cc (cancelable_wait): Remove test for main thread. + * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto. + 2011-05-02 Corinna Vinschen * fhndler_tty.cc (andler_pty_master::process_slave_output): Make diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 35bc54dfe..72a5bd6c1 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -47,9 +47,7 @@ fhandler_fifo::open_nonserver (const char *npname, unsigned low_flags, FILE_FLAG_OVERLAPPED, NULL); if (h != INVALID_HANDLE_VALUE || GetLastError () != ERROR_PIPE_NOT_CONNECTED) return h; - if (&_my_tls != _main_tls) - yield (); - else if (IsEventSignalled (signal_arrived)) + if (IsEventSignalled (signal_arrived)) { set_errno (EINTR); return NULL; diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 3de53f6fa..0ac810117 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -930,7 +930,7 @@ cancelable_wait (HANDLE object, DWORD timeout, } DWORD sig_n; - if (sig_wait == cw_sig_nosig || &_my_tls != _main_tls) + if (sig_wait == cw_sig_nosig) sig_n = WAIT_TIMEOUT + 1; else { -- 2.43.5