Lines Matching refs:pQueue

320  * @param   pQueue  The timer queue the timer belongs to.
326 DECLINLINE(void) tmTimerLinkSchedule(PTMTIMERQUEUE pQueue, PTMTIMER pTimer)
329 const int32_t offHeadNew = (intptr_t)pTimer - (intptr_t)pQueue;
333 offHead = pQueue->offSchedule;
335 pTimer->offScheduleNext = ((intptr_t)pQueue + offHead) - (intptr_t)pTimer;
338 } while (!ASMAtomicCmpXchgS32(&pQueue->offSchedule, offHeadNew, offHead));
365 * @param pQueue The queue.
371 DECL_FORCE_INLINE(void) tmTimerQueueLinkActive(PTMTIMERQUEUE pQueue, PTMTIMER pTimer, uint64_t u64Expire)
377 PTMTIMER pCur = TMTIMER_GET_HEAD(pQueue);
391 TMTIMER_SET_HEAD(pQueue, pTimer);
392 ASMAtomicWriteU64(&pQueue->u64Expire, u64Expire);
409 TMTIMER_SET_HEAD(pQueue, pTimer);
410 ASMAtomicWriteU64(&pQueue->u64Expire, u64Expire);
420 * @param pQueue The timer queue.
425 DECLINLINE(void) tmTimerQueueScheduleOne(PTMTIMERQUEUE pQueue, PTMTIMER pTimer)
427 Assert(pQueue->enmClock != TMCLOCK_VIRTUAL_SYNC);
444 tmTimerQueueUnlinkActive(pQueue, pTimer);
454 tmTimerQueueLinkActive(pQueue, pTimer, pTimer->u64Expire);
463 tmTimerQueueUnlinkActive(pQueue, pTimer);
487 tmTimerLinkSchedule(pQueue, pTimer);
512 * @param pQueue The queue to schedule.
516 void tmTimerQueueSchedule(PVM pVM, PTMTIMERQUEUE pQueue)
524 int32_t offNext = ASMAtomicXchgS32(&pQueue->offSchedule, 0);
525 Log2(("tmTimerQueueSchedule: pQueue=%p:{.enmClock=%d, offNext=%RI32, .u64Expired=%'RU64}\n", pQueue, pQueue->enmClock, offNext, pQueue->u64Expire));
528 PTMTIMER pNext = (PTMTIMER)((intptr_t)pQueue + offNext);
543 tmTimerQueueScheduleOne(pQueue, pTimer);
546 Log2(("tmTimerQueueSchedule: u64Expired=%'RU64\n", pQueue->u64Expire));
568 PTMTIMERQUEUE pQueue = &pVM->tm.s.CTX_SUFF(paTimerQueues)[i];
569 Assert((int)pQueue->enmClock == i);
570 if (pQueue->enmClock == TMCLOCK_VIRTUAL_SYNC)
577 for (PTMTIMER pCur = TMTIMER_GET_HEAD(pQueue); pCur; pPrev = pCur, pCur = TMTIMER_GET_NEXT(pCur))
1170 PTMTIMERQUEUE pQueue = &pVM->tm.s.CTX_SUFF(paTimerQueues)[TMCLOCK_VIRTUAL_SYNC];
1185 tmTimerQueueLinkActive(pQueue, pTimer, u64Expire);
1191 tmTimerQueueUnlinkActive(pQueue, pTimer);
1193 tmTimerQueueLinkActive(pQueue, pTimer, u64Expire);
1476 PTMTIMERQUEUE pQueue = &pVM->tm.s.CTX_SUFF(paTimerQueues)[TMCLOCK_VIRTUAL_SYNC];
1488 tmTimerQueueLinkActive(pQueue, pTimer, u64Expire);
1494 tmTimerQueueUnlinkActive(pQueue, pTimer);
1496 tmTimerQueueLinkActive(pQueue, pTimer, u64Expire);
1805 PTMTIMERQUEUE pQueue = &pVM->tm.s.CTX_SUFF(paTimerQueues)[TMCLOCK_VIRTUAL_SYNC];
1810 tmTimerQueueUnlinkActive(pQueue, pTimer);
2481 PTMTIMERQUEUE pQueue = &pVM->tm.s.CTX_SUFF(paTimerQueues)[i];
2482 for (PTMTIMER pCur = TMTIMER_GET_HEAD(pQueue); pCur; pCur = TMTIMER_GET_NEXT(pCur))