diff --git a/ntoskrnl/include/internal/ex.h b/ntoskrnl/include/internal/ex.h index 3777a2f57e7..1c730359091 100644 --- a/ntoskrnl/include/internal/ex.h +++ b/ntoskrnl/include/internal/ex.h @@ -878,10 +878,10 @@ ExWaitForUnblockPushLock( ); /*++ - * @name ExInitializePushLock + * @name _ExInitializePushLock * INTERNAL MACRO * - * The ExInitializePushLock macro initializes a PushLock. + * The _ExInitializePushLock macro initializes a PushLock. * * @params PushLock * Pointer to the pushlock which is to be initialized. @@ -893,11 +893,12 @@ ExWaitForUnblockPushLock( *--*/ FORCEINLINE VOID -ExInitializePushLock(IN PULONG_PTR PushLock) +_ExInitializePushLock(IN PULONG_PTR PushLock) { /* Set the value to 0 */ *PushLock = 0; } +#define ExInitializePushLock _ExInitializePushLock /*++ * @name ExAcquirePushLockExclusive diff --git a/ntoskrnl/include/internal/ntoskrnl.h b/ntoskrnl/include/internal/ntoskrnl.h index 8a2cac31df8..41d4843f30e 100644 --- a/ntoskrnl/include/internal/ntoskrnl.h +++ b/ntoskrnl/include/internal/ntoskrnl.h @@ -160,8 +160,8 @@ C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_ #endif #ifdef _M_IX86 -C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST); -C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF); +C_ASSERT(FIELD_OFFSET(KPCR, NtTib.ExceptionList) == KPCR_EXCEPTION_LIST); +C_ASSERT(FIELD_OFFSET(KPCR, SelfPcr) == KPCR_SELF); C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR); C_ASSERT(FIELD_OFFSET(KPCR, IDR) == KPCR_IDR); C_ASSERT(FIELD_OFFSET(KPCR, Irql) == KPCR_IRQL); diff --git a/ntoskrnl/include/internal/trap_x.h b/ntoskrnl/include/internal/trap_x.h index 69ccde543f5..26e39e4484b 100644 --- a/ntoskrnl/include/internal/trap_x.h +++ b/ntoskrnl/include/internal/trap_x.h @@ -108,9 +108,9 @@ KiExitTrapDebugChecks(IN PKTRAP_FRAME TrapFrame, } /* 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); } @@ -391,7 +391,7 @@ KiExitTrap(IN PKTRAP_FRAME TrapFrame, KiExitTrapDebugChecks(TrapFrame, SkipBits); /* Restore the SEH handler chain */ - KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList; + KeGetPcr()->NtTib.ExceptionList = TrapFrame->ExceptionList; /* Check if the previous mode must be restored */ if (__builtin_expect(!SkipBits.SkipPreviousMode, 0)) /* More INTS than SYSCALLs */ @@ -558,7 +558,7 @@ FORCEINLINE KiEnterV86Trap(IN PKTRAP_FRAME TrapFrame) { /* Save exception list */ - TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; + TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList; /* Save DR7 and check for debugging */ TrapFrame->Dr7 = __readdr(7); @@ -577,8 +577,8 @@ FORCEINLINE KiEnterInterruptTrap(IN PKTRAP_FRAME TrapFrame) { /* Save exception list and terminate it */ - TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; - KeGetPcr()->Tib.ExceptionList = EXCEPTION_CHAIN_END; + TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList; + KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END; /* Flush DR7 and check for debugging */ TrapFrame->Dr7 = 0; @@ -600,7 +600,7 @@ FORCEINLINE KiEnterTrap(IN PKTRAP_FRAME TrapFrame) { /* Save exception list */ - TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; + TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList; /* Flush DR7 and check for debugging */ TrapFrame->Dr7 = 0; diff --git a/ntoskrnl/ke/except.c b/ntoskrnl/ke/except.c index 894a96789eb..525fc836863 100644 --- a/ntoskrnl/ke/except.c +++ b/ntoskrnl/ke/except.c @@ -184,7 +184,7 @@ NtRaiseException(IN PEXCEPTION_RECORD ExceptionRecord, /* Set exception list */ #ifdef _M_IX86 - KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList; + KeGetPcr()->NtTib.ExceptionList = TrapFrame->ExceptionList; #endif /* Raise the exception */ diff --git a/ntoskrnl/ke/i386/traphdlr.c b/ntoskrnl/ke/i386/traphdlr.c index 6c777643bd6..f85eb7f878c 100644 --- a/ntoskrnl/ke/i386/traphdlr.c +++ b/ntoskrnl/ke/i386/traphdlr.c @@ -411,7 +411,7 @@ KiTrap02(VOID) TrapFrame.Esi = Tss->Esi; TrapFrame.Edi = Tss->Edi; TrapFrame.SegFs = Tss->Fs; - TrapFrame.ExceptionList = PCR->Tib.ExceptionList; + TrapFrame.ExceptionList = PCR->NtTib.ExceptionList; TrapFrame.PreviousPreviousMode = -1; TrapFrame.Eax = Tss->Eax; TrapFrame.Ecx = Tss->Ecx; @@ -1486,8 +1486,8 @@ KiSystemCallHandler(IN PKTRAP_FRAME TrapFrame, TrapFrame->SegFs = SegFs; /* Save the SEH chain and terminate it for now */ - TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList; - KeGetPcr()->Tib.ExceptionList = EXCEPTION_CHAIN_END; + TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList; + KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END; /* Clear DR7 and check for debugging */ TrapFrame->Dr7 = 0; diff --git a/ntoskrnl/ke/i386/v86vdm.c b/ntoskrnl/ke/i386/v86vdm.c index 1771e5874ad..2d1ff017f14 100644 --- a/ntoskrnl/ke/i386/v86vdm.c +++ b/ntoskrnl/ke/i386/v86vdm.c @@ -471,7 +471,7 @@ KiExitV86Mode(IN PKTRAP_FRAME TrapFrame) /* Restore TEB addresses */ Thread->Teb = V86Frame->ThreadTeb; - KeGetPcr()->Tib.Self = V86Frame->PcrTeb; + KeGetPcr()->NtTib.Self = V86Frame->PcrTeb; /* Setup real TEB descriptor */ GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)]; @@ -505,7 +505,7 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame) /* Save TEB addresses */ V86Frame->ThreadTeb = Thread->Teb; - V86Frame->PcrTeb = KeGetPcr()->Tib.Self; + V86Frame->PcrTeb = KeGetPcr()->NtTib.Self; /* Save return EIP */ TrapFrame->Eip = (ULONG_PTR)Ki386BiosCallReturnAddress; @@ -533,7 +533,7 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame) RtlCopyMemory(NpxFrame, V86Frame->ThreadStack, sizeof(FX_SAVE_AREA)); /* Clear exception list */ - KeGetPcr()->Tib.ExceptionList = EXCEPTION_CHAIN_END; + KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END; /* Set new ESP0 */ KeGetPcr()->TSS->Esp0 = (ULONG_PTR)&TrapFrame->V86Es; @@ -543,7 +543,7 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame) /* Set VDM TEB */ Thread->Teb = (PTEB)TRAMPOLINE_TEB; - KeGetPcr()->Tib.Self = (PVOID)TRAMPOLINE_TEB; + KeGetPcr()->NtTib.Self = (PVOID)TRAMPOLINE_TEB; /* Setup VDM TEB descriptor */ GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)];