* bsd_mutex.cc (_msleep): Reset event object and close it before

entering mutex.  Turn order of conditional for better readability.
This commit is contained in:
Corinna Vinschen 2004-07-30 14:48:19 +00:00
parent f048a4a16f
commit a918549275
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-07-30 Corinna Vinschen <corinna@vinschen.de>
* bsd_mutex.cc (_msleep): Reset event object and close it before
entering mutex. Turn order of conditional for better readability.
2004-07-26 Corinna Vinschen <corinna@vinschen.de>
* cygserver.conf: Describe relation between shmmaxpgs and SHMMAX.

View File

@ -222,10 +222,12 @@ _msleep (void *ident, struct mtx *mtx, int priority,
panic ("wait in msleep (%s) failed, %E", wmesg);
break;
}
set_priority (old_priority);
if (!(priority & PDROP) && mtx)
mtx_lock (mtx);
/* Dismiss event before entering mutex. */
ResetEvent (evt);
CloseHandle (evt);
set_priority (old_priority);
if (mtx && !(priority & PDROP))
mtx_lock (mtx);
return ret;
}