Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 9 --------- dlls/ntoskrnl.exe/sync.c | 14 ++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index d0e77c5df7..1d1033e793 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2277,15 +2277,6 @@ PRKTHREAD WINAPI KeGetCurrentThread(void) return NULL; }
- /*********************************************************************** - * KeInitializeMutex (NTOSKRNL.EXE.@) - */ -void WINAPI KeInitializeMutex(PRKMUTEX Mutex, ULONG Level) -{ - FIXME( "stub: %p, %u\n", Mutex, Level ); -} - - /*********************************************************************** * KeWaitForMutexObject (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index 77178462f5..6f356f6355 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -36,6 +36,7 @@ enum object_type { TYPE_MANUAL_EVENT = 0, TYPE_AUTO_EVENT = 1, + TYPE_MUTEX = 2, TYPE_SEMAPHORE = 5, };
@@ -218,3 +219,16 @@ LONG WINAPI KeReleaseSemaphore( PRKSEMAPHORE semaphore, KPRIORITY increment,
return ret; } + +/*********************************************************************** + * KeInitializeMutex (NTOSKRNL.EXE.@) + */ +void WINAPI KeInitializeMutex( PRKMUTEX mutex, ULONG level ) +{ + TRACE("mutex %p, level %u.\n", mutex, level); + + mutex->Header.Type = TYPE_MUTEX; + mutex->Header.SignalState = 1; + mutex->Header.WaitListHead.Blink = NULL; + mutex->Header.WaitListHead.Flink = NULL; +} diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 522bb3f9c8..831304eb53 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1421,6 +1421,7 @@ NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
PKTHREAD WINAPI KeGetCurrentThread(void); void WINAPI KeInitializeEvent(PRKEVENT,EVENT_TYPE,BOOLEAN); +void WINAPI KeInitializeMutex(PRKMUTEX,ULONG); void WINAPI KeInitializeSemaphore(PRKSEMAPHORE,LONG,LONG); void WINAPI KeInitializeTimerEx(PKTIMER,TIMER_TYPE); void WINAPI KeQuerySystemTime(LARGE_INTEGER*);