wine-staging/patches/ntoskrnl-Synchronization/0002-ntoskrnl.exe-Implement-KeInitializeEvent.patch
2018-09-18 21:31:16 -05:00

69 lines
2.4 KiB
Diff

From 6b6a079747a9d92f5cd2b3b11a3b350c24f2ceb1 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 19 Aug 2018 17:34:35 -0500
Subject: [PATCH 02/17] ntoskrnl.exe: Implement KeInitializeEvent().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/ntoskrnl.exe/ntoskrnl.c | 9 ---------
dlls/ntoskrnl.exe/sync.c | 13 +++++++++++++
include/ddk/wdm.h | 1 +
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 28671c8..e61b18d 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2085,15 +2085,6 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
return NULL;
}
-/***********************************************************************
- * KeInitializeEvent (NTOSKRNL.EXE.@)
- */
-void WINAPI KeInitializeEvent( PRKEVENT Event, EVENT_TYPE Type, BOOLEAN State )
-{
- FIXME( "stub: %p %d %d\n", Event, Type, State );
-}
-
-
/***********************************************************************
* KeInitializeMutex (NTOSKRNL.EXE.@)
*/
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
index 19af4f6..e7ff7ec 100644
--- a/dlls/ntoskrnl.exe/sync.c
+++ b/dlls/ntoskrnl.exe/sync.c
@@ -112,3 +112,16 @@ NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG count, void *pobjs[],
return ret;
}
+
+/***********************************************************************
+ * KeInitializeEvent (NTOSKRNL.EXE.@)
+ */
+void WINAPI KeInitializeEvent( PRKEVENT event, EVENT_TYPE type, BOOLEAN state )
+{
+ TRACE("event %p, type %u, state %u.\n", event, type, state);
+
+ event->Header.Type = type;
+ event->Header.SignalState = state;
+ event->Header.WaitListHead.Blink = NULL;
+ event->Header.WaitListHead.Flink = NULL;
+}
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 32e8f8b..350a08e 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1419,6 +1419,7 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState(UNICODE_STRING*,BOOLEAN);
NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
PKTHREAD WINAPI KeGetCurrentThread(void);
+void WINAPI KeInitializeEvent(PRKEVENT,EVENT_TYPE,BOOLEAN);
void WINAPI KeInitializeSemaphore(PRKSEMAPHORE,LONG,LONG);
void WINAPI KeInitializeTimerEx(PKTIMER,TIMER_TYPE);
void WINAPI KeQuerySystemTime(LARGE_INTEGER*);
--
2.7.4