Changeset 34586 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 1, 2010 8:08:49 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68383
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMAsyncCompletion.cpp
r33840 r34586 874 874 875 875 if (RT_SUCCESS(rc)) 876 rc = CFGMR3QueryU32(pCur, "Start", &cbStart);877 if (RT_SUCCESS(rc))878 876 rc = CFGMR3QueryU32(pCur, "Max", &cbMax); 879 877 if (RT_SUCCESS(rc)) 880 rc = CFGMR3QueryU32(pCur, "Step", &cbStep); 878 rc = CFGMR3QueryU32Def(pCur, "Start", &cbStart, cbMax); 879 if (RT_SUCCESS(rc)) 880 rc = CFGMR3QueryU32Def(pCur, "Step", &cbStep, 0); 881 881 if (RT_SUCCESS(rc)) 882 882 rc = pdmacAsyncCompletionBwMgrCreate(pEndpointClass, pszBwGrpId, cbMax, cbStart, cbStep); … … 1583 1583 } 1584 1584 1585 VMMR3DECL(int) PDMR3AsyncCompletionBwMgrSetMaxForFile(PVM pVM, const char *pcszBwMgr, uint32_t cbMaxNew) 1586 { 1587 int rc = VINF_SUCCESS; 1588 AssertPtrReturn(pVM, VERR_INVALID_POINTER); 1589 AssertPtrReturn(pcszBwMgr, VERR_INVALID_POINTER); 1590 PPDMACBWMGR pBwMgr; 1591 1592 PPDMASYNCCOMPLETIONEPCLASS pEpClass = pVM->pUVM->pdm.s.apAsyncCompletionEndpointClass[PDMASYNCCOMPLETIONEPCLASSTYPE_FILE]; 1593 1594 pBwMgr = pdmacBwMgrFindById(pEpClass, pcszBwMgr); 1595 if (pBwMgr) 1596 { 1597 /* 1598 * Set the new value for the start and max value to let the manager pick up 1599 * the new limit immediately. 1600 */ 1601 ASMAtomicXchgU32(&pBwMgr->cbTransferPerSecMax, cbMaxNew); 1602 ASMAtomicXchgU32(&pBwMgr->cbTransferPerSecStart, cbMaxNew); 1603 } 1604 else 1605 rc = VERR_NOT_FOUND; 1606 1607 return rc; 1608 } 1609
Note:
See TracChangeset
for help on using the changeset viewer.