VirtualBox

Changeset 90447 in vbox for trunk/src/VBox/Devices/VirtIO


Ignore:
Timestamp:
Jul 31, 2021 12:44:13 AM (3 years ago)
Author:
vboxsync
Message:

Dev*: Checked up all the PDMDevHlpCritSectEnter calls to make sure the status code is checked. bugref:6695

Location:
trunk/src/VBox/Devices/VirtIO
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VirtIO/Virtio.cpp

    r82968 r90447  
    931931    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIOWriteR0,   STAMTYPE_PROFILE, "IO/WriteR0",         STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in R0");
    932932    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatIOWriteRC,   STAMTYPE_PROFILE, "IO/WriteRC",         STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in RC");
    933     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatCsR3,        STAMTYPE_PROFILE, "Cs/CsR3",            STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in R3");
    934     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatCsR0,        STAMTYPE_PROFILE, "Cs/CsR0",            STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in R0");
    935     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatCsRC,        STAMTYPE_PROFILE, "Cs/CsRC",            STAMUNIT_TICKS_PER_CALL, "Profiling CS wait in RC");
    936933# endif /* VBOX_WITH_STATISTICS */
    937934
  • trunk/src/VBox/Devices/VirtIO/Virtio.h

    r85121 r90447  
    218218    STAMPROFILEADV          StatIOWriteR0;
    219219    STAMPROFILEADV          StatIOWriteRC;
    220     STAMPROFILE             StatCsR3;
    221     STAMPROFILE             StatCsR0;
    222     STAMPROFILE             StatCsRC;
    223220#endif
    224221} VPCISTATE;
     
    298295
    299296#define VPCI_CS
     297
     298#ifdef VPCI_CS
     299# define VPCI_R3_CS_ENTER_RETURN_VOID(a_pDevIns, a_pThis) do { \
     300        int const rcLock = PDMDevHlpCritSectEnter(pDevIns, &(a_pThis)->cs, VERR_IGNORED); \
     301        PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &(a_pThis)->cs, rcLock); \
     302    } while (0)
     303#else
     304# define VPCI_R3_CS_ENTER_RETURN_VOID(a_pDevIns, a_pThis) do { } while (0)
     305#endif
     306
    300307DECLINLINE(int) vpciCsEnter(PPDMDEVINS pDevIns, PVPCISTATE pThis, int rcBusy)
    301308{
    302309#ifdef VPCI_CS
    303     STAM_PROFILE_START(&pThis->CTX_SUFF(StatCs), a);
    304     int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->cs, rcBusy);
    305     STAM_PROFILE_STOP(&pThis->CTX_SUFF(StatCs), a);
    306     return rc;
     310    return PDMDevHlpCritSectEnter(pDevIns, &pThis->cs, rcBusy);
    307311#else
    308312    RT_NOREF(pDevIns, pThis, rcBusy);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette