VirtualBox

Changeset 93717 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 14, 2022 10:55:27 AM (3 years ago)
Author:
vboxsync
Message:

VMM/TM: Internal timers never have a critical section set, so tmRZTimerGetCritSect doesn't need to do anything special and can just return NULL. bugref:10093 bugref:9943

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/TMAll.cpp

    r93620 r93717  
    141141            return (PPDMCRITSECT)((uintptr_t)pDevInsR0->pvInstanceDataR0 + offCritSect);
    142142    }
    143     return (PPDMCRITSECT)MMHyperR3ToCC(pVM, pTimer->pCritSect);
     143    RT_NOREF(pVM);
     144    Assert(pTimer->pCritSect == NULL);
     145    return NULL;
    144146}
    145147#endif /* VBOX_STRICT && IN_RING0 */
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r93655 r93717  
    30993099    AssertReturn(!pTimer->pCritSect, VERR_ALREADY_EXISTS);
    31003100    AssertReturn(pTimer->enmState == TMTIMERSTATE_STOPPED, VERR_INVALID_STATE);
     3101    AssertReturn(   pTimer->enmType == TMTIMERTYPE_DEV
     3102                 || pTimer->enmType == TMTIMERTYPE_DRV
     3103                 || pTimer->enmType == TMTIMERTYPE_USB,
     3104                 VERR_NOT_SUPPORTED); /* Not supported on internal timers, see tmRZTimerGetCritSect. */
    31013105    LogFlow(("pTimer=%p (%s) pCritSect=%p (%s)\n", pTimer, pTimer->szName, pCritSect, pszName));
    31023106
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