mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 04:19:21 +08:00
* 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:
parent
f048a4a16f
commit
a918549275
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user