diff options
Diffstat (limited to 'winsup/cygserver/bsd_mutex.cc')
-rw-r--r-- | winsup/cygserver/bsd_mutex.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygserver/bsd_mutex.cc b/winsup/cygserver/bsd_mutex.cc index 449e61449..37e15e2e9 100644 --- a/winsup/cygserver/bsd_mutex.cc +++ b/winsup/cygserver/bsd_mutex.cc @@ -201,6 +201,7 @@ _msleep (void *ident, struct mtx *mtx, int priority, if ((priority & PCATCH) && td->client->signal_arrived () != INVALID_HANDLE_VALUE) obj_cnt = 4; + td->client->release (); switch (WaitForMultipleObjects (obj_cnt, obj, FALSE, timo ?: INFINITE)) { case WAIT_OBJECT_0: /* wakeup() has been called. */ @@ -225,6 +226,7 @@ _msleep (void *ident, struct mtx *mtx, int priority, /* Dismiss event before entering mutex. */ ResetEvent (evt); CloseHandle (evt); + td->client->hold (); set_priority (old_priority); if (mtx && !(priority & PDROP)) mtx_lock (mtx); |