VirtualBox

Changeset 47637 in vbox for trunk


Ignore:
Timestamp:
Aug 9, 2013 1:12:19 PM (11 years ago)
Author:
vboxsync
Message:

Runtime/r0drv/nt: fix Windows r0drv timers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp

    r44528 r47637  
    122122    if (    !ASMAtomicUoReadBool(&pTimer->fSuspended)
    123123        &&  pTimer->u32Magic == RTTIMER_MAGIC)
     124    {
     125        if (!pTimer->u64NanoInterval)
     126            ASMAtomicWriteBool(&pTimer->fSuspended, true);
    124127        pTimer->pfnTimer(pTimer, pTimer->pvUser, ++pTimer->aSubTimers[0].iTick);
     128    }
    125129
    126130    NOREF(pDpc); NOREF(SystemArgument1); NOREF(SystemArgument2);
     
    155159    if (    !ASMAtomicUoReadBool(&pTimer->fSuspended)
    156160        &&  pTimer->u32Magic == RTTIMER_MAGIC)
     161    {
     162        if (!pTimer->u64NanoInterval)
     163            ASMAtomicWriteBool(&pTimer->fSuspended, true);
    157164        pTimer->pfnTimer(pTimer, pTimer->pvUser, ++pSubTimer->iTick);
     165    }
    158166
    159167    NOREF(pDpc); NOREF(SystemArgument1); NOREF(SystemArgument2);
     
    200208                KeInsertQueueDpc(&pTimer->aSubTimers[iCpu].NtDpc, 0, 0);
    201209
     210        if (!pTimer->u64NanoInterval)
     211            ASMAtomicWriteBool(&pTimer->fSuspended, true);
    202212        pTimer->pfnTimer(pTimer, pTimer->pvUser, ++pSubTimer->iTick);
    203213    }
     
    238248    LARGE_INTEGER DueTime;
    239249    DueTime.QuadPart = -(int64_t)(u64First / 100); /* Relative, NT time. */
    240     if (DueTime.QuadPart)
     250    if (!DueTime.QuadPart)
    241251        DueTime.QuadPart = -1;
    242252
     253    unsigned cSubTimers = pTimer->fOmniTimer ? pTimer->cSubTimers : 1;
     254    for (unsigned iCpu = 0; iCpu < cSubTimers; iCpu++)
     255        pTimer->aSubTimers[iCpu].iTick = 0;
    243256    ASMAtomicWriteBool(&pTimer->fSuspended, false);
    244257    KeSetTimerEx(&pTimer->NtTimer, DueTime, ulInterval, pMasterDpc);
Note: See TracChangeset for help on using the changeset viewer.

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