Changeset 43625 in vbox
- Timestamp:
- Oct 11, 2012 8:56:27 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 81345
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp
r43623 r43625 83 83 static const DBGCCMD g_aCmds[] = 84 84 { 85 /* pszCmd, cArgsMin, cArgsMax, paArgDesc, cArgDescs, fFlags, pfnHandler pszSyntax, ....pszDescription */86 { "injecterror", 3, 3, &g_aInjectErrorArgs[0], 3, 0, pdmacEpFileErrorInject, "", "Inject error into I/O subsystem." }85 /* pszCmd, cArgsMin, cArgsMax, paArgDesc, cArgDescs, fFlags, pfnHandler pszSyntax,.pszDescription */ 86 { "injecterror", 3, 3, &g_aInjectErrorArgs[0], 3, 0, pdmacEpFileErrorInject, "", "Inject error into I/O subsystem." } 87 87 # ifdef PDM_ASYNC_COMPLETION_FILE_WITH_DELAY 88 ,{ "injectdelay", 4, 4, &g_aInjectDelayArgs[0], 4, 0, pdmacEpFileDelayInject, "", "Inject a delay of a request." }88 ,{ "injectdelay", 3, 5, &g_aInjectDelayArgs[0], RT_ELEMENTS(g_aInjectDelayArgs), 0, pdmacEpFileDelayInject, "", "Inject a delay of a request." } 89 89 # endif 90 90 }; … … 340 340 && ASMAtomicReadU32(&pEpFile->cReqsDelay) > 0) 341 341 { 342 uint64_t tsDelay = (RTRandU32() % 100) > 50 ? pEpFile->msDelay + (RTRandU32() % pEpFile->msJitter) 343 : pEpFile->msDelay - (RTRandU32() % pEpFile->msJitter); 342 uint64_t tsDelay = pEpFile->msDelay; 343 344 if (pEpFile->msJitter) 345 tsDelay = (RTRandU32() % 100) > 50 ? pEpFile->msDelay + (RTRandU32() % pEpFile->msJitter) 346 : pEpFile->msDelay - (RTRandU32() % pEpFile->msJitter); 344 347 ASMAtomicDecU32(&pEpFile->cReqsDelay); 345 348 … … 709 712 uint32_t cReqsDelay = 1; 710 713 uint32_t msJitter = 0; 711 if (cArgs == 4)714 if (cArgs >= 4) 712 715 msJitter = (uint32_t)pArgs[3].u.u64Number; 713 716 if (cArgs == 5)
Note:
See TracChangeset
for help on using the changeset viewer.