VirtualBox

Changeset 23015 in vbox


Ignore:
Timestamp:
Sep 14, 2009 5:00:11 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52311
Message:

VMM,Main,Devices,VBoxBFE: VMReqCallVoid[U] -> VMR3ReqCallVoidWait. Retired the two old APIs.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmapi.h

    r23010 r23015  
    366366VMMR3DECL(int)  VMR3SetRuntimeErrorWorker(PVM pVM);
    367367VMMR3DECL(int)  VMR3ReqCall(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    368 VMMR3DECL(int)  VMR3ReqCallVoidU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    369 VMMR3DECL(int)  VMR3ReqCallVoid(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    370368VMMR3DECL(int)  VMR3ReqCallEx(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
    371369VMMR3DECL(int)  VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r23011 r23015  
    246246    else
    247247    {
    248         int rc;
    249         PVMREQ pReq;
    250 
    251         rc = VMR3ReqCallVoid (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    252                               (PFNRT) vmmdevCtlGuestFilterMask_EMT,
    253                               3, pVMMDevState, u32OrMask, u32NotMask);
     248        int rc = VMR3ReqCallVoidWait (pVM, VMCPUID_ANY, (PFNRT) vmmdevCtlGuestFilterMask_EMT,
     249                                      3, pVMMDevState, u32OrMask, u32NotMask);
    254250        AssertReleaseRC (rc);
    255         VMR3ReqFree (pReq);
    256251    }
    257252}
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp

    r22277 r23015  
    349349    Assert(pVM);
    350350    /* pdm.h says that this has to be called from the EMT thread */
    351     PVMREQ pReq;
    352     int rcVBox = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    353                                  (PFNRT)VMDisplay::doInvalidateAndUpdate, 1, mpDrv);
    354     if (RT_SUCCESS(rcVBox))
    355         VMR3ReqFree(pReq);
    356 
     351    int rcVBox = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY,
     352                                     (PFNRT)VMDisplay::doInvalidateAndUpdate, 1, mpDrv);
    357353    if (RT_FAILURE(rcVBox))
    358354        rc = E_FAIL;
     
    11891185    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0"))
    11901186        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
    1191     AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 
     1187    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
    11921188                    ("Configuration error: Not possible to attach anything to this driver!\n"),
    11931189                    VERR_PDM_DRVINS_NO_ATTACH);
     
    12801276    NULL,
    12811277    /* pfnDetach */
    1282     NULL, 
     1278    NULL,
    12831279    /* pfnPowerOff */
    1284     NULL, 
     1280    NULL,
    12851281    /* pfnSoftReset */
    12861282    NULL,
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r23012 r23015  
    16941694
    16951695    /* pdm.h says that this has to be called from the EMT thread */
    1696     PVMREQ pReq;
    1697     int rcVBox = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    1698         (PFNRT)mpDrv->pUpPort->pfnUpdateDisplayAll, 1, mpDrv->pUpPort);
    1699     if (RT_SUCCESS(rcVBox))
    1700         VMR3ReqFree(pReq);
    1701 
     1696    int rcVBox = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY,
     1697                                     (PFNRT)mpDrv->pUpPort->pfnUpdateDisplayAll, 1, mpDrv->pUpPort);
    17021698    alock.enter ();
    17031699
  • trunk/src/VBox/VMM/DBGFInfo.cpp

    r20152 r23015  
    741741        AssertRC(rc);
    742742        rc = VINF_SUCCESS;
    743         PVMREQ pReq = NULL;
    744743        switch (Info.enmType)
    745744        {
    746745            case DBGFINFOTYPE_DEV:
    747746                if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
    748                     rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Dev.pfnHandler, 3, Info.u.Dev.pDevIns, pHlp, pszArgs);
     747                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Dev.pfnHandler, 3, Info.u.Dev.pDevIns, pHlp, pszArgs);
    749748                else
    750749                    Info.u.Dev.pfnHandler(Info.u.Dev.pDevIns, pHlp, pszArgs);
     
    753752            case DBGFINFOTYPE_DRV:
    754753                if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
    755                     rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Drv.pfnHandler, 3, Info.u.Drv.pDrvIns, pHlp, pszArgs);
     754                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Drv.pfnHandler, 3, Info.u.Drv.pDrvIns, pHlp, pszArgs);
    756755                else
    757756                    Info.u.Drv.pfnHandler(Info.u.Drv.pDrvIns, pHlp, pszArgs);
     
    760759            case DBGFINFOTYPE_INT:
    761760                if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
    762                     rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Int.pfnHandler, 3, pVM, pHlp, pszArgs);
     761                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Int.pfnHandler, 3, pVM, pHlp, pszArgs);
    763762                else
    764763                    Info.u.Int.pfnHandler(pVM, pHlp, pszArgs);
     
    767766            case DBGFINFOTYPE_EXT:
    768767                if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
    769                     rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Ext.pfnHandler, 3, Info.u.Ext.pvUser, pHlp, pszArgs);
     768                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Ext.pfnHandler, 3, Info.u.Ext.pvUser, pHlp, pszArgs);
    770769                else
    771770                    Info.u.Ext.pfnHandler(Info.u.Ext.pvUser, pHlp, pszArgs);
     
    777776                break;
    778777        }
    779         VMR3ReqFree(pReq);
    780778    }
    781779    else
  • trunk/src/VBox/VMM/DBGFOS.cpp

    r23011 r23015  
    446446     */
    447447    void *pvIf = NULL;
    448     PVMREQ pReq;
    449     VMR3ReqCallVoidU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf);
    450     VMR3ReqFree(pReq);
    451 
     448    VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf);
    452449    return pvIf;
    453450}
  • trunk/src/VBox/VMM/VMReq.cpp

    r23014 r23015  
    7979    va_start(va, cArgs);
    8080    int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, ppReq, cMillies, VMREQFLAGS_VBOX_STATUS, pfnFunction, cArgs, va);
    81     va_end(va);
    82     return rc;
    83 }
    84 
    85 
    86 /**
    87  * Allocate and queue a call request to a void function.
    88  *
    89  * If it's desired to poll on the completion of the request set cMillies
    90  * to 0 and use VMR3ReqWait() to check for completation. In the other case
    91  * use RT_INDEFINITE_WAIT.
    92  * The returned request packet must be freed using VMR3ReqFree().
    93  *
    94  * @returns VBox status code.
    95  *          Will not return VERR_INTERRUPTED.
    96  * @returns VERR_TIMEOUT if cMillies was reached without the packet being completed.
    97  *
    98  * @param   pUVM            Pointer to the user mode VM structure.
    99  * @param   idDstCpu        The destination CPU(s). Either a specific CPU ID or
    100  *                          one of the following special values:
    101  *                              VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE.
    102  * @param   ppReq           Where to store the pointer to the request.
    103  *                          This will be NULL or a valid request pointer not matter what happends.
    104  * @param   cMillies        Number of milliseconds to wait for the request to
    105  *                          be completed. Use RT_INDEFINITE_WAIT to only
    106  *                          wait till it's completed.
    107  * @param   pfnFunction     Pointer to the function to call.
    108  * @param   cArgs           Number of arguments following in the ellipsis.
    109  *                          Not possible to pass 64-bit arguments!
    110  * @param   ...             Function arguments.
    111  */
    112 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    113 {
    114     va_list va;
    115     va_start(va, cArgs);
    116     int rc = VMR3ReqCallVU(pUVM, idDstCpu, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);
    117     va_end(va);
    118     return rc;
    119 }
    120 
    121 
    122 /**
    123  * Allocate and queue a call request to a void function.
    124  *
    125  * If it's desired to poll on the completion of the request set cMillies
    126  * to 0 and use VMR3ReqWait() to check for completation. In the other case
    127  * use RT_INDEFINITE_WAIT.
    128  * The returned request packet must be freed using VMR3ReqFree().
    129  *
    130  * @returns VBox status code.
    131  *          Will not return VERR_INTERRUPTED.
    132  * @returns VERR_TIMEOUT if cMillies was reached without the packet being completed.
    133  *
    134  * @param   pVM             The VM handle.
    135  * @param   idDstCpu        The destination CPU(s). Either a specific CPU ID or
    136  *                          one of the following special values:
    137  *                              VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE.
    138  * @param   ppReq           Where to store the pointer to the request.
    139  *                          This will be NULL or a valid request pointer not matter what happends.
    140  * @param   cMillies        Number of milliseconds to wait for the request to
    141  *                          be completed. Use RT_INDEFINITE_WAIT to only
    142  *                          wait till it's completed.
    143  * @param   pfnFunction     Pointer to the function to call.
    144  * @param   cArgs           Number of arguments following in the ellipsis.
    145  *                          Not possible to pass 64-bit arguments!
    146  * @param   ...             Function arguments.
    147  */
    148 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    149 {
    150     va_list va;
    151     va_start(va, cArgs);
    152     int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);
    15381    va_end(va);
    15482    return rc;
  • trunk/src/VBox/VMM/testcase/tstMicro.cpp

    r19300 r23015  
    353353         * Do testing.
    354354         */
    355         PVMREQ pReq1 = NULL;
    356         rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)doit, 1, pVM);
     355        rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)doit, 1, pVM);
    357356        AssertRC(rc);
    358         VMR3ReqFree(pReq1);
    359 
    360357        STAMR3Dump(pVM, "*");
    361358
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