Implement KeGetTrapFrame and KeGetExceptionFrame macros.

svn path=/branches/ros-amd64-bringup/; revision=44773
This commit is contained in:
Samuel Serapion
2009-12-27 18:19:20 +00:00
parent 4c27361c3b
commit 948f940cd9
@@ -102,6 +102,17 @@ extern ULONG KeI386CpuStep;
#define KeSetContextReturnRegister(Context, ReturnValue) \
((Context)->Rax = (ReturnValue))
//
// Macro to get trap and exception frame from a thread stack
//
#define KeGetTrapFrame(Thread) \
(PKTRAP_FRAME)((ULONG_PTR)((Thread)->InitialStack) - \
sizeof(KTRAP_FRAME))
#define KeGetExceptionFrame(Thread) \
(PKEXCEPTION_FRAME)((ULONG_PTR)KeGetTrapFrame(Thread) - \
sizeof(KEXCEPTION_FRAME))
//
// Returns the Interrupt State from a Trap Frame.
// ON = TRUE, OFF = FALSE