Changeset 92872 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Dec 11, 2021 12:29:18 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148819
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp
r92869 r92872 114 114 uint64_t volatile iMasterTick; 115 115 #ifdef RTR0TIMER_NT_MANUAL_RE_ARM 116 /** The desired NT time of the first tick. */ 116 /** The desired NT time of the first tick. 117 * This is not set for one-shot timers, only periodic ones. */ 117 118 uint64_t volatile uNtStartTime; 118 /** The current due time (absolute interrupt time). */ 119 /** The current due time (absolute interrupt time). 120 * This is not set for one-shot timers, only periodic ones. */ 119 121 uint64_t volatile uNtDueTime; 120 122 #endif … … 611 613 /* Update timer state: */ 612 614 #ifdef RTR0TIMER_NT_MANUAL_RE_ARM 613 # ifdef RTR0TIMER_NT_HIGH_RES 614 uint64_t const uNtNow = pTimer->pHighResTimer ? rtTimerNtQueryInterruptTimeHighRes() : rtTimerNtQueryInterruptTime(); 615 if (pTimer->u64NanoInterval > 0) 616 { 617 #ifdef RTR0TIMER_NT_HIGH_RES 618 uint64_t const uNtNow = pTimer->pHighResTimer ? rtTimerNtQueryInterruptTimeHighRes() : rtTimerNtQueryInterruptTime(); 615 619 # else 616 uint64_t const uNtNow = rtTimerNtQueryInterruptTime();620 uint64_t const uNtNow = rtTimerNtQueryInterruptTime(); 617 621 # endif 618 pTimer->uNtStartTime = uNtNow + -DueTime.QuadPart; 619 #endif 620 ASMAtomicWriteS32(&pTimer->cOmniSuspendCountDown, 0); 622 pTimer->uNtStartTime = uNtNow + -DueTime.QuadPart; 623 pTimer->uNtDueTime = pTimer->uNtStartTime; 624 } 625 #endif 626 pTimer->cOmniSuspendCountDown = 0; 621 627 ASMAtomicWriteBool(&pTimer->fSuspended, false); 622 628 … … 678 684 #ifdef RTR0TIMER_NT_HIGH_RES 679 685 if (pTimer->pHighResTimer) 686 { 680 687 g_pfnrtExCancelTimer(pTimer->pHighResTimer, NULL); 688 689 /* We can skip the DPC stuff, unless this is an omni timer or for a specific CPU. */ 690 if (!pTimer->fSpecificCpu && !pTimer->fOmniTimer) 691 return VINF_SUCCESS; 692 } 681 693 else 682 694 #endif … … 941 953 g_pfnrtKeSetImportanceDpc(&pTimer->aSubTimers[0].NtDpc, HighImportance); 942 954 if (pTimer->fSpecificCpu) 943 rc = rtMpNtSetTargetProcessorDpc(&pTimer->aSubTimers[0].NtDpc, (int)pTimer->idCpu);955 rc = rtMpNtSetTargetProcessorDpc(&pTimer->aSubTimers[0].NtDpc, fFlags & RTTIMER_FLAGS_CPU_MASK); 944 956 } 945 957 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.