From 3f1658e7441b2feaffea752b831e0c714e2ac95e Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 14 Jan 2010 08:40:16 +0000 Subject: [PATCH] [NTOS] Add KeGetContextSwitches macro for amd64 svn path=/branches/ros-amd64-bringup/; revision=45073 --- reactos/ntoskrnl/include/internal/amd64/ke.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reactos/ntoskrnl/include/internal/amd64/ke.h b/reactos/ntoskrnl/include/internal/amd64/ke.h index fc5417189ba..3ca4fef73a9 100644 --- a/reactos/ntoskrnl/include/internal/amd64/ke.h +++ b/reactos/ntoskrnl/include/internal/amd64/ke.h @@ -109,6 +109,13 @@ extern ULONG KeI386CpuStep; (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) - \ sizeof(KEXCEPTION_FRAME))