VirtualBox

Changeset 90435 in vbox for trunk


Ignore:
Timestamp:
Jul 30, 2021 3:59:04 PM (3 years ago)
Author:
vboxsync
Message:

VMM/PDMCritSectEnter: Added macros for correctly asserting on successfull PDMCritSectEnter calls when rcBusy is VINF_SUCCESS or the caller can't return an error. Makes it easier to spot these compared to generic AssertReleaseRC. [fix] bugref:6695

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmcritsect.h

    r90433 r90435  
    103103 * to forward failures to the caller. */
    104104#define PDM_CRITSECT_RELEASE_ASSERT_RC(a_pVM, a_pCritSect, a_rc) \
    105     AssertReleaseMsg(RT_SUCCESS(a_rc), ("pVM=%p pCritSect=%p: %Rrc\n", (a_pVM), (a_pCritSect), (a_rc))
     105    AssertReleaseMsg(RT_SUCCESS(a_rc), ("pVM=%p pCritSect=%p: %Rrc\n", (a_pVM), (a_pCritSect), (a_rc)))
    106106
    107107/** @def PDM_CRITSECT_RELEASE_ASSERT_RC_DEV
     
    109109 * to forward failures to the caller, device edition. */
    110110#define PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(a_pDevIns, a_pCritSect, a_rc) \
    111     AssertReleaseMsg(RT_SUCCESS(a_rc), ("pDevIns=%p pCritSect=%p: %Rrc\n", (a_pDevIns), (a_pCritSect), (a_rc))
     111    AssertReleaseMsg(RT_SUCCESS(a_rc), ("pDevIns=%p pCritSect=%p: %Rrc\n", (a_pDevIns), (a_pCritSect), (a_rc)))
    112112
    113113/** @def PDM_CRITSECT_RELEASE_ASSERT_RC_DRV
     
    115115 * to forward failures to the caller, driver edition. */
    116116#define PDM_CRITSECT_RELEASE_ASSERT_RC_DRV(a_pDevIns, a_pCritSect, a_rc) \
    117     AssertReleaseMsg(RT_SUCCESS(a_rc), ("pDrvIns=%p pCritSect=%p: %Rrc\n", (a_pDrvIns), (a_pCritSect), (a_rc))
     117    AssertReleaseMsg(RT_SUCCESS(a_rc), ("pDrvIns=%p pCritSect=%p: %Rrc\n", (a_pDrvIns), (a_pCritSect), (a_rc)))
    118118
    119119/** @def PDM_CRITSECT_RELEASE_ASSERT_RC_USB
     
    121121 * to forward failures to the caller, USB device edition. */
    122122#define PDM_CRITSECT_RELEASE_ASSERT_RC_USB(a_pUsbIns, a_pCritSect, a_rc) \
    123     AssertReleaseMsg(RT_SUCCESS(a_rc), ("pUsbIns=%p pCritSect=%p: %Rrc\n", (a_pUsbIns), (a_pCritSect), (a_rc))
     123    AssertReleaseMsg(RT_SUCCESS(a_rc), ("pUsbIns=%p pCritSect=%p: %Rrc\n", (a_pUsbIns), (a_pCritSect), (a_rc)))
    124124
    125125
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