Author: sginsberg
Date: Fri Sep 25 18:40:56 2015
New Revision: 69354

URL: http://svn.reactos.org/svn/reactos?rev=69354&view=rev
Log:
[NDK] Put ZwCreateKeyedEvent in NDK where it belongs.
[EX] Remove "KeGetCurrentProcess" and just use the EPROCESS Pcb member for type 
correctness instead of inventing a new macro to hide the casting.
[PS] Remove stray INIT_FUNCTION (doesn't do much on a prototype).
[IO] Define _IO_DEBUG_ to 0 again after someone forgot to leave it on 4 years 
ago (only bloated the code since IopTraceLevel was 0 anyway).

Modified:
    trunk/reactos/include/ndk/exfuncs.h
    trunk/reactos/ntoskrnl/ex/keyedevt.c
    trunk/reactos/ntoskrnl/include/internal/io.h
    trunk/reactos/ntoskrnl/include/internal/ps.h

Modified: trunk/reactos/include/ndk/exfuncs.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/exfuncs.h?rev=69354&r1=69353&r2=69354&view=diff
==============================================================================
--- trunk/reactos/include/ndk/exfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/exfuncs.h [iso-8859-1] Fri Sep 25 18:40:56 2015
@@ -673,6 +673,17 @@
     _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

Modified: trunk/reactos/ntoskrnl/ex/keyedevt.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/keyedevt.c?rev=69354&r1=69353&r2=69354&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ex/keyedevt.c        [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/keyedevt.c        [iso-8859-1] Fri Sep 25 
18:40:56 2015
@@ -24,16 +24,6 @@
         LIST_ENTRY ReleaseListHead;
     } 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 *******************************************************************/
 
@@ -128,14 +118,14 @@
     _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 @@
         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 */

Modified: trunk/reactos/ntoskrnl/include/internal/io.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/io.h?rev=69354&r1=69353&r2=69354&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/io.h        [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/io.h        [iso-8859-1] Fri Sep 25 
18:40:56 2015
@@ -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

Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/ps.h?rev=69354&r1=69353&r2=69354&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ps.h        [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ps.h        [iso-8859-1] Fri Sep 25 
18:40:56 2015
@@ -417,7 +417,6 @@
 //
 NTSTATUS
 NTAPI
-INIT_FUNCTION
 ApphelpCacheInitialize(VOID);
 
 VOID


Reply via email to