Author: ion
Date: Tue Oct 24 02:07:45 2006
New Revision: 24640
URL:
http://svn.reactos.org/svn/reactos?rev=24640&view=rev
Log:
- Optimize PsGetCurrentProcess as well.
Modified:
trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
trunk/reactos/ntoskrnl/include/internal/ps_x.h
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Tue Oct 24 02:07:45 2006
@@ -17,8 +17,10 @@
#ifdef _NTOSKRNL_
-#define KeGetCurrentThread _KeGetCurrentThread
-#define KeGetPreviousMode _KeGetPreviousMode
+#define KeGetCurrentThread _KeGetCurrentThread
+#define KeGetPreviousMode _KeGetPreviousMode
+#undef PsGetCurrentProcess
+#define PsGetCurrentProcess _PsGetCurrentProcess
#include "ke.h"
#include "i386/mm.h"
Modified: trunk/reactos/ntoskrnl/include/internal/ps_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ps_x.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ps_x.h Tue Oct 24 02:07:45 2006
@@ -179,3 +179,11 @@
/* Leave Critical Thread */
KeLeaveCriticalRegion();
}
+
+PEPROCESS
+FORCEINLINE
+_PsGetCurrentProcess(VOID)
+{
+ /* Get the current process */
+ return (PEPROCESS)KeGetCurrentThread()->ApcState.Process;
+}