VirtualBox

Changeset 81905 in vbox


Ignore:
Timestamp:
Nov 17, 2019 3:04:33 PM (5 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Added a CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) macro for avoiding #ifdefs. bugref:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r81869 r81905  
    724724#else
    725725# define CTXTYPE(GCType, R3Type, R0Type)  R0Type
     726#endif
     727
     728/** @def CTX_EXPR
     729 * Expression selector for avoiding \#ifdef's.
     730 *
     731 * @param   a_R3Expr    The R3 expression.
     732 * @param   a_R0Expr    The R0 expression.
     733 * @param   a_RCExpr    The RC expression.
     734 */
     735#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
     736# define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr)  a_RCExpr
     737#elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING)
     738# define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr)  a_R0Expr
     739#else
     740# define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr)  a_R3Expr
    726741#endif
    727742
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