diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog index a23bb541f..6de3a94ba 100644 --- a/winsup/cygserver/ChangeLog +++ b/winsup/cygserver/ChangeLog @@ -1,3 +1,7 @@ +2004-08-24 Corinna Vinschen <corinna@vinschen.de> + + * bsd_mutex.cc (_msleep): Release process object while waiting. + 2004-08-03 Corinna Vinschen <corinna@vinschen.de> * transport.cc (transport_layer_base::~transport_layer_base): Resurrect. 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);