diff options
author | Christopher Faylor <me@cgf.cx> | 2012-06-19 04:52:59 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-06-19 04:52:59 +0400 |
commit | 978441cc0ea58a2f3fd5d84f1d0f50bc8307b34a (patch) | |
tree | 3afb58a7fcc101fd407582a1c38b020526797e1e /winsup/cygwin/thread.cc | |
parent | 2addde8cb1e794a9818b9417839524dbc05401da (diff) |
* cygwait.h (LARGE_NULL): Define.
(cancelable_wait): Define variant which accepts DWORD time argument.
(cygwait): Use cancelable_wait with DWORD argument.
(cygwait): Use cancelable_wait with DWORD argument and cw_sig_eintr for
timeout-only case.
* exceptions.cc (handle_sigsuspend): Use LARGE_NULL as second argument to
distinguish between cancelable_wait variants.
* thread.cc (pthread_mutex::lock): Ditto.
(pthread::join): Ditto.
(semaphore::_timedwait): Ditto.
* thread.h (fast_mutex::lock): Ditto.
* wait.cc (wait4): Ditto.
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r-- | winsup/cygwin/thread.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index f3ff336f4..5caf5ca73 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1744,7 +1744,7 @@ pthread_mutex::lock () || !pthread::equal (owner, self)) { /* FIXME: no cancel? */ - cancelable_wait (win32_obj_id, NULL, cw_sig); + cancelable_wait (win32_obj_id, LARGE_NULL, cw_sig); set_owner (self); } else @@ -2364,7 +2364,7 @@ pthread::join (pthread_t *thread, void **return_val) (*thread)->attr.joinable = PTHREAD_CREATE_DETACHED; (*thread)->mutex.unlock (); - switch (cancelable_wait ((*thread)->win32_obj_id, NULL, cw_sig | cw_cancel)) + switch (cancelable_wait ((*thread)->win32_obj_id, LARGE_NULL, cw_sig | cw_cancel)) { case WAIT_OBJECT_0: if (return_val) @@ -3501,7 +3501,7 @@ semaphore::_timedwait (const struct timespec *abstime) int semaphore::_wait () { - switch (cancelable_wait (win32_obj_id, NULL, cw_cancel | cw_cancel_self | cw_sig_eintr)) + switch (cancelable_wait (win32_obj_id, LARGE_NULL, cw_cancel | cw_cancel_self | cw_sig_eintr)) { case WAIT_OBJECT_0: currentvalue--; |