- Timestamp:
- Nov 17, 2014 3:56:12 PM (10 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r52713 r53341 2238 2238 { 2239 2239 /* If there are no mailboxes configured, don't even try to do anything. */ 2240 if (pBusLogic->cMailbox) { 2240 if (pBusLogic->cMailbox) 2241 { 2241 2242 ASMAtomicIncU32(&pBusLogic->cMailboxesReady); 2242 2243 if (!ASMAtomicXchgBool(&pBusLogic->fNotificationSend, true)) -
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r51516 r53341 194 194 bool fDiagnosticEnabled; 195 195 /** Flag whether a notification was send to R3. */ 196 bool fNotificationSen d;196 bool fNotificationSent; 197 197 /** Flag whether the guest enabled event notification from the IOC. */ 198 198 bool fEventNotificationEnabled; … … 1283 1283 ASMAtomicWriteU32(&pThis->uRequestQueueNextEntryFreeWrite, uNextWrite); 1284 1284 1285 /* Send notification to R3 if there is not one send already. */ 1286 if (!ASMAtomicXchgBool(&pThis->fNotificationSend, true)) 1285 /* Send notification to R3 if there is not one sent already. Do this 1286 * only if the worker thread is not sleeping or might go sleeping. */ 1287 if (ASMAtomicReadBool(&pThis->fWrkThreadSleeping)) 1287 1288 { 1289 if (!ASMAtomicXchgBool(&pThis->fNotificationSent, true)) 1290 { 1288 1291 #ifdef IN_RC 1289 PPDMQUEUEITEMCORE pNotificationItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotificationQueue)); 1290 AssertPtr(pNotificationItem); 1291 1292 PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), pNotificationItem); 1292 PPDMQUEUEITEMCORE pNotificationItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotificationQueue)); 1293 AssertPtr(pNotificationItem); 1294 PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), pNotificationItem); 1293 1295 #else 1294 LogFlowFunc(("Signal event semaphore\n"));1295 int rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);1296 AssertRC(rc);1296 LogFlowFunc(("Signal event semaphore\n")); 1297 int rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess); 1298 AssertRC(rc); 1297 1299 #endif 1300 } 1298 1301 } 1299 1302 break; … … 4039 4042 pHlp->pfnPrintf(pHlp, "enmDoorbellState=%d\n", pThis->enmDoorbellState); 4040 4043 pHlp->pfnPrintf(pHlp, "fDiagnosticEnabled=%RTbool\n", pThis->fDiagnosticEnabled); 4041 pHlp->pfnPrintf(pHlp, "fNotificationSen d=%RTbool\n", pThis->fNotificationSend);4044 pHlp->pfnPrintf(pHlp, "fNotificationSent=%RTbool\n", pThis->fNotificationSent); 4042 4045 pHlp->pfnPrintf(pHlp, "fEventNotificationEnabled=%RTbool\n", pThis->fEventNotificationEnabled); 4043 4046 pHlp->pfnPrintf(pHlp, "uInterruptMask=%#x\n", pThis->uInterruptMask); … … 4164 4167 while (pThread->enmState == PDMTHREADSTATE_RUNNING) 4165 4168 { 4166 bool fNotificationSend;4167 4168 4169 ASMAtomicWriteBool(&pThis->fWrkThreadSleeping, true); 4169 fNotificationSend = ASMAtomicXchgBool(&pThis->fNotificationSend, false);4170 if (!fNotificationSen d)4170 bool fNotificationSent = ASMAtomicXchgBool(&pThis->fNotificationSent, false); 4171 if (!fNotificationSent) 4171 4172 { 4172 4173 Assert(ASMAtomicReadBool(&pThis->fWrkThreadSleeping)); … … 4176 4177 break; 4177 4178 LogFlowFunc(("Woken up with rc=%Rrc\n", rc)); 4178 fNotificationSend = ASMAtomicXchgBool(&pThis->fNotificationSend, false);4179 ASMAtomicWriteBool(&pThis->fNotificationSent, false); 4179 4180 } 4180 4181 … … 4299 4300 static void lsilogicR3Kick(PLSILOGICSCSI pThis) 4300 4301 { 4301 if (pThis->fNotificationSen d)4302 if (pThis->fNotificationSent) 4302 4303 { 4303 4304 /* Send a notifier to the PDM queue that there are pending requests. */ … … 4360 4361 SSMR3PutU32 (pSSM, pThis->enmDoorbellState); 4361 4362 SSMR3PutBool (pSSM, pThis->fDiagnosticEnabled); 4362 SSMR3PutBool (pSSM, pThis->fNotificationSen d);4363 SSMR3PutBool (pSSM, pThis->fNotificationSent); 4363 4364 SSMR3PutBool (pSSM, pThis->fEventNotificationEnabled); 4364 4365 SSMR3PutU32 (pSSM, pThis->uInterruptMask); … … 4601 4602 SSMR3GetU32(pSSM, (uint32_t *)&pThis->enmDoorbellState); 4602 4603 SSMR3GetBool (pSSM, &pThis->fDiagnosticEnabled); 4603 SSMR3GetBool (pSSM, &pThis->fNotificationSen d);4604 SSMR3GetBool (pSSM, &pThis->fNotificationSent); 4604 4605 SSMR3GetBool (pSSM, &pThis->fEventNotificationEnabled); 4605 4606 SSMR3GetU32 (pSSM, (uint32_t *)&pThis->uInterruptMask); … … 4996 4997 ASMAtomicWriteBool(&pThis->fSignalIdle, false); 4997 4998 4998 AssertMsg(!pThis->fNotificationSen d, ("The PDM Queue should be empty at this point\n"));4999 AssertMsg(!pThis->fNotificationSent, ("The PDM Queue should be empty at this point\n")); 4999 5000 5000 5001 if (pThis->fRedo) … … 5023 5024 pThis->uRequestQueueNextEntryFreeWrite %= pThis->cRequestQueueEntries; 5024 5025 5025 pThis->fNotificationSen d= true;5026 pThis->fNotificationSent = true; 5026 5027 } 5027 5028 else
Note:
See TracChangeset
for help on using the changeset viewer.