/reactos/ntoskrnl/ke/ |
H A D | time.c | 41 PKPRCB Prcb, in KiCheckForTimerExpiration() argument 73 if (Prcb->SkipTick) in KeUpdateSystemTime() 76 Prcb->SkipTick = FALSE; in KeUpdateSystemTime() 147 if (Prcb->SkipTick) in KeUpdateRunTime() 155 Prcb->InterruptCount++; in KeUpdateRunTime() 165 Prcb->UserTime++; in KeUpdateRunTime() 171 Prcb->KernelTime++; in KeUpdateRunTime() 185 Prcb->DpcTime++; in KeUpdateRunTime() 208 Prcb->DpcRequestRate = ((Prcb->DpcData[0].DpcCount - Prcb->DpcLastCount) + in KeUpdateRunTime() 210 Prcb->DpcLastCount = Prcb->DpcData[0].DpcCount; in KeUpdateRunTime() [all …]
|
H A D | thrdschd.c | 32 KiIdleSchedule(IN PKPRCB Prcb) in KiIdleSchedule() argument 81 PKPRCB Prcb; in KiDeferredReadyThread() local 234 KiAcquirePrcbLock(Prcb); in KiDeferredReadyThread() 323 KiReleasePrcbLock(Prcb); in KiDeferredReadyThread() 356 IN PKPRCB Prcb) in KiSwapThread() argument 365 KiAcquirePrcbLock(Prcb); in KiSwapThread() 400 KiReleasePrcbLock(Prcb); in KiSwapThread() 514 PKPRCB Prcb; in KiSetPriorityThread() local 748 PKPRCB Prcb; in NtYieldExecution() local 765 if (Prcb->ReadySummary) in NtYieldExecution() [all …]
|
H A D | krnlinit.c | 187 KiInitSpinLocks(IN PKPRCB Prcb, in KiInitSpinLocks() argument 193 Prcb->QueueIndex = 1; in KiInitSpinLocks() 194 Prcb->ReadySummary = 0; in KiInitSpinLocks() 195 Prcb->DeferredReadyListHead.Next = NULL; in KiInitSpinLocks() 205 Prcb->DpcData[DPC_NORMAL].DpcQueueDepth = 0; in KiInitSpinLocks() 206 Prcb->DpcData[DPC_NORMAL].DpcCount = 0; in KiInitSpinLocks() 207 Prcb->DpcRoutineActive = FALSE; in KiInitSpinLocks() 209 Prcb->MinimumDpcRate = KiMinimumDpcRate; in KiInitSpinLocks() 211 KeInitializeDpc(&Prcb->CallDpc, NULL, NULL); in KiInitSpinLocks() 216 InitializeListHead(&Prcb->WaitListHead); in KiInitSpinLocks() [all …]
|
H A D | dpc.c | 481 KiAcquirePrcbLock(Prcb); in KiQuantumEnd() 525 if (!Prcb->NextThread) in KiQuantumEnd() 540 Prcb->NextThread = NULL; in KiQuantumEnd() 562 KiRetireDpcList(IN PKPRCB Prcb) in KiRetireDpcList() argument 585 if (Prcb->TimerRequest) in KiRetireDpcList() 730 PKPRCB Prcb, CurrentPrcb; in KeInsertQueueDpc() local 750 Prcb = CurrentPrcb; in KeInsertQueueDpc() 751 Cpu = Prcb->Number; in KeInsertQueueDpc() 798 if (!(Prcb->DpcThreadActive) && !(Prcb->DpcThreadRequested)) in KeInsertQueueDpc() 807 if (!(Prcb->DpcRoutineActive) && !(Prcb->DpcInterruptRequested)) in KeInsertQueueDpc() [all …]
|
H A D | ipi.c | 80 PKPRCB Prcb; 88 Prcb = KiProcessorBlock[i]; 108 PKPRCB Prcb, CurrentPrcb; 124 Prcb = KiProcessorBlock[i]; 154 PKPRCB Prcb; in KiIpiServiceRoutine() local 157 Prcb = KeGetCurrentPrcb(); in KiIpiServiceRoutine() 166 Prcb->DpcInterruptRequested = TRUE; in KiIpiServiceRoutine() 180 … ((VOID (NTAPI*)(PVOID))(Prcb->SignalDone->WorkerRoutine))(Prcb->SignalDone->CurrentPacket[0]); in KiIpiServiceRoutine() 206 PKPRCB Prcb = KeGetCurrentPrcb(); in KeIpiGenericCall() local 219 Affinity &= ~Prcb->SetMember; in KeIpiGenericCall() [all …]
|
H A D | balmgr.c | 32 PKPRCB Prcb = KiProcessorBlock[ScanIndex]; in KiScanReadyQueues() local 33 ULONG Index = Prcb->QueueIndex; in KiScanReadyQueues() 42 KiAcquirePrcbLock(Prcb); in KiScanReadyQueues() 44 Summary = Prcb->ReadySummary & ((1 << THREAD_BOOST_PRIORITY) - 2); in KiScanReadyQueues() 57 ASSERT(!IsListEmpty(&Prcb->DispatcherReadyListHead[Index])); in KiScanReadyQueues() 61 ListHead = &Prcb->DispatcherReadyListHead[Index]; in KiScanReadyQueues() 76 ASSERT((Prcb->ReadySummary & PRIORITY_MASK(Index))); in KiScanReadyQueues() 80 Prcb->ReadySummary ^= PRIORITY_MASK(Index); in KiScanReadyQueues() 112 KiReleasePrcbLock(Prcb); in KiScanReadyQueues() 119 Prcb->QueueIndex = 1; in KiScanReadyQueues() [all …]
|
/reactos/ntoskrnl/ke/arm/ |
H A D | kiinit.c | 90 Prcb->MultiThreadSetMaster = Prcb; in KiInitializeKernel() 136 Prcb->NextThread = NULL; in KiInitializeKernel() 163 KiAcquirePrcbLock(Prcb); in KiInitializeKernel() 165 KiReleasePrcbLock(Prcb); in KiInitializeKernel() 169 LoaderBlock->Prcb = 0; in KiInitializeKernel() 202 Pcr->Prcb.BuildType = 0; in KiInitializePcr() 225 Pcr->Prcb.MultiThreadProcessorSet = Pcr->Prcb.SetMember; in KiInitializePcr() 257 Pcr->Prcb.Cache[GlobalDcache] = Pcr->Prcb.Cache[FirstLevelDcache]; in KiInitializePcr() 262 Pcr->Prcb.Cache[GlobalDcache] = Pcr->Prcb.Cache[SecondLevelDcache]; in KiInitializePcr() 272 Pcr->Prcb.Cache[GlobalIcache] = Pcr->Prcb.Cache[FirstLevelIcache]; in KiInitializePcr() [all …]
|
H A D | thrdini.c | 176 KiRetireDpcList(Prcb); in KiIdleLoop() 180 if (Prcb->NextThread) in KiIdleLoop() 212 Prcb->PowerState.IdleFunction(&Prcb->PowerState); in KiIdleLoop() 308 PKPRCB Prcb = &Pcr->Prcb; in KiDispatchInterrupt() local 316 (Prcb->TimerRequest) || in KiDispatchInterrupt() 322 KiRetireDpcList(Prcb); in KiDispatchInterrupt() 329 if (Prcb->QuantumEnd) in KiDispatchInterrupt() 332 Prcb->QuantumEnd = FALSE; in KiDispatchInterrupt() 335 else if (Prcb->NextThread) in KiDispatchInterrupt() 338 KiAcquirePrcbLock(Prcb); in KiDispatchInterrupt() [all …]
|
H A D | trapc.c | 23 PKPRCB Prcb = Pcr->Prcb; 44 (Prcb->TimerRequest) || 55 KiRetireDpcList(Prcb); 61 if (Prcb->NextThread) 127 PKPRCB Prcb = Pcr->Prcb; 191 if (Prcb->DpcRoutineActive) 274 PKPRCB Prcb; 284 Prcb = Pcr->Prcb; 297 KiRetireDpcList(Prcb); 308 if (Prcb->QuantumEnd) [all …]
|
/reactos/ntoskrnl/ke/amd64/ |
H A D | krnlinit.c | 36 IN PKPRCB Prcb) in KiCalculateCpuFrequency() argument 152 Prcb->ParentNode->ProcessorMask |= Prcb->SetMember; in KiSystemStartupBootStack() 155 PoInitializePrcb(Prcb); in KiSystemStartupBootStack() 164 KiInitSpinLocks(Prcb, Prcb->Number); in KiSystemStartupBootStack() 168 Prcb->NextThread = NULL; in KiSystemStartupBootStack() 178 if (Prcb->Number == 0) in KiSystemStartupBootStack() 199 KiAcquirePrcbLock(Prcb); in KiSystemStartupBootStack() 200 if (!Prcb->NextThread) KiIdleSummary |= (ULONG_PTR)1 << Prcb->Number; in KiSystemStartupBootStack() 201 KiReleasePrcbLock(Prcb); in KiSystemStartupBootStack() 205 LoaderBlock->Prcb = 0; in KiSystemStartupBootStack() [all …]
|
H A D | kiinit.c | 106 Pcr->CurrentPrcb = &Pcr->Prcb; in KiInitializePcr() 117 Pcr->Prcb.BuildType = 0; in KiInitializePcr() 139 Pcr->Prcb.DpcStack = DpcStack; in KiInitializePcr() 142 Pcr->Prcb.MultiThreadProcessorSet = Pcr->Prcb.SetMember; in KiInitializePcr() 319 LoaderBlock->Prcb = (ULONG_PTR)&KiInitialPcr.Prcb; in KiInitializeP0BootStructures() 346 IN PKPRCB Prcb, in KiInitializeKernelMachineDependent() argument 352 KeI386CpuType = Prcb->CpuType; in KiInitializeKernelMachineDependent() 356 if (Prcb->CpuID) in KiInitializeKernelMachineDependent() 359 FeatureBits = Prcb->FeatureBits | (ULONG64)Prcb->FeatureBitsHigh << 32; in KiInitializeKernelMachineDependent() 438 KiReportCpuFeatures(Prcb); in KiInitializeKernelMachineDependent() [all …]
|
H A D | traphandler.c | 17 PKPRCB Prcb, 24 _Requires_lock_not_held_(Prcb->PrcbLock) 29 PKPRCB Prcb = KeGetCurrentPrcb(); in KiDpcInterruptHandler() local 41 (Prcb->TimerRequest) || in KiDpcInterruptHandler() 45 KiRetireDpcListInDpcStack(Prcb, Prcb->DpcStack); in KiDpcInterruptHandler() 52 if (Prcb->QuantumEnd) in KiDpcInterruptHandler() 55 Prcb->QuantumEnd = FALSE; in KiDpcInterruptHandler() 58 else if (Prcb->NextThread) in KiDpcInterruptHandler() 61 KiAcquirePrcbLock(Prcb); in KiDpcInterruptHandler() 65 NewThread = Prcb->NextThread; in KiDpcInterruptHandler() [all …]
|
H A D | stubs.c | 86 Pcr->Prcb.RspBase += StackOffset; in KiSwitchKernelStack() 101 PKPRCB Prcb = KeGetCurrentPrcb(); in KiIdleLoop() local 114 if ((Prcb->DpcData[0].DpcQueueDepth) || in KiIdleLoop() 115 (Prcb->TimerRequest) || in KiIdleLoop() 122 KiRetireDpcList(Prcb); in KiIdleLoop() 126 if (Prcb->NextThread) in KiIdleLoop() 132 OldThread = Prcb->CurrentThread; in KiIdleLoop() 133 NewThread = Prcb->NextThread; in KiIdleLoop() 136 Prcb->NextThread = NULL; in KiIdleLoop() 137 Prcb->CurrentThread = NewThread; in KiIdleLoop() [all …]
|
H A D | cpu.c | 61 PKPRCB Prcb = KeGetCurrentPrcb(); in KiGetCpuVendor() local 71 Prcb->VendorString[12] = 0; in KiGetCpuVendor() 76 Prcb->CpuVendor = CPU_INTEL; in KiGetCpuVendor() 80 Prcb->CpuVendor = CPU_AMD; in KiGetCpuVendor() 85 Prcb->CpuVendor = CPU_VIA; in KiGetCpuVendor() 91 Prcb->CpuVendor = CPU_UNKNOWN; in KiGetCpuVendor() 94 return Prcb->CpuVendor; in KiGetCpuVendor() 167 PKPRCB Prcb = KeGetCurrentPrcb(); in KiGetFeatureBits() local 175 Vendor = Prcb->CpuVendor; in KiGetFeatureBits() 349 KiReportCpuFeatures(IN PKPRCB Prcb) in KiReportCpuFeatures() argument [all …]
|
/reactos/ntoskrnl/ke/i386/ |
H A D | thrdini.c | 55 IN PKPRCB Prcb, 287 if (Prcb->NextThread) in KiIdleLoop() 319 Prcb->PowerState.IdleFunction(&Prcb->PowerState); in KiIdleLoop() 463 PKPRCB Prcb = &Pcr->PrcbData; in KiDispatchInterrupt() local 472 (Prcb->TimerRequest) || in KiDispatchInterrupt() 480 KiRetireDpcListInDpcStack(Prcb, Prcb->DpcStack); in KiDispatchInterrupt() 490 if (Prcb->QuantumEnd) in KiDispatchInterrupt() 493 Prcb->QuantumEnd = FALSE; in KiDispatchInterrupt() 496 else if (Prcb->NextThread) in KiDispatchInterrupt() 499 KiAcquirePrcbLock(Prcb); in KiDispatchInterrupt() [all …]
|
H A D | kiinit.c | 303 Pcr->Prcb = &Pcr->PrcbData; in KiInitializePcr() 383 if (Prcb->CpuType == 3) in KiVerifyCpuFeatures() 444 PoInitializePrcb(Prcb); in KiInitializeKernel() 497 Prcb->ParentNode->ProcessorMask |= Prcb->SetMember; in KiInitializeKernel() 507 if (Prcb->CpuID) KeProcessorRevision = Prcb->CpuStep; in KiInitializeKernel() 512 Prcb->MultiThreadSetMaster = Prcb; in KiInitializeKernel() 577 Prcb->NextThread = NULL; in KiInitializeKernel() 619 KiAcquirePrcbLock(Prcb); in KiInitializeKernel() 621 KiReleasePrcbLock(Prcb); in KiInitializeKernel() 625 LoaderBlock->Prcb = 0; in KiInitializeKernel() [all …]
|
H A D | cpu.c | 112 PKPRCB Prcb = KeGetCurrentPrcb(); in KiGetCpuVendor() local 122 Prcb->VendorString[12] = 0; in KiGetCpuVendor() 216 PKPRCB Prcb = KeGetCurrentPrcb(); in KiGetFeatureBits() local 242 if (Prcb->CpuType == 6) in KiGetFeatureBits() 249 else if (Prcb->CpuType == 5) in KiGetFeatureBits() 264 if ((Prcb->CpuType < 6) || in KiGetFeatureBits() 265 ((Prcb->CpuType == 6) && (Prcb->CpuStep < 0x0303))) in KiGetFeatureBits() 326 if (Prcb->CpuType == 6 && in KiGetFeatureBits() 327 Prcb->CpuStep <= 1) in KiGetFeatureBits() 1161 PKPRCB Prcb = KeGetCurrentPrcb(); in KiSaveProcessorState() local [all …]
|
/reactos/hal/halarm/generic/ |
H A D | halinit.c | 46 PKPRCB Prcb = KeGetCurrentPrcb(); in HalInitSystem() local 56 if (!(Prcb->BuildType & PRCB_BUILD_DEBUG)) in HalInitSystem() 59 KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, PRCB_BUILD_DEBUG, 0); in HalInitSystem() 63 if (Prcb->BuildType & PRCB_BUILD_DEBUG) in HalInitSystem() 66 KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 0, 0); in HalInitSystem() 72 if (Prcb->BuildType & PRCB_BUILD_UNIPROCESSOR) in HalInitSystem() 75 KeBugCheckEx(MISMATCHED_HAL, 2, Prcb->BuildType, 0, 0); in HalInitSystem() 80 if (Prcb->MajorVersion != PRCB_MAJOR_VERSION) in HalInitSystem() 83 KeBugCheckEx(MISMATCHED_HAL, 1, Prcb->MajorVersion, PRCB_MAJOR_VERSION, 0); in HalInitSystem()
|
/reactos/ntoskrnl/config/i386/ |
H A D | cmhardwr.c | 242 PKPRCB Prcb; in CmpInitializeMachineDependentConfiguration() local 352 Prcb = KiProcessorBlock[i]; in CmpInitializeMachineDependentConfiguration() 364 if (!Prcb->CpuID) in CmpInitializeMachineDependentConfiguration() 369 Prcb->CpuType, in CmpInitializeMachineDependentConfiguration() 379 Prcb->CpuType, in CmpInitializeMachineDependentConfiguration() 404 Prcb->CpuType, in CmpInitializeMachineDependentConfiguration() 405 (Prcb->CpuStep >> 8), in CmpInitializeMachineDependentConfiguration() 406 Prcb->CpuStep & 0xff); in CmpInitializeMachineDependentConfiguration() 466 if (!Prcb->CpuID) in CmpInitializeMachineDependentConfiguration() 551 if (Prcb->FeatureBits) in CmpInitializeMachineDependentConfiguration() [all …]
|
/reactos/ntoskrnl/kd64/amd64/ |
H A D | kdx64.c | 25 PKPRCB Prcb; in KdpGetStateChange() local 47 Prcb = KiProcessorBlock[i]; in KdpGetStateChange() 48 Prcb->ProcessorState.SpecialRegisters.KernelDr7 = in KdpGetStateChange() 50 Prcb->ProcessorState.SpecialRegisters.KernelDr6 = 0; in KdpGetStateChange() 69 PKPRCB Prcb = KeGetCurrentPrcb(); in KdpSetContextState() local 169 PKPRCB Prcb = KiProcessorBlock[Processor]; in KdpSysReadControlSpace() local 170 PKIPCR Pcr = CONTAINING_RECORD(Prcb, KIPCR, Prcb); in KdpSysReadControlSpace() 182 ControlStart = &Prcb; in KdpSysReadControlSpace() 188 ControlStart = &Prcb->ProcessorState.SpecialRegisters; in KdpSysReadControlSpace() 194 ControlStart = &Prcb->CurrentThread; in KdpSysReadControlSpace() [all …]
|
/reactos/ntoskrnl/include/internal/ |
H A D | ke_x.h | 220 KiAcquirePrcbLock(IN PKPRCB Prcb) in KiAcquirePrcbLock() argument 222 UNREFERENCED_PARAMETER(Prcb); in KiAcquirePrcbLock() 230 KiReleasePrcbLock(IN PKPRCB Prcb) in KiReleasePrcbLock() argument 232 UNREFERENCED_PARAMETER(Prcb); in KiReleasePrcbLock() 271 UNREFERENCED_PARAMETER(Prcb); in KiCheckDeferredReadyList() 440 KiAcquirePrcbLock(IN PKPRCB Prcb) in KiAcquirePrcbLock() argument 456 } while (Prcb->PrcbLock); in KiAcquirePrcbLock() 469 KiReleasePrcbLock(IN PKPRCB Prcb) in KiReleasePrcbLock() argument 473 ASSERT(Prcb->PrcbLock != 0); in KiReleasePrcbLock() 548 if (Prcb->DeferredReadyListHead.Next) KiProcessDeferredReadyList(Prcb); in KiCheckDeferredReadyList() [all …]
|
/reactos/ntoskrnl/io/iomgr/ |
H A D | iomgr.c | 98 PKPRCB Prcb; in IopInitLookasideLists() local 149 Prcb = KiProcessorBlock[i]; in IopInitLookasideLists() 150 DPRINT("Setting up lookaside for CPU: %x, PRCB: %p\n", i, Prcb); in IopInitLookasideLists() 153 Prcb->LookasideIrpFloat = 512 / KeNumberProcessors; in IopInitLookasideLists() 166 Prcb->PPLookasideList[LookasideCompletionList].P = CurrentList; in IopInitLookasideLists() 176 Prcb->PPLookasideList[LookasideLargeIrpList].L = &IoLargeIrpLookaside; in IopInitLookasideLists() 186 Prcb->PPLookasideList[LookasideLargeIrpList].P = CurrentList; in IopInitLookasideLists() 206 Prcb->PPLookasideList[LookasideSmallIrpList].P = CurrentList; in IopInitLookasideLists() 216 Prcb->PPLookasideList[LookasideMdlList].L = &IopMdlLookasideList; in IopInitLookasideLists() 227 Prcb->PPLookasideList[LookasideMdlList].P = CurrentList; in IopInitLookasideLists() [all …]
|
/reactos/ntoskrnl/include/internal/i386/ |
H A D | trap_x.h | 170 PKPRCB Prcb = KeGetCurrentPrcb(); in KiExitTrapDebugChecks() local 171 CheckDr(0, Prcb->ProcessorState.SpecialRegisters.KernelDr0); in KiExitTrapDebugChecks() 172 CheckDr(1, Prcb->ProcessorState.SpecialRegisters.KernelDr1); in KiExitTrapDebugChecks() 173 CheckDr(2, Prcb->ProcessorState.SpecialRegisters.KernelDr2); in KiExitTrapDebugChecks() 254 PKPRCB Prcb = KeGetCurrentPrcb(); in KiHandleDebugRegistersOnTrapEntry() local 268 __writedr(0, Prcb->ProcessorState.SpecialRegisters.KernelDr0); in KiHandleDebugRegistersOnTrapEntry() 269 __writedr(1, Prcb->ProcessorState.SpecialRegisters.KernelDr1); in KiHandleDebugRegistersOnTrapEntry() 270 __writedr(2, Prcb->ProcessorState.SpecialRegisters.KernelDr2); in KiHandleDebugRegistersOnTrapEntry() 271 __writedr(3, Prcb->ProcessorState.SpecialRegisters.KernelDr3); in KiHandleDebugRegistersOnTrapEntry() 272 __writedr(6, Prcb->ProcessorState.SpecialRegisters.KernelDr6); in KiHandleDebugRegistersOnTrapEntry() [all …]
|
/reactos/ntoskrnl/ex/ |
H A D | sysinfo.c | 326 PKPRCB Prcb; in ExGetCurrentProcessorCpuUsage() local 333 TotalTime = Prcb->KernelTime + Prcb->UserTime; in ExGetCurrentProcessorCpuUsage() 349 PKPRCB Prcb; in ExGetCurrentProcessorCounts() local 354 *KernelAndUserTime = Prcb->KernelTime + Prcb->UserTime; in ExGetCurrentProcessorCounts() 680 PKPRCB Prcb; in QSI_DEF() local 707 if (Prcb) in QSI_DEF() 812 if (Prcb) in QSI_DEF() 1172 PKPRCB Prcb; in QSI_DEF() local 1528 PKPRCB Prcb; in QSI_DEF() local 1781 PKPRCB Prcb; in QSI_DEF() local [all …]
|
/reactos/ntoskrnl/ob/ |
H A D | obinit.c | 139 PKPRCB Prcb; in ObInit2() local 146 Prcb = KiProcessorBlock[(int)i]; in ObInit2() 149 Prcb->PPLookasideList[LookasideCreateInfoList].L = &ObpCreateInfoLookasideList; in ObInit2() 170 Prcb->PPLookasideList[LookasideCreateInfoList].P = CurrentList; in ObInit2() 173 Prcb->PPLookasideList[LookasideNameBufferList].L = &ObpNameBufferLookasideList; in ObInit2() 194 Prcb->PPLookasideList[LookasideNameBufferList].P = CurrentList; in ObInit2() 210 PKPRCB Prcb = KeGetCurrentPrcb(); in ObInitSystem() local 238 Prcb->PPLookasideList[LookasideCreateInfoList].L = &ObpCreateInfoLookasideList; in ObInitSystem() 239 Prcb->PPLookasideList[LookasideCreateInfoList].P = &ObpCreateInfoLookasideList; in ObInitSystem() 240 Prcb->PPLookasideList[LookasideNameBufferList].L = &ObpNameBufferLookasideList; in ObInitSystem() [all …]
|