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-05-01 21:42:41 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-05-01 21:42:41 +0400
commita91ac4dca9f8edca7945593509267beff5a504fe (patch)
treeab305094a97533163362a0efcdb93ac9df1b8270 /winsup/cygwin/fhandler_windows.cc
parent1112b2c38f39f33daefd03bb1eebe9e1f84eabaf (diff)
* fhandler_windows.cc (fhandler_windows::read): Use
pthread::get_cancel_event to fetch thread's cancel event. * flock.cc (lf_setlock): Ditto. * posix_ipc.cc (ipc_cond_timedwait): Ditto. * thread.cc (pthread::get_cancel_event): New static method. * thread.h (pthread::get_cancel_event): Declare.
Diffstat (limited to 'winsup/cygwin/fhandler_windows.cc')
-rw-r--r--winsup/cygwin/fhandler_windows.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc
index 119266093..d4c39d4c0 100644
--- a/winsup/cygwin/fhandler_windows.cc
+++ b/winsup/cygwin/fhandler_windows.cc
@@ -98,10 +98,8 @@ fhandler_windows::read (void *buf, size_t& len)
HANDLE w4[3] = { get_handle (), signal_arrived, NULL };
DWORD cnt = 2;
- pthread_t thread = pthread::self ();
- if (thread && thread->cancel_event
- && thread->cancelstate != PTHREAD_CANCEL_DISABLE)
- w4[cnt++] = thread->cancel_event;
+ if ((w4[cnt] = pthread::get_cancel_event ()) != NULL)
+ ++cnt;
restart:
switch (MsgWaitForMultipleObjectsEx (cnt, w4,
is_nonblocking () ? 0 : INFINITE,