mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 03:40:17 +00:00
- Don't change the lock's OldIrql value until we actually have the lock because we need this value to unlock correctly
- This should fix bug 4704 svn path=/trunk/; revision=42054
This commit is contained in:
parent
ab1fc18975
commit
91f79593a7
|
@ -34,7 +34,6 @@ SIZE_T RecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOLEAN ToWrite ) {
|
|||
|
||||
if( CurrentIrql <= APC_LEVEL ) {
|
||||
ExAcquireFastMutex( &RecMutex->Mutex );
|
||||
RecMutex->OldIrql = CurrentIrql;
|
||||
while( RecMutex->Locked ) {
|
||||
ExReleaseFastMutex( &RecMutex->Mutex );
|
||||
Status = KeWaitForSingleObject( &RecMutex->StateLockedEvent,
|
||||
|
@ -44,6 +43,7 @@ SIZE_T RecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOLEAN ToWrite ) {
|
|||
NULL );
|
||||
ExAcquireFastMutex( &RecMutex->Mutex );
|
||||
}
|
||||
RecMutex->OldIrql = CurrentIrql;
|
||||
RecMutex->Locked = TRUE;
|
||||
RecMutex->Writer = ToWrite;
|
||||
RecMutex->CurrentThread = CurrentThread;
|
||||
|
|
Loading…
Reference in a new issue