VirtualBox

Changeset 74789 in vbox for trunk/include


Ignore:
Timestamp:
Oct 12, 2018 10:34:32 AM (6 years ago)
Author:
vboxsync
Message:

vm.h,VMM,REM: s/VMCPU_FF_IS_PENDING/VMCPU_FF_IS_ANY_SET/g to emphasize the plurality of the flags argument and encourage using VMCPU_FF_IS_SET. bugref:9180

File:
1 edited

Legend:

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

    r74787 r74789  
    705705 * @param   pVCpu   The cross context virtual CPU structure.
    706706 * @param   fFlag   The flag to check.
     707 * @sa      VMCPU_FF_IS_ANY_SET
    707708 */
    708709#if !defined(VBOX_STRICT) || !defined(RT_COMPILER_SUPPORTS_LAMBDA)
     
    725726#define VM_FF_IS_PENDING(pVM, fFlags)       RT_BOOL((pVM)->fGlobalForcedActions & (fFlags))
    726727
    727 /** @def VMCPU_FF_IS_PENDING
    728  * Checks if one or more force action in the specified set is pending for the given VCPU.
     728/** @def VMCPU_FF_IS_ANY_SET
     729 * Checks if two or more force action flags in the specified set is set for the given VCPU.
    729730 *
    730731 * @param   pVCpu   The cross context virtual CPU structure.
    731732 * @param   fFlags  The flags to check for.
    732  */
    733 #define VMCPU_FF_IS_PENDING(pVCpu, fFlags)  RT_BOOL((pVCpu)->fLocalForcedActions & (fFlags))
     733 * @sa      VMCPU_FF_IS_SET
     734 */
     735#define VMCPU_FF_IS_ANY_SET(pVCpu, fFlags)  RT_BOOL((pVCpu)->fLocalForcedActions & (fFlags))
    734736
    735737/** @def VM_FF_TEST_AND_CLEAR
     
    739741 * @returns false if the bit was clear.
    740742 * @param   pVM     The cross context VM structure.
    741  * @param   iBit    Bit position to check and clear
    742  */
    743 #define VM_FF_TEST_AND_CLEAR(pVM, iBit)     (ASMAtomicBitTestAndClear(&(pVM)->fGlobalForcedActions, iBit##_BIT))
     743 * @param   fFlag   Flag constant to check and clear (_BIT is appended).
     744 */
     745#define VM_FF_TEST_AND_CLEAR(pVM, fFlag)    (ASMAtomicBitTestAndClear(&(pVM)->fGlobalForcedActions, fFlag##_BIT))
    744746
    745747/** @def VMCPU_FF_TEST_AND_CLEAR
     
    749751 * @returns false if the bit was clear.
    750752 * @param   pVCpu   The cross context virtual CPU structure.
    751  * @param   iBit    Bit position to check and clear
    752  */
    753 #define VMCPU_FF_TEST_AND_CLEAR(pVCpu, iBit) (ASMAtomicBitTestAndClear(&(pVCpu)->fLocalForcedActions, iBit##_BIT))
     753 * @param   fFlag   Flag constant to check and clear (_BIT is appended).
     754 */
     755#define VMCPU_FF_TEST_AND_CLEAR(pVCpu, fFlag) (ASMAtomicBitTestAndClear(&(pVCpu)->fLocalForcedActions, fFlag##_BIT))
    754756
    755757/** @def VM_FF_IS_PENDING_EXCEPT
     
    761763 * @param   fExcpt  The flags that should not be set.
    762764 */
    763 #define VM_FF_IS_PENDING_EXCEPT(pVM, fFlags, fExcpt) ( ((pVM)->fGlobalForcedActions & (fFlags)) && !((pVM)->fGlobalForcedActions & (fExcpt)) )
     765#define VM_FF_IS_PENDING_EXCEPT(pVM, fFlags, fExcpt) \
     766    ( ((pVM)->fGlobalForcedActions & (fFlags)) && !((pVM)->fGlobalForcedActions & (fExcpt)) )
    764767
    765768/** @def VM_IS_EMT
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