diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-05-01 17:42:41 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-05-01 17:42:41 +0000 |
commit | a91ac4dca9f8edca7945593509267beff5a504fe (patch) | |
tree | ab305094a97533163362a0efcdb93ac9df1b8270 /winsup/cygwin/posix_ipc.cc | |
parent | 1112b2c38f39f33daefd03bb1eebe9e1f84eabaf (diff) | |
download | newlib-a91ac4dca9f8edca7945593509267beff5a504fe.zip newlib-a91ac4dca9f8edca7945593509267beff5a504fe.tar.gz newlib-a91ac4dca9f8edca7945593509267beff5a504fe.tar.bz2 |
* 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/posix_ipc.cc')
-rw-r--r-- | winsup/cygwin/posix_ipc.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc index ec6b6c7..9f98e9d 100644 --- a/winsup/cygwin/posix_ipc.cc +++ b/winsup/cygwin/posix_ipc.cc @@ -174,16 +174,13 @@ ipc_cond_init (HANDLE *pevt, const char *name, char sr) static int ipc_cond_timedwait (HANDLE evt, HANDLE mtx, const struct timespec *abstime) { - pthread_t thread; HANDLE w4[4] = { evt, signal_arrived, NULL, NULL }; DWORD cnt = 2; DWORD timer_idx = 0; int ret = 0; - 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; if (abstime) { if (abstime->tv_sec < 0 |