Changeset 53760 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jan 8, 2015 9:05:35 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 97548
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r53560 r53760 2267 2267 return ptrVM.rc(); 2268 2268 2269 /* release the lock before a VMR3* call (EMT will call us back)! */2269 /* release the lock before a VMR3* call (EMT might wait for it, @bugref{7648})! */ 2270 2270 alock.release(); 2271 2271 … … 2373 2373 (PFNRT)i_unplugCpu, 3, 2374 2374 this, pUVM, (VMCPUID)aCpu); 2375 if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc)) 2376 { 2375 2376 /* release the lock before a VMR3* call (EMT might wait for it, @bugref{7648})! */ 2377 alock.release(); 2378 2379 if (vrc == VERR_TIMEOUT) 2377 2380 vrc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); 2378 AssertRC(vrc); 2379 if (RT_SUCCESS(vrc)) 2380 vrc = pReq->iStatus; 2381 } 2381 AssertRC(vrc); 2382 if (RT_SUCCESS(vrc)) 2383 vrc = pReq->iStatus; 2382 2384 VMR3ReqFree(pReq); 2383 2385 … … 2480 2482 this, pUVM, aCpu); 2481 2483 2482 /* release the lock before a VMR3* call (EMT will call us back)! */2484 /* release the lock before a VMR3* call (EMT might wait for it, @bugref{7648})! */ 2483 2485 alock.release(); 2484 2486 2485 if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc)) 2486 { 2487 if (vrc == VERR_TIMEOUT) 2487 2488 vrc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); 2488 AssertRC(vrc); 2489 if (RT_SUCCESS(vrc)) 2490 vrc = pReq->iStatus; 2491 } 2489 AssertRC(vrc); 2490 if (RT_SUCCESS(vrc)) 2491 vrc = pReq->iStatus; 2492 2492 VMR3ReqFree(pReq); 2493 2494 rc = RT_SUCCESS(vrc) ? S_OK :2495 setError(VBOX_E_VM_ERROR,2496 tr("Could not add CPU to the machine (%Rrc)"),2497 vrc);2498 2493 2499 2494 if (RT_SUCCESS(vrc)) … … 2506 2501 /** @todo warning if the guest doesn't support it */ 2507 2502 } 2503 else 2504 rc = setError(VBOX_E_VM_ERROR, 2505 tr("Could not add CPU to the machine (%Rrc)"), 2506 vrc); 2508 2507 2509 2508 LogFlowThisFunc(("mMachineState=%d, rc=%Rhrc\n", mMachineState, rc)); … … 3603 3602 this, pUVM, pszDevice, uInstance, enmBus, fUseHostIOCache, aMediumAttachment, fForce); 3604 3603 3605 /* release the lock before waiting for a result (EMT will call us back!)*/3604 /* release the lock before waiting for a result (EMT might wait for it, @bugref{7648})! */ 3606 3605 alock.release(); 3607 3606 3608 if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc)) 3609 { 3607 if (vrc == VERR_TIMEOUT) 3610 3608 vrc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); 3611 AssertRC(vrc); 3612 if (RT_SUCCESS(vrc)) 3613 vrc = pReq->iStatus; 3614 } 3609 AssertRC(vrc); 3610 if (RT_SUCCESS(vrc)) 3611 vrc = pReq->iStatus; 3615 3612 VMR3ReqFree(pReq); 3616 3613 … … 3799 3796 this, pUVM, pszDevice, uInstance, enmBus, fUseHostIOCache, aMediumAttachment, fSilent); 3800 3797 3801 /* release the lock before waiting for a result (EMT will call us back!)*/3798 /* release the lock before waiting for a result (EMT might wait for it, @bugref{7648})! */ 3802 3799 alock.release(); 3803 3800 3804 if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc)) 3805 { 3801 if (vrc == VERR_TIMEOUT) 3806 3802 vrc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); 3807 AssertRC(vrc); 3808 if (RT_SUCCESS(vrc)) 3809 vrc = pReq->iStatus; 3810 } 3803 AssertRC(vrc); 3804 if (RT_SUCCESS(vrc)) 3805 vrc = pReq->iStatus; 3811 3806 VMR3ReqFree(pReq); 3812 3807 … … 3991 3986 this, pUVM, pszDevice, uInstance, enmBus, aMediumAttachment, fSilent); 3992 3987 3993 /* release the lock before waiting for a result (EMT will call us back!)*/3988 /* release the lock before waiting for a result (EMT might wait for it, @bugref{7648})! */ 3994 3989 alock.release(); 3995 3990 3996 if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc)) 3997 { 3991 if (vrc == VERR_TIMEOUT) 3998 3992 vrc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); 3999 AssertRC(vrc); 4000 if (RT_SUCCESS(vrc)) 4001 vrc = pReq->iStatus; 4002 } 3993 AssertRC(vrc); 3994 if (RT_SUCCESS(vrc)) 3995 vrc = pReq->iStatus; 4003 3996 VMR3ReqFree(pReq); 4004 3997 … … 4771 4764 */ 4772 4765 PVMREQ pReq; 4773 int vrc = VMR3ReqCallU(pUVM, 0 /*idDstCpu*/, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS, 4774 (PFNRT)i_changeNetworkAttachment, 6, 4775 this, pUVM, pszDevice, uInstance, uLun, aNetworkAdapter); 4776 4777 if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc)) 4778 { 4779 vrc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); 4780 AssertRC(vrc); 4781 if (RT_SUCCESS(vrc)) 4782 vrc = pReq->iStatus; 4783 } 4784 VMR3ReqFree(pReq); 4766 int vrc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, 4767 (PFNRT)i_changeNetworkAttachment, 6, 4768 this, pUVM, pszDevice, uInstance, uLun, aNetworkAdapter); 4785 4769 4786 4770 if (fResume) … … 6109 6093 return ptrVM.rc(); 6110 6094 6111 /* release the lock before a VMR3* call (EMT will call us back)! */6095 /* release the lock before a VMR3* call (EMT might wait for it, @bugref{7648})! */ 6112 6096 alock.release(); 6113 6097 … … 6168 6152 return ptrVM.rc(); 6169 6153 6170 /* release the lock before a VMR3* call (EMT will call us back)! */6154 /* release the lock before a VMR3* call (EMT might wait for it, @bugref{7648})! */ 6171 6155 alock.release(); 6172 6156 … … 6247 6231 return ptrVM.rc(); 6248 6232 6249 /* release the lock before a VMR3* call (EMT will call us back)! */6233 /* release the lock before a VMR3* call (EMT might wait for it, @bugref{7648})! */ 6250 6234 alock.release(); 6251 6235 VMSUSPENDREASON enmReason = VMSUSPENDREASON_USER; … … 7423 7407 LogFlowThisFunc(("Shutdown HGCM...\n")); 7424 7408 7425 /* Leave the lock since EMT will call us back as addVMCaller() */7409 /* Leave the lock since EMT might wait for it and will call us back as addVMCaller() */ 7426 7410 alock.release(); 7427 7411 … … 8769 8753 tr("General failure attaching to host interface")); 8770 8754 } 8771 LogFlowThisFunc(("rc=% d\n", rc));8755 LogFlowThisFunc(("rc=%Rhrc\n", rc)); 8772 8756 return rc; 8773 8757 } … … 9938 9922 * isn't going to need the Console lock. 9939 9923 */ 9924 9925 /* TODO: do alock.release here as EMT might wait on it! See other places 9926 * where we do VMR3ReqCall requests. See @bugref{7648}. */ 9940 9927 vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, 9941 9928 (PFNRT)i_reconfigureMediumAttachment, 13,
Note:
See TracChangeset
for help on using the changeset viewer.