VirtualBox

Ignore:
Timestamp:
Jun 5, 2008 6:08:17 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
31696
Message:

Added iTick to FNTIMER (the timer callback).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/freebsd/timer-r0drv-freebsd.c

    r9352 r9444  
    9797     * Validate flags.
    9898     */
    99     if (!RTTIMER_FLAGS_IS_VALID(fFlags))
     99    if (!RTTIMER_FLAGS_ARE_VALID(fFlags))
    100100        return VERR_INVALID_PARAMETER;
    101101    if (    (fFlags & RTTIMER_FLAGS_CPU_SPECIFIC)
     
    214214    if (    pTimer->iCpu == RTTIMER_FLAGS_CPU_MASK
    215215        ||  (u_int)pTimer->iCpu == curcpu)
    216         pTimer->pfnTimer(pTimer, pTimer->pvUser);
     216        pTimer->pfnTimer(pTimer, pTimer->pvUser, pTimer->iTick);
    217217}
    218218
     
    223223
    224224    /* calculate and set the next timeout */
     225    pTimer->iTick++;
    225226    if (!pTimer->u64NanoInterval)
    226227    {
     
    232233        struct timeval tv;
    233234        const uint64_t u64NanoTS = RTTimeNanoTS();
    234         pTimer->iTick++;
    235235        pTimer->u64NextTS = pTimer->u64StartTS + pTimer->iTick * pTimer->u64NanoInterval;
    236236        if (pTimer->u64NextTS < u64NanoTS)
     
    245245    if (    !pTimer->fSpecificCpu
    246246        ||  pTimer->iCpu == curcpu)
    247         pTimer->pfnTimer(pTimer, pTimer->pvUser);
     247        pTimer->pfnTimer(pTimer, pTimer->pvUser, pTimer->iTick);
    248248    else
    249249        smp_rendezvous(NULL, rtTimerFreeBSDIpiAction, NULL, pvTimer);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette