[ros-diffs] [tkreuzer] 45073: [NTOS] Add KeGetContextSwitches macro for amd64

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Thu Jan 14 09:40:17 CET 2010


Author: tkreuzer
Date: Thu Jan 14 09:40:16 2010
New Revision: 45073

URL: http://svn.reactos.org/svn/reactos?rev=45073&view=rev
Log:
[NTOS]
Add KeGetContextSwitches macro for amd64

Modified:
    branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h

Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h?rev=45073&r1=45072&r2=45073&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Thu Jan 14 09:40:16 2010
@@ -108,6 +108,13 @@
 #define KeGetTrapFrame(Thread) \
     (PKTRAP_FRAME)((ULONG_PTR)((Thread)->InitialStack) - \
                    sizeof(KTRAP_FRAME))
+
+//
+// Macro to get context switches from the PRCB
+// All architectures but x86 have it in the PRCB's KeContextSwitches
+//
+#define KeGetContextSwitches(Prcb)  \
+    (Prcb->KeContextSwitches)
 
 #define KeGetExceptionFrame(Thread) \
     (PKEXCEPTION_FRAME)((ULONG_PTR)KeGetTrapFrame(Thread) - \




More information about the Ros-diffs mailing list