Changeset 75740 in vbox
- Timestamp:
- Nov 26, 2018 3:59:11 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126941
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmifs.h
r75500 r75740 2068 2068 * Notify the guest on a command completion. 2069 2069 * 2070 * @returns VINF_SUCCESS or VERR_CANCELLED if the guest canceled the call. 2070 2071 * @param pInterface Pointer to this interface. 2071 2072 * @param rc The return code (VBox error code). 2072 2073 * @param pCmd A pointer that identifies the completed command. 2073 2074 */ 2074 DECLR3CALLBACKMEMBER( void, pfnCompleted,(PPDMIHGCMPORT pInterface, int32_t rc, PVBOXHGCMCMD pCmd));2075 DECLR3CALLBACKMEMBER(int, pfnCompleted,(PPDMIHGCMPORT pInterface, int32_t rc, PVBOXHGCMCMD pCmd)); 2075 2076 2076 2077 /** … … 2085 2086 } PDMIHGCMPORT; 2086 2087 /** PDMIHGCMPORT interface ID. */ 2087 # define PDMIHGCMPORT_IID " 10ca89d3-18ef-44d3-535e-ca46532e3caa"2088 # define PDMIHGCMPORT_IID "e82b1709-c245-4ccc-1611-0e6d50d93cbc" 2088 2089 2089 2090 -
trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
r75585 r75740 1246 1246 /** Update HGCM request in the guest memory and mark it as completed. 1247 1247 * 1248 * @returns VINF_SUCCESS or VERR_CANCELLED. 1248 1249 * @param pInterface Pointer to this PDM interface. 1249 1250 * @param result HGCM completion status code (VBox status code). … … 1252 1253 * @thread EMT 1253 1254 */ 1254 DECLCALLBACK(void)hgcmCompletedWorker(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmd)1255 static int hgcmCompletedWorker(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmd) 1255 1256 { 1256 1257 PVMMDEV pThis = RT_FROM_MEMBER(pInterface, VMMDevState, IHGCMPort); … … 1272 1273 */ 1273 1274 LogFlowFunc(("VINF_HGCM_SAVE_STATE for command %p\n", pCmd)); 1274 return ;1275 return VINF_SUCCESS; 1275 1276 } 1276 1277 … … 1448 1449 VMMDevNotifyGuest(pThis, VMMDEV_EVENT_HGCM); 1449 1450 } 1451 1452 /* Set the status to success for now, though we might consider passing 1453 along the vmmdevHGCMCompleteCallRequest errors... */ 1454 rc = VINF_SUCCESS; 1450 1455 } 1451 1456 else 1452 1457 { 1453 1458 LogFlowFunc(("Cancelled command %p\n", pCmd)); 1459 rc = VERR_CANCELLED; 1454 1460 } 1455 1461 … … 1472 1478 STAM_REL_PROFILE_ADD_PERIOD(&pThis->StatHgcmCmdTotal, tsNow - tsArrival); 1473 1479 #endif 1474 } 1475 1476 /** HGCM callback for request completion. Forwards to hgcmCompletedWorker. 1477 * 1480 1481 return rc; 1482 } 1483 1484 /** 1485 * HGCM callback for request completion. Forwards to hgcmCompletedWorker. 1486 * 1487 * @returns VINF_SUCCESS or VERR_CANCELLED. 1478 1488 * @param pInterface Pointer to this PDM interface. 1479 1489 * @param result HGCM completion status code (VBox status code). 1480 1490 * @param pCmd Completed command, which contains updated host parameters. 1481 1491 */ 1482 DECLCALLBACK( void) hgcmCompleted(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmd)1492 DECLCALLBACK(int) hgcmCompleted(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmd) 1483 1493 { 1484 1494 #if 0 /* This seems to be significantly slower. Half of MsgTotal time seems to be spend here. */ … … 1494 1504 (PFNRT)hgcmCompletedWorker, 3, pInterface, result, pCmd); 1495 1505 AssertRC(rc); 1506 return VINF_SUCCESS; /* cannot tell if canceled or not... */ 1496 1507 #else 1497 1508 STAM_GET_TS(pCmd->tsComplete); 1498 1509 VBOXDD_HGCMCALL_COMPLETED_REQ(pCmd, result); 1499 hgcmCompletedWorker(pInterface, result, pCmd);1510 return hgcmCompletedWorker(pInterface, result, pCmd); 1500 1511 #endif 1501 1512 } -
trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.h
r75537 r75740 29 29 int vmmdevHGCMCancel2(VMMDevState *pVMMDevState, RTGCPHYS GCPtr); 30 30 31 DECLCALLBACK( void)hgcmCompleted(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmdPtr);31 DECLCALLBACK(int) hgcmCompleted(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmdPtr); 32 32 DECLCALLBACK(bool) hgcmIsCmdRestored(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd); 33 33 -
trunk/src/VBox/Main/include/HGCMThread.h
r75541 r75740 44 44 * or from HGCM. 45 45 * @param pMsgCore Pointer to just processed message. 46 */ 47 typedef DECLCALLBACK(void) HGCMMSGCALLBACK(int32_t result, HGCMMsgCore *pMsgCore); 46 * 47 * @return Restricted set of VBox status codes when guest call message: 48 * @retval VINF_SUCCESS on success 49 * @retval VERR_CANCELLED if the request was cancelled. 50 * @retval VERR_ALREADY_RESET if the VM is resetting. 51 * @retval VERR_NOT_AVAILABLE if HGCM has been disconnected from the VMMDev 52 * (shouldn't happen). 53 */ 54 typedef DECLCALLBACK(int) HGCMMSGCALLBACK(int32_t result, HGCMMsgCore *pMsgCore); 55 /** Pointer to a message completeion callback function. */ 48 56 typedef HGCMMSGCALLBACK *PHGCMMSGCALLBACK; 49 57 -
trunk/src/VBox/Main/src-client/HGCM.cpp
r75574 r75740 895 895 896 896 897 static DECLCALLBACK( void) hgcmMsgCompletionCallback(int32_t result, HGCMMsgCore *pMsgCore)897 static DECLCALLBACK(int) hgcmMsgCompletionCallback(int32_t result, HGCMMsgCore *pMsgCore) 898 898 { 899 899 /* Call the VMMDev port interface to issue IRQ notification. */ … … 902 902 LogFlow(("MAIN::hgcmMsgCompletionCallback: message %p\n", pMsgCore)); 903 903 904 if (pMsgHdr->pHGCMPort && !g_fResetting) 905 { 906 pMsgHdr->pHGCMPort->pfnCompleted(pMsgHdr->pHGCMPort, g_fSaveState? VINF_HGCM_SAVE_STATE: result, pMsgHdr->pCmd); 907 } 904 if (pMsgHdr->pHGCMPort) 905 { 906 if (!g_fResetting) 907 return pMsgHdr->pHGCMPort->pfnCompleted(pMsgHdr->pHGCMPort, 908 g_fSaveState ? VINF_HGCM_SAVE_STATE : result, pMsgHdr->pCmd); 909 return VERR_ALREADY_RESET; /* best I could find. */ 910 } 911 return VERR_NOT_AVAILABLE; 908 912 } 909 913 … … 1723 1727 #ifdef VBOX_WITH_CRHGSMI 1724 1728 1725 static DECLCALLBACK( void) hgcmMsgFastCallCompletionCallback(int32_t result, HGCMMsgCore *pMsgCore)1729 static DECLCALLBACK(int) hgcmMsgFastCallCompletionCallback(int32_t result, HGCMMsgCore *pMsgCore) 1726 1730 { 1727 1731 /* Call the VMMDev port interface to issue IRQ notification. */ … … 1731 1735 if (pMsg->pfnCompletion) 1732 1736 pMsg->pfnCompletion(result, pMsg->u32Function, &pMsg->Param, pMsg->pvCompletion); 1737 return VINF_SUCCESS; 1733 1738 } 1734 1739
Note:
See TracChangeset
for help on using the changeset viewer.