Changeset 81561 in vbox
- Timestamp:
- Oct 28, 2019 12:44:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDMR3Task.cpp
r81488 r81561 225 225 if (iTask == 0) 226 226 break; 227 uint32_t cShutdown = 3; 227 228 do 228 229 { … … 282 283 iTask = ASMBitFirstSetU64(fTriggered); 283 284 } while (iTask != 0); 285 286 /* 287 * If we're shutting down, we'll try drain the pending tasks by 288 * looping three more times before just quitting. We don't want 289 * to get stuck here if some stuff is misbehaving. 290 */ 291 if (!ASMAtomicReadBool(&pTaskSet->fShutdown)) 292 { /* likely */ } 293 else if (--cShutdown == 0) 294 break; 284 295 } 285 296 286 297 /* 287 * Wait .298 * Wait unless we're shutting down. 288 299 */ 289 if (pTaskSet->fRZEnabled) 290 SUPSemEventWaitNoResume(pTaskSet->pVM->pSession, pTaskSet->hEventR0, RT_MS_15SEC); 291 else 292 RTSemEventWaitNoResume(pTaskSet->hEventR3, RT_MS_15SEC); 293 } 300 if (!ASMAtomicReadBool(&pTaskSet->fShutdown)) 301 { 302 if (pTaskSet->fRZEnabled) 303 SUPSemEventWaitNoResume(pTaskSet->pVM->pSession, pTaskSet->hEventR0, RT_MS_15SEC); 304 else 305 RTSemEventWaitNoResume(pTaskSet->hEventR3, RT_MS_15SEC); 306 } 307 } 308 309 /* 310 * Complain about pending tasks. 311 */ 312 uint64_t const fTriggered = ASMAtomicReadU64(&pTaskSet->fTriggered); 313 AssertLogRelMsg(fTriggered == 0, ("fTriggered=%#RX64 - %u %s\n", fTriggered, ASMBitFirstSetU64(fTriggered) - 1, 314 pTaskSet->aTasks[ASMBitFirstSetU64(fTriggered) - 1].pszName)); 294 315 295 316 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.