Changeset 23015 in vbox
- Timestamp:
- Sep 14, 2009 5:00:11 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 52311
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmapi.h
r23010 r23015 366 366 VMMR3DECL(int) VMR3SetRuntimeErrorWorker(PVM pVM); 367 367 VMMR3DECL(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, ...);370 368 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 371 369 VMMR3DECL(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 246 246 else 247 247 { 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); 254 250 AssertReleaseRC (rc); 255 VMR3ReqFree (pReq);256 251 } 257 252 } -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r22277 r23015 349 349 Assert(pVM); 350 350 /* 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); 357 353 if (RT_FAILURE(rcVBox)) 358 354 rc = E_FAIL; … … 1189 1185 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 1190 1186 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, 1192 1188 ("Configuration error: Not possible to attach anything to this driver!\n"), 1193 1189 VERR_PDM_DRVINS_NO_ATTACH); … … 1280 1276 NULL, 1281 1277 /* pfnDetach */ 1282 NULL, 1278 NULL, 1283 1279 /* pfnPowerOff */ 1284 NULL, 1280 NULL, 1285 1281 /* pfnSoftReset */ 1286 1282 NULL, -
trunk/src/VBox/Main/DisplayImpl.cpp
r23012 r23015 1694 1694 1695 1695 /* 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); 1702 1698 alock.enter (); 1703 1699 -
trunk/src/VBox/VMM/DBGFInfo.cpp
r20152 r23015 741 741 AssertRC(rc); 742 742 rc = VINF_SUCCESS; 743 PVMREQ pReq = NULL;744 743 switch (Info.enmType) 745 744 { 746 745 case DBGFINFOTYPE_DEV: 747 746 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); 749 748 else 750 749 Info.u.Dev.pfnHandler(Info.u.Dev.pDevIns, pHlp, pszArgs); … … 753 752 case DBGFINFOTYPE_DRV: 754 753 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); 756 755 else 757 756 Info.u.Drv.pfnHandler(Info.u.Drv.pDrvIns, pHlp, pszArgs); … … 760 759 case DBGFINFOTYPE_INT: 761 760 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); 763 762 else 764 763 Info.u.Int.pfnHandler(pVM, pHlp, pszArgs); … … 767 766 case DBGFINFOTYPE_EXT: 768 767 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); 770 769 else 771 770 Info.u.Ext.pfnHandler(Info.u.Ext.pvUser, pHlp, pszArgs); … … 777 776 break; 778 777 } 779 VMR3ReqFree(pReq);780 778 } 781 779 else -
trunk/src/VBox/VMM/DBGFOS.cpp
r23011 r23015 446 446 */ 447 447 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); 452 449 return pvIf; 453 450 } -
trunk/src/VBox/VMM/VMReq.cpp
r23014 r23015 79 79 va_start(va, cArgs); 80 80 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 cMillies90 * to 0 and use VMR3ReqWait() to check for completation. In the other case91 * 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 or100 * 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 to105 * be completed. Use RT_INDEFINITE_WAIT to only106 * 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 cMillies126 * to 0 and use VMR3ReqWait() to check for completation. In the other case127 * 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 or136 * 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 to141 * be completed. Use RT_INDEFINITE_WAIT to only142 * 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);153 81 va_end(va); 154 82 return rc; -
trunk/src/VBox/VMM/testcase/tstMicro.cpp
r19300 r23015 353 353 * Do testing. 354 354 */ 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); 357 356 AssertRC(rc); 358 VMR3ReqFree(pReq1);359 360 357 STAMR3Dump(pVM, "*"); 361 358
Note:
See TracChangeset
for help on using the changeset viewer.