VirtualBox

Changeset 38195 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 27, 2011 11:21:13 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73159
Message:

rtcLoadExec: Avoid asserting in TMTimerSetFrequencyHint.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevRTC.cpp

    r37526 r38195  
    786786    int period_code = pThis->cmos_data[RTC_REG_A] & 0x0f;
    787787    if (    period_code != 0
    788         &&  (pThis->cmos_data[RTC_REG_B] & REG_B_PIE)) {
     788        &&  (pThis->cmos_data[RTC_REG_B] & REG_B_PIE))
     789    {
    789790        if (period_code <= 2)
    790791            period_code += 7;
    791792        int period = 1 << (period_code - 1);
    792793        LogRel(("RTC: period=%#x (%d) %u Hz (restore)\n", period, period, _32K / period));
     794        PDMCritSectEnter(pThis->pDevInsR3->pCritSectRoR3, VINF_SUCCESS);
    793795        TMTimerSetFrequencyHint(pThis->CTX_SUFF(pPeriodicTimer), _32K / period);
     796        PDMCritSectLeave(pThis->pDevInsR3->pCritSectRoR3);
    794797        pThis->CurLogPeriod  = period;
    795798        pThis->CurHintPeriod = period;
    796     } else {
     799    }
     800    else
     801    {
    797802        LogRel(("RTC: stopped the periodic timer (restore)\n"));
    798803        pThis->CurLogPeriod  = 0;
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