https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6b3f309a08f14ab68b538…
commit 6b3f309a08f14ab68b538f85bf6a61f568871aeb
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Fri Oct 16 16:09:08 2020 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri Oct 16 16:09:54 2020 +0200
[NTOS] Consistently use MUTANT_INCREMENT.
Spotted by Hermès.
---
ntoskrnl/ke/mutex.c | 2 +-
ntoskrnl/mm/ARM3/drvmgmt.c | 2 +-
ntoskrnl/mm/ARM3/sysldr.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/ke/mutex.c b/ntoskrnl/ke/mutex.c
index ef82931445f..7854b5fda66 100644
--- a/ntoskrnl/ke/mutex.c
+++ b/ntoskrnl/ke/mutex.c
@@ -192,7 +192,7 @@ KeReleaseMutex(IN PKMUTEX Mutex,
ASSERT_MUTANT(Mutex);
/* There's no difference at this level between the two */
- return KeReleaseMutant(Mutex, 1, FALSE, Wait);
+ return KeReleaseMutant(Mutex, MUTANT_INCREMENT, FALSE, Wait);
}
/* EOF */
diff --git a/ntoskrnl/mm/ARM3/drvmgmt.c b/ntoskrnl/mm/ARM3/drvmgmt.c
index 0d4a5b1aa82..ce06e3247d8 100644
--- a/ntoskrnl/mm/ARM3/drvmgmt.c
+++ b/ntoskrnl/mm/ARM3/drvmgmt.c
@@ -194,7 +194,7 @@ Cleanup:
//
// Release the lock
//
- KeReleaseMutant(&MmSystemLoadLock, 1, FALSE, FALSE);
+ KeReleaseMutant(&MmSystemLoadLock, MUTANT_INCREMENT, FALSE, FALSE);
KeLeaveCriticalRegion();
//
diff --git a/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c
index 9d51898ec64..d414b1f6b43 100644
--- a/ntoskrnl/mm/ARM3/sysldr.c
+++ b/ntoskrnl/mm/ARM3/sysldr.c
@@ -991,7 +991,7 @@ MmUnloadSystemImage(IN PVOID ImageHandle)
/* Release the system lock and return */
Done:
- KeReleaseMutant(&MmSystemLoadLock, 1, FALSE, FALSE);
+ KeReleaseMutant(&MmSystemLoadLock, MUTANT_INCREMENT, FALSE, FALSE);
KeLeaveCriticalRegion();
return STATUS_SUCCESS;
}
@@ -1623,7 +1623,7 @@ MiFindInitializationCode(OUT PVOID *StartVa,
/* Release the locks and return */
ExReleaseResourceLite(&PsLoadedModuleResource);
- KeReleaseMutant(&MmSystemLoadLock, 1, FALSE, FALSE);
+ KeReleaseMutant(&MmSystemLoadLock, MUTANT_INCREMENT, FALSE, FALSE);
KeLeaveCriticalRegion();
}
@@ -2972,7 +2972,7 @@ LoaderScan:
else if (!Section)
{
/* It wasn't loaded, and we didn't have a previous attempt */
- KeReleaseMutant(&MmSystemLoadLock, 1, FALSE, FALSE);
+ KeReleaseMutant(&MmSystemLoadLock, MUTANT_INCREMENT, FALSE, FALSE);
KeLeaveCriticalRegion();
LockOwned = FALSE;
@@ -3324,7 +3324,7 @@ Quickie:
if (LockOwned)
{
/* Release the lock */
- KeReleaseMutant(&MmSystemLoadLock, 1, FALSE, FALSE);
+ KeReleaseMutant(&MmSystemLoadLock, MUTANT_INCREMENT, FALSE, FALSE);
KeLeaveCriticalRegion();
LockOwned = FALSE;
}