From 1532dd53a54e1e46191c9fb56864b8fba9a67d62 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 24 Aug 2004 22:04:18 +0000 Subject: * bsd_mutex.cc (_msleep): Release process object while waiting. --- winsup/cygserver/bsd_mutex.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/cygserver/bsd_mutex.cc') 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); -- cgit v1.2.3