diff --git a/reactos/include/ndk/exfuncs.h b/reactos/include/ndk/exfuncs.h index 41dc9866873..44e833de0a3 100644 --- a/reactos/include/ndk/exfuncs.h +++ b/reactos/include/ndk/exfuncs.h @@ -673,6 +673,17 @@ ZwCreateEventPair( _In_ POBJECT_ATTRIBUTES ObjectAttributes ); +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSYSAPI +NTSTATUS +NTAPI +ZwCreateKeyedEvent( + _Out_ PHANDLE OutHandle, + _In_ ACCESS_MASK AccessMask, + _In_ POBJECT_ATTRIBUTES ObjectAttributes, + _In_ ULONG Flags +); + NTSYSAPI NTSTATUS NTAPI diff --git a/reactos/ntoskrnl/ex/keyedevt.c b/reactos/ntoskrnl/ex/keyedevt.c index 18721e88d60..6bb2769e343 100644 --- a/reactos/ntoskrnl/ex/keyedevt.c +++ b/reactos/ntoskrnl/ex/keyedevt.c @@ -25,16 +25,6 @@ typedef struct _EX_KEYED_EVENT } HashTable[NUM_KEY_HASH_BUCKETS]; } EX_KEYED_EVENT, *PEX_KEYED_EVENT; -NTSTATUS -NTAPI -ZwCreateKeyedEvent( - _Out_ PHANDLE OutHandle, - _In_ ACCESS_MASK AccessMask, - _In_ POBJECT_ATTRIBUTES ObjectAttributes, - _In_ ULONG Flags); - -#define KeGetCurrentProcess() ((PKPROCESS)PsGetCurrentProcess()) - /* GLOBALS *******************************************************************/ PEX_KEYED_EVENT ExpCritSecOutOfMemoryEvent; @@ -128,14 +118,14 @@ ExpReleaseOrWaitForKeyedEvent( _In_ BOOLEAN Release) { PETHREAD Thread, CurrentThread; - PKPROCESS CurrentProcess; + PEPROCESS CurrentProcess; PLIST_ENTRY ListEntry, WaitListHead1, WaitListHead2; NTSTATUS Status; ULONG_PTR HashIndex; PVOID PreviousKeyedWaitValue; /* Get the current process */ - CurrentProcess = KeGetCurrentProcess(); + CurrentProcess = PsGetCurrentProcess(); /* Calculate the hash index */ HashIndex = (ULONG_PTR)KeyedWaitValue >> 5; @@ -171,7 +161,7 @@ ExpReleaseOrWaitForKeyedEvent( ListEntry = ListEntry->Flink; /* Check if this thread is a correct waiter */ - if ((Thread->Tcb.Process == CurrentProcess) && + if ((Thread->Tcb.Process == &CurrentProcess->Pcb) && (Thread->KeyedWaitValue == KeyedWaitValue)) { /* Remove the thread from the list */ diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index 6d95f7052b0..328fe770c70 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -10,7 +10,7 @@ // // Define this if you want debugging support // -#define _IO_DEBUG_ 0x01 +#define _IO_DEBUG_ 0x00 // // These define the Debug Masks Supported diff --git a/reactos/ntoskrnl/include/internal/ps.h b/reactos/ntoskrnl/include/internal/ps.h index 055a2e31281..036e652baea 100644 --- a/reactos/ntoskrnl/include/internal/ps.h +++ b/reactos/ntoskrnl/include/internal/ps.h @@ -417,7 +417,6 @@ PspIsProcessExiting(IN PEPROCESS Process); // NTSTATUS NTAPI -INIT_FUNCTION ApphelpCacheInitialize(VOID); VOID