Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 10 ---------- dlls/ntoskrnl.exe/sync.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index eb984bd838..189f303d6a 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2439,16 +2439,6 @@ LONG WINAPI KeResetEvent( PRKEVENT Event ) }
-/*********************************************************************** - * KeSetEvent (NTOSKRNL.EXE.@) - */ -LONG WINAPI KeSetEvent( PRKEVENT Event, KPRIORITY Increment, BOOLEAN Wait ) -{ - FIXME("(%p, %d, %d): stub\n", Event, Increment, Wait); - return 0; -} - - /*********************************************************************** * KeSetPriorityThread (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index e7ff7ec6f9..05d50ef648 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#include "config.h" +#include "wine/port.h" #include <stdarg.h>
#include "ntstatus.h" @@ -125,3 +127,22 @@ void WINAPI KeInitializeEvent( PRKEVENT event, EVENT_TYPE type, BOOLEAN state ) event->Header.WaitListHead.Blink = NULL; event->Header.WaitListHead.Flink = NULL; } + +/*********************************************************************** + * KeSetEvent (NTOSKRNL.EXE.@) + */ +LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait ) +{ + HANDLE handle = event->Header.WaitListHead.Blink; + LONG ret; + + TRACE("event %p, increment %d, wait %u.\n", event, increment, wait); + + EnterCriticalSection( &sync_cs ); + ret = interlocked_xchg( &event->Header.SignalState, TRUE ); + if (handle) + SetEvent( handle ); + LeaveCriticalSection( &sync_cs ); + + return ret; +}