- Timestamp:
- Jun 9, 2010 8:08:25 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r29614 r30140 25 25 #include <VBox/pdmdev.h> 26 26 #include <VBox/pdmifs.h> 27 #include <VBox/pdmcritsect.h> 27 28 #include <VBox/scsi.h> 28 29 #include <iprt/asm.h> … … 365 366 #endif 366 367 368 /** Critical section protecting access to the interrupt status register. */ 369 PDMCRITSECT CritSectIntr; 370 367 371 /** Cache for task states. */ 368 372 R3PTRTYPE(RTMEMCACHE) hTaskCache; … … 920 924 pTaskState->MailboxGuest.u.in.uCompletionCode = uMailboxCompletionCode; 921 925 926 int rc = PDMCritSectEnter(&pBusLogic->CritSectIntr, VINF_SUCCESS); 927 AssertRC(rc); 922 928 RTGCPHYS GCPhysAddrMailboxIncoming = pBusLogic->GCPhysAddrMailboxIncomingBase + (pBusLogic->uMailboxIncomingPositionCurrent * sizeof(Mailbox)); 923 929 RTGCPHYS GCPhysAddrCCB = (RTGCPHYS)pTaskState->MailboxGuest.u32PhysAddrCCB; … … 939 945 if (pBusLogic->fIRQEnabled) 940 946 buslogicSetInterrupt(pBusLogic); 947 948 PDMCritSectLeave(&pBusLogic->CritSectIntr); 941 949 } 942 950 … … 1544 1552 case BUSLOGIC_REGISTER_CONTROL: 1545 1553 { 1554 rc = PDMCritSectEnter(&pBusLogic->CritSectIntr, VINF_IOM_HC_IOPORT_WRITE); 1555 if (rc != VINF_SUCCESS) 1556 return rc; 1557 1546 1558 if (uVal & BUSLOGIC_REGISTER_CONTROL_INTERRUPT_RESET) 1547 1559 buslogicClearInterrupt(pBusLogic); 1560 1561 PDMCritSectLeave(&pBusLogic->CritSectIntr); 1548 1562 1549 1563 if ((uVal & BUSLOGIC_REGISTER_CONTROL_HARD_RESET) || (uVal & BUSLOGIC_REGISTER_CONTROL_SOFT_RESET)) … … 2619 2633 PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns); 2620 2634 2635 PDMR3CritSectDelete(&pThis->CritSectIntr); 2636 2621 2637 int rc = RTMemCacheDestroy(pThis->hTaskCache); 2622 2638 AssertMsgRC(rc, ("Destroying task cache failed rc=%Rrc\n", rc)); … … 2713 2729 pThis->pNotifierQueueR0 = PDMQueueR0Ptr(pThis->pNotifierQueueR3); 2714 2730 pThis->pNotifierQueueRC = PDMQueueRCPtr(pThis->pNotifierQueueR3); 2731 2732 rc = PDMDevHlpCritSectInit(pDevIns, &pThis->CritSectIntr, RT_SRC_POS, "BusLogic-Intr"); 2733 if (RT_FAILURE(rc)) 2734 return PDMDEV_SET_ERROR(pDevIns, rc, 2735 N_("BusLogic: cannot create critical section")); 2715 2736 2716 2737 /* Initialize per device state. */ -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
r29847 r30140 1462 1462 GEN_CHECK_OFF(BUSLOGIC, pNotifierQueueR0); 1463 1463 GEN_CHECK_OFF(BUSLOGIC, pNotifierQueueRC); 1464 GEN_CHECK_OFF(BUSLOGIC, CritSectIntr); 1464 1465 GEN_CHECK_OFF(BUSLOGIC, hTaskCache); 1465 1466 GEN_CHECK_OFF(BUSLOGIC, VBoxSCSI);
Note:
See TracChangeset
for help on using the changeset viewer.