wine-staging/patches/ntoskrnl-Stubs/0011-ntoskrnl.exe-Implement-KeInitializeMutex.patch

32 lines
976 B
Diff
Raw Normal View History

From e08f2a919e3f1f8129d4f40d0a9232c363e4da2b Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Fri, 30 Jan 2015 01:06:36 +0100
Subject: ntoskrnl.exe: Implement KeInitializeMutex.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 10957e8..3ff5d63 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1356,7 +1356,13 @@ void WINAPI KeInitializeEvent( PRKEVENT Event, EVENT_TYPE Type, BOOLEAN State )
*/
void WINAPI KeInitializeMutex(PRKMUTEX Mutex, ULONG Level)
{
- FIXME( "stub: %p, %u\n", Mutex, Level );
+ TRACE( "%p, %u\n", Mutex, Level );
+ RtlZeroMemory( Mutex, sizeof(KMUTEX) );
+ Mutex->Header.Type = 2;
+ Mutex->Header.Size = 8;
+ Mutex->Header.SignalState = 1;
+ InitializeListHead( &Mutex->Header.WaitListHead );
+ Mutex->ApcDisable = 1;
}
--
2.3.0