Revert errneous checkin.

Check in actual change associated with ChangeLog.
This commit is contained in:
Christopher Faylor
2012-06-19 00:38:02 +00:00
parent af5cd14583
commit 2addde8cb1
20 changed files with 95 additions and 77 deletions

View File

@ -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)