- KPCR::Tib -> NtTib, KPCR::Self -> SelfPcr
- Rename ExInitializePushLock inline function to _ExInitializePushLock and use a define, as in newer versions of windows the function exists as export and is in the WDK

svn path=/branches/header-work/; revision=46136
This commit is contained in:
Timo Kreuzer 2010-03-12 16:28:04 +00:00
parent 7553ab8b16
commit 89a27c5264
6 changed files with 21 additions and 20 deletions

View file

@ -878,10 +878,10 @@ ExWaitForUnblockPushLock(
); );
/*++ /*++
* @name ExInitializePushLock * @name _ExInitializePushLock
* INTERNAL MACRO * INTERNAL MACRO
* *
* The ExInitializePushLock macro initializes a PushLock. * The _ExInitializePushLock macro initializes a PushLock.
* *
* @params PushLock * @params PushLock
* Pointer to the pushlock which is to be initialized. * Pointer to the pushlock which is to be initialized.
@ -893,11 +893,12 @@ ExWaitForUnblockPushLock(
*--*/ *--*/
FORCEINLINE FORCEINLINE
VOID VOID
ExInitializePushLock(IN PULONG_PTR PushLock) _ExInitializePushLock(IN PULONG_PTR PushLock)
{ {
/* Set the value to 0 */ /* Set the value to 0 */
*PushLock = 0; *PushLock = 0;
} }
#define ExInitializePushLock _ExInitializePushLock
/*++ /*++
* @name ExAcquirePushLockExclusive * @name ExAcquirePushLockExclusive

View file

@ -160,8 +160,8 @@ C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_
#endif #endif
#ifdef _M_IX86 #ifdef _M_IX86
C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST); C_ASSERT(FIELD_OFFSET(KPCR, NtTib.ExceptionList) == KPCR_EXCEPTION_LIST);
C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF); C_ASSERT(FIELD_OFFSET(KPCR, SelfPcr) == KPCR_SELF);
C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR); C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR);
C_ASSERT(FIELD_OFFSET(KPCR, IDR) == KPCR_IDR); C_ASSERT(FIELD_OFFSET(KPCR, IDR) == KPCR_IDR);
C_ASSERT(FIELD_OFFSET(KPCR, Irql) == KPCR_IRQL); C_ASSERT(FIELD_OFFSET(KPCR, Irql) == KPCR_IRQL);

View file

@ -108,9 +108,9 @@ KiExitTrapDebugChecks(IN PKTRAP_FRAME TrapFrame,
} }
/* Make sure we have a valid SEH chain */ /* Make sure we have a valid SEH chain */
if (KeGetPcr()->Tib.ExceptionList == 0) if (KeGetPcr()->NtTib.ExceptionList == 0)
{ {
DbgPrint("Exiting with NULL exception chain: %p\n", KeGetPcr()->Tib.ExceptionList); DbgPrint("Exiting with NULL exception chain: %p\n", KeGetPcr()->NtTib.ExceptionList);
while (TRUE); while (TRUE);
} }
@ -391,7 +391,7 @@ KiExitTrap(IN PKTRAP_FRAME TrapFrame,
KiExitTrapDebugChecks(TrapFrame, SkipBits); KiExitTrapDebugChecks(TrapFrame, SkipBits);
/* Restore the SEH handler chain */ /* Restore the SEH handler chain */
KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList; KeGetPcr()->NtTib.ExceptionList = TrapFrame->ExceptionList;
/* Check if the previous mode must be restored */ /* Check if the previous mode must be restored */
if (__builtin_expect(!SkipBits.SkipPreviousMode, 0)) /* More INTS than SYSCALLs */ if (__builtin_expect(!SkipBits.SkipPreviousMode, 0)) /* More INTS than SYSCALLs */
@ -558,7 +558,7 @@ FORCEINLINE
KiEnterV86Trap(IN PKTRAP_FRAME TrapFrame) KiEnterV86Trap(IN PKTRAP_FRAME TrapFrame)
{ {
/* Save exception list */ /* Save exception list */
TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
/* Save DR7 and check for debugging */ /* Save DR7 and check for debugging */
TrapFrame->Dr7 = __readdr(7); TrapFrame->Dr7 = __readdr(7);
@ -577,8 +577,8 @@ FORCEINLINE
KiEnterInterruptTrap(IN PKTRAP_FRAME TrapFrame) KiEnterInterruptTrap(IN PKTRAP_FRAME TrapFrame)
{ {
/* Save exception list and terminate it */ /* Save exception list and terminate it */
TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
KeGetPcr()->Tib.ExceptionList = EXCEPTION_CHAIN_END; KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END;
/* Flush DR7 and check for debugging */ /* Flush DR7 and check for debugging */
TrapFrame->Dr7 = 0; TrapFrame->Dr7 = 0;
@ -600,7 +600,7 @@ FORCEINLINE
KiEnterTrap(IN PKTRAP_FRAME TrapFrame) KiEnterTrap(IN PKTRAP_FRAME TrapFrame)
{ {
/* Save exception list */ /* Save exception list */
TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
/* Flush DR7 and check for debugging */ /* Flush DR7 and check for debugging */
TrapFrame->Dr7 = 0; TrapFrame->Dr7 = 0;

View file

@ -184,7 +184,7 @@ NtRaiseException(IN PEXCEPTION_RECORD ExceptionRecord,
/* Set exception list */ /* Set exception list */
#ifdef _M_IX86 #ifdef _M_IX86
KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList; KeGetPcr()->NtTib.ExceptionList = TrapFrame->ExceptionList;
#endif #endif
/* Raise the exception */ /* Raise the exception */

View file

@ -411,7 +411,7 @@ KiTrap02(VOID)
TrapFrame.Esi = Tss->Esi; TrapFrame.Esi = Tss->Esi;
TrapFrame.Edi = Tss->Edi; TrapFrame.Edi = Tss->Edi;
TrapFrame.SegFs = Tss->Fs; TrapFrame.SegFs = Tss->Fs;
TrapFrame.ExceptionList = PCR->Tib.ExceptionList; TrapFrame.ExceptionList = PCR->NtTib.ExceptionList;
TrapFrame.PreviousPreviousMode = -1; TrapFrame.PreviousPreviousMode = -1;
TrapFrame.Eax = Tss->Eax; TrapFrame.Eax = Tss->Eax;
TrapFrame.Ecx = Tss->Ecx; TrapFrame.Ecx = Tss->Ecx;
@ -1486,8 +1486,8 @@ KiSystemCallHandler(IN PKTRAP_FRAME TrapFrame,
TrapFrame->SegFs = SegFs; TrapFrame->SegFs = SegFs;
/* Save the SEH chain and terminate it for now */ /* Save the SEH chain and terminate it for now */
TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
KeGetPcr()->Tib.ExceptionList = EXCEPTION_CHAIN_END; KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END;
/* Clear DR7 and check for debugging */ /* Clear DR7 and check for debugging */
TrapFrame->Dr7 = 0; TrapFrame->Dr7 = 0;

View file

@ -471,7 +471,7 @@ KiExitV86Mode(IN PKTRAP_FRAME TrapFrame)
/* Restore TEB addresses */ /* Restore TEB addresses */
Thread->Teb = V86Frame->ThreadTeb; Thread->Teb = V86Frame->ThreadTeb;
KeGetPcr()->Tib.Self = V86Frame->PcrTeb; KeGetPcr()->NtTib.Self = V86Frame->PcrTeb;
/* Setup real TEB descriptor */ /* Setup real TEB descriptor */
GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)]; GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)];
@ -505,7 +505,7 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame)
/* Save TEB addresses */ /* Save TEB addresses */
V86Frame->ThreadTeb = Thread->Teb; V86Frame->ThreadTeb = Thread->Teb;
V86Frame->PcrTeb = KeGetPcr()->Tib.Self; V86Frame->PcrTeb = KeGetPcr()->NtTib.Self;
/* Save return EIP */ /* Save return EIP */
TrapFrame->Eip = (ULONG_PTR)Ki386BiosCallReturnAddress; TrapFrame->Eip = (ULONG_PTR)Ki386BiosCallReturnAddress;
@ -533,7 +533,7 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame)
RtlCopyMemory(NpxFrame, V86Frame->ThreadStack, sizeof(FX_SAVE_AREA)); RtlCopyMemory(NpxFrame, V86Frame->ThreadStack, sizeof(FX_SAVE_AREA));
/* Clear exception list */ /* Clear exception list */
KeGetPcr()->Tib.ExceptionList = EXCEPTION_CHAIN_END; KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END;
/* Set new ESP0 */ /* Set new ESP0 */
KeGetPcr()->TSS->Esp0 = (ULONG_PTR)&TrapFrame->V86Es; KeGetPcr()->TSS->Esp0 = (ULONG_PTR)&TrapFrame->V86Es;
@ -543,7 +543,7 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame)
/* Set VDM TEB */ /* Set VDM TEB */
Thread->Teb = (PTEB)TRAMPOLINE_TEB; Thread->Teb = (PTEB)TRAMPOLINE_TEB;
KeGetPcr()->Tib.Self = (PVOID)TRAMPOLINE_TEB; KeGetPcr()->NtTib.Self = (PVOID)TRAMPOLINE_TEB;
/* Setup VDM TEB descriptor */ /* Setup VDM TEB descriptor */
GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)]; GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)];