VirtualBox

Changeset 45645 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Apr 19, 2013 1:46:48 PM (12 years ago)
Author:
vboxsync
Message:

VMM/PDMDevHlp: Add helper to get the SUPDrv session handle (intended for the semaphore API)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r44902 r45645  
    670670    LogFlow(("pdmR3DevHlp_TMTimeVirtGetNano: caller='%s'/%d: returns %RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, u64Nano));
    671671    return u64Nano;
     672}
     673
     674
     675/** @interface_method_impl{PDMDEVHLPR3,pfnGetSupDrvSession} */
     676static DECLCALLBACK(PSUPDRVSESSION) pdmR3DevHlp_GetSupDrvSession(PPDMDEVINS pDevIns)
     677{
     678    PDMDEV_ASSERT_DEVINS(pDevIns);
     679    LogFlow(("pdmR3DevHlp_GetSupDrvSession: caller='%s'\n",
     680             pDevIns->pReg->szName, pDevIns->iInstance));
     681
     682    PSUPDRVSESSION pSession = pDevIns->Internal.s.pVMR3->pSession;
     683
     684    LogFlow(("pdmR3DevHlp_GetSupDrvSession: caller='%s'/%d: returns %#p\n", pDevIns->pReg->szName, pDevIns->iInstance, pSession));
     685    return pSession;
    672686}
    673687
     
    34933507    pdmR3DevHlp_TMTimeVirtGetFreq,
    34943508    pdmR3DevHlp_TMTimeVirtGetNano,
     3509    pdmR3DevHlp_GetSupDrvSession,
    34953510    PDM_DEVHLPR3_VERSION /* the end */
    34963511};
     
    36073622    NOREF(iLeaf); NOREF(pEax); NOREF(pEbx); NOREF(pEcx); NOREF(pEdx);
    36083623    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n", pDevIns->pReg->szName, pDevIns->iInstance));
     3624}
     3625
     3626
     3627/** @interface_method_impl{PDMDEVHLPR3,pfnGetSupDrvSession} */
     3628static DECLCALLBACK(PSUPDRVSESSION) pdmR3DevHlp_Untrusted_GetSupDrvSession(PPDMDEVINS pDevIns)
     3629{
     3630    PDMDEV_ASSERT_DEVINS(pDevIns);
     3631    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n", pDevIns->pReg->szName, pDevIns->iInstance));
     3632    return (PSUPDRVSESSION)0;
    36093633}
    36103634
     
    37243748    pdmR3DevHlp_TMTimeVirtGetFreq,
    37253749    pdmR3DevHlp_TMTimeVirtGetNano,
     3750    pdmR3DevHlp_Untrusted_GetSupDrvSession,
    37263751    PDM_DEVHLPR3_VERSION /* the end */
    37273752};
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