VirtualBox

Changeset 11409 in vbox


Ignore:
Timestamp:
Aug 13, 2008 7:35:50 PM (16 years ago)
Author:
vboxsync
Message:

Do not call HGCM after it has been shut down.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r11296 r11409  
    9494    rc = HGCMHostInit ();
    9595    AssertRC(rc);
     96    m_fHGCMActive = true;
    9697#endif /* VBOX_HGCM */
    9798    mu32CredentialsFlags = 0;
     
    575576int VMMDev::hgcmLoadService (const char *pszServiceLibrary, const char *pszServiceName)
    576577{
     578    if (ASMAtomicReadBool(&m_fHGCMActive) == false)
     579    {
     580        return VERR_INVALID_STATE;
     581    }
    577582    return HGCMHostLoad (pszServiceLibrary, pszServiceName);
    578583}
     
    581586                          uint32_t cParms, PVBOXHGCMSVCPARM paParms)
    582587{
     588    if (ASMAtomicReadBool(&m_fHGCMActive) == false)
     589    {
     590        return VERR_INVALID_STATE;
     591    }
    583592    return HGCMHostCall (pszServiceName, u32Function, cParms, paParms);
    584593}
     
    586595void VMMDev::hgcmShutdown (void)
    587596{
     597    ASMAtomicWriteBool(&m_fHGCMActive, false);
    588598    HGCMHostShutdown ();
    589599}
  • trunk/src/VBox/Main/include/VMMDev.h

    r8155 r11409  
    6767    RTSEMEVENT mCredentialsEvent;
    6868    uint32_t mu32CredentialsFlags;
     69   
     70#ifdef VBOX_HGCM
     71    bool m_fHGCMActive;
     72#endif /* VBOX_HGCM */
    6973};
    7074
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