Changeset 93613 in vbox for trunk/src/VBox
- Timestamp:
- Feb 6, 2022 4:23:27 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
r93115 r93613 1556 1556 return VINF_SUCCESS; 1557 1557 1558 Log6Func(("[Re]starting %s worker\n", VIRTQNAME(uVirtqNbr))); 1558 1559 while (pThread->enmState == PDMTHREADSTATE_RUNNING) 1559 1560 { 1560 if ( !pWorkerR3->cRedoDescs && IS_VIRTQ_EMPTY(pDevIns, &pThis->Virtio, uVirtqNbr))1561 {1561 if ( !pWorkerR3->cRedoDescs 1562 && IS_VIRTQ_EMPTY(pDevIns, &pThis->Virtio, uVirtqNbr)) { 1562 1563 /* Atomic interlocks avoid missing alarm while going to sleep & notifier waking the awoken */ 1563 1564 ASMAtomicWriteBool(&pWorker->fSleeping, true); … … 1570 1571 AssertLogRelMsgReturn(RT_SUCCESS(rc) || rc == VERR_INTERRUPTED, ("%Rrc\n", rc), rc); 1571 1572 if (RT_UNLIKELY(pThread->enmState != PDMTHREADSTATE_RUNNING)) 1573 { 1574 Log6Func(("%s worker thread not running, exiting\n", VIRTQNAME(uVirtqNbr))); 1572 1575 return VINF_SUCCESS; 1576 } 1573 1577 if (rc == VERR_INTERRUPTED) 1578 { 1579 Log6Func(("%s worker interrupted ... continuing\n", VIRTQNAME(uVirtqNbr))); 1574 1580 continue; 1581 } 1575 1582 Log6Func(("%s worker woken\n", VIRTQNAME(uVirtqNbr))); 1576 1583 ASMAtomicWriteBool(&pWorker->fNotified, false); 1577 1584 } 1578 1585 ASMAtomicWriteBool(&pWorker->fSleeping, false); 1586 } 1587 if (!virtioCoreIsVirtqEnabled(&pThis->Virtio, uVirtqNbr)) 1588 { 1589 LogFunc(("%s queue not enabled, worker aborting...\n", VIRTQNAME(uVirtqNbr))); 1590 break; 1579 1591 } 1580 1592 … … 2294 2306 for (uint16_t uVirtqNbr = 0; uVirtqNbr < VIRTIOSCSI_REQ_VIRTQ_CNT; uVirtqNbr++) 2295 2307 { 2296 if (ASMAtomicReadBool(&pThis->aWorkers[uVirtqNbr].fSleeping)) 2308 if ( virtioCoreIsVirtqEnabled(&pThis->Virtio, uVirtqNbr) 2309 && ASMAtomicReadBool(&pThis->aWorkers[uVirtqNbr].fSleeping)) 2297 2310 { 2298 2311 Log6Func(("waking %s worker.\n", VIRTQNAME(uVirtqNbr)));
Note:
See TracChangeset
for help on using the changeset viewer.