diff options
author | Christopher Faylor <me@cgf.cx> | 2012-06-19 04:38:02 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-06-19 04:38:02 +0400 |
commit | 2addde8cb1e794a9818b9417839524dbc05401da (patch) | |
tree | 389e9271ffc3ea88d97116b52fa8e838889ab12f /winsup/cygwin/posix_ipc.cc | |
parent | af5cd145835d35519af02d0d226f67eb777e4945 (diff) |
Revert errneous checkin.
Check in actual change associated with ChangeLog.
Diffstat (limited to 'winsup/cygwin/posix_ipc.cc')
-rw-r--r-- | winsup/cygwin/posix_ipc.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc index b427d11d6..b9d224e43 100644 --- a/winsup/cygwin/posix_ipc.cc +++ b/winsup/cygwin/posix_ipc.cc @@ -119,12 +119,14 @@ ipc_mutex_init (HANDLE *pmtx, const char *name) static int ipc_mutex_lock (HANDLE mtx) { - switch (cancelable_wait (mtx, NULL, cw_sig_eintr | cw_cancel | cw_cancel_self)) + HANDLE h[2] = { mtx, signal_arrived }; + + switch (WaitForMultipleObjects (2, h, FALSE, INFINITE)) { case WAIT_OBJECT_0: case WAIT_ABANDONED_0: return 0; - case WAIT_SIGNALED: + case WAIT_OBJECT_0 + 1: set_errno (EINTR); return 1; default: @@ -172,12 +174,11 @@ ipc_cond_init (HANDLE *pevt, const char *name, char sr) static int ipc_cond_timedwait (HANDLE evt, HANDLE mtx, const struct timespec *abstime) { - HANDLE w4[4] = { evt, }; + HANDLE w4[4] = { evt, signal_arrived, NULL, NULL }; DWORD cnt = 2; DWORD timer_idx = 0; int ret = 0; - set_thread_waiting (w4[1]); if ((w4[cnt] = pthread::get_cancel_event ()) != NULL) ++cnt; if (abstime) |