VirtualBox

Changeset 85123 in vbox for trunk/include


Ignore:
Timestamp:
Jul 8, 2020 8:15:47 PM (5 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Some cleaning up. bugref:9794

Location:
trunk/include
Files:
2 edited

Legend:

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

    r85121 r85123  
    328328VMMR3_INT_DECL(void)            EMR3Reset(PVM pVM);
    329329VMMR3_INT_DECL(int)             EMR3Term(PVM pVM);
    330 VMMR3DECL(DECLNORETURN(void))  EMR3FatalError(PVMCPU pVCpu, int rc);
     330VMMR3DECL(DECL_NO_RETURN(void)) EMR3FatalError(PVMCPU pVCpu, int rc);
    331331VMMR3_INT_DECL(int)             EMR3ExecuteVM(PVM pVM, PVMCPU pVCpu);
    332332VMMR3_INT_DECL(int)             EMR3CheckRawForcedActions(PVM pVM, PVMCPU pVCpu);
  • trunk/include/iprt/cdefs.h

    r85122 r85123  
    738738 * Declare a type differently in GC, R3 and R0.
    739739 *
    740  * @param   GCType  The GC type.
    741  * @param   R3Type  The R3 type.
    742  * @param   R0Type  The R0 type.
     740 * @param   a_GCType    The GC type.
     741 * @param   a_R3Type    The R3 type.
     742 * @param   a_R0Type    The R0 type.
    743743 * @remark  For pointers used only in one context use RCPTRTYPE(), R3R0PTRTYPE(), R3PTRTYPE() or R0PTRTYPE().
    744744 */
    745745#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    746 # define CTXTYPE(GCType, R3Type, R0Type)  GCType
     746# define CTXTYPE(a_GCType, a_R3Type, a_R0Type)  a_GCType
    747747#elif defined(IN_RING3) || defined(DOXYGEN_RUNNING)
    748 # define CTXTYPE(GCType, R3Type, R0Type)  R3Type
    749 #else
    750 # define CTXTYPE(GCType, R3Type, R0Type)  R0Type
     748# define CTXTYPE(a_GCType, a_R3Type, a_R0Type)  a_R3Type
     749#else
     750# define CTXTYPE(a_GCType, a_R3Type, a_R0Type)  a_R0Type
    751751#endif
    752752
     
    759759 */
    760760#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    761 # define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr)  a_RCExpr
     761# define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) a_RCExpr
    762762#elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING)
    763 # define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr)  a_R0Expr
    764 #else
    765 # define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr)  a_R3Expr
     763# define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) a_R0Expr
     764#else
     765# define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) a_R3Expr
    766766#endif
    767767
     
    771771 * size when built for different architectures.
    772772 *
    773  * @param   RCType  The RC type.
    774  */
    775 #define RCPTRTYPE(RCType)       CTXTYPE(RCType, RTRCPTR, RTRCPTR)
     773 * @param   a_RCType    The RC type.
     774 */
     775#define RCPTRTYPE(a_RCType)     CTXTYPE(a_RCType, RTRCPTR, RTRCPTR)
    776776
    777777/** @def RGPTRTYPE
    778778 * This will become RCPTRTYPE once we've convered all uses of RCPTRTYPE to this.
    779779 *
    780  * @param   RCType  The RC type.
    781  */
    782 #define RGPTRTYPE(RCType)       CTXTYPE(RCType, RTGCPTR, RTGCPTR)
     780 * @param   a_RCType    The RC type.
     781 */
     782#define RGPTRTYPE(a_RCType)     CTXTYPE(a_RCType, RTGCPTR, RTGCPTR)
    783783
    784784/** @def R3R0PTRTYPE
     
    787787 * make sure structures have the same size when built for different architectures.
    788788 *
    789  * @param   R3R0Type  The R3R0 type.
     789 * @param   a_R3R0Type  The R3R0 type.
    790790 * @remarks This used to be called HCPTRTYPE.
    791791 */
    792 #define R3R0PTRTYPE(R3R0Type)   CTXTYPE(RTHCPTR, R3R0Type, R3R0Type)
     792#define R3R0PTRTYPE(a_R3R0Type) CTXTYPE(RTHCPTR, a_R3R0Type, a_R3R0Type)
    793793
    794794/** @def R3PTRTYPE
     
    797797 * size when built for different architectures.
    798798 *
    799  * @param   R3Type  The R3 type.
    800  */
    801 #define R3PTRTYPE(R3Type)       CTXTYPE(RTHCUINTPTR, R3Type, RTHCUINTPTR)
     799 * @param   a_R3Type    The R3 type.
     800 */
     801#define R3PTRTYPE(a_R3Type)     CTXTYPE(RTHCUINTPTR, a_R3Type, RTHCUINTPTR)
    802802
    803803/** @def R0PTRTYPE
     
    806806 * size when built for different architectures.
    807807 *
    808  * @param   R0Type  The R0 type.
    809  */
    810 #define R0PTRTYPE(R0Type)       CTXTYPE(RTHCUINTPTR, RTHCUINTPTR, R0Type)
     808 * @param   a_R0Type    The R0 type.
     809 */
     810#define R0PTRTYPE(a_R0Type)     CTXTYPE(RTHCUINTPTR, RTHCUINTPTR, a_R0Type)
    811811
    812812/** @def CTXSUFF
     
    815815 *
    816816 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    817  * @param   var     Identifier name.
     817 * @param   a_Var   Identifier name.
    818818 * @deprecated Use CTX_SUFF. Do NOT use this for new code.
    819819 */
     
    823823 *
    824824 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    825  * @param   var     Identifier name.
     825 * @param   a_Var   Identifier name.
    826826 * @deprecated Use CTX_SUFF. Do NOT use this for new code.
    827827 */
    828828#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    829 # define CTXSUFF(var)       var##GC
    830 # define OTHERCTXSUFF(var)  var##HC
    831 #else
    832 # define CTXSUFF(var)       var##HC
    833 # define OTHERCTXSUFF(var)  var##GC
     829# define CTXSUFF(a_Var)         a_Var##GC
     830# define OTHERCTXSUFF(a_Var)    a_Var##HC
     831#else
     832# define CTXSUFF(a_Var)         a_Var##HC
     833# define OTHERCTXSUFF(a_Var)    a_Var##GC
    834834#endif
    835835
     
    839839 *
    840840 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    841  * @param   var     Identifier name.
     841 * @param   a_Var     Identifier name.
    842842 * @deprecated Use CTX_SUFF. Do NOT use this for new code.
    843843 */
    844844#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    845 # define CTXALLSUFF(var)    var##GC
     845# define CTXALLSUFF(a_Var)      a_Var##GC
    846846#elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING)
    847 # define CTXALLSUFF(var)    var##R0
    848 #else
    849 # define CTXALLSUFF(var)    var##R3
     847# define CTXALLSUFF(a_Var)      a_Var##R0
     848#else
     849# define CTXALLSUFF(a_Var)      a_Var##R3
    850850#endif
    851851
     
    855855 *
    856856 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    857  * @param   var     Identifier name.
     857 * @param   a_Var   Identifier name.
    858858 *
    859859 * @remark  This will replace CTXALLSUFF and CTXSUFF before long.
    860860 */
    861861#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    862 # define CTX_SUFF(var)      var##RC
     862# define CTX_SUFF(a_Var)        a_Var##RC
    863863#elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING)
    864 # define CTX_SUFF(var)      var##R0
    865 #else
    866 # define CTX_SUFF(var)      var##R3
     864# define CTX_SUFF(a_Var)        a_Var##R0
     865#else
     866# define CTX_SUFF(a_Var)        a_Var##R3
    867867#endif
    868868
     
    873873 *
    874874 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    875  * @param   var     Identifier name.
     875 * @param   a_Var   Identifier name.
    876876 *
    877877 * @remark  This will replace CTXALLSUFF and CTXSUFF before long.
    878878 */
    879879#if defined(IN_RING3) || defined(DOXYGEN_RUNNING)
    880 # define CTX_SUFF_Z(var)    var##R3
    881 #else
    882 # define CTX_SUFF_Z(var)    var##RZ
     880# define CTX_SUFF_Z(a_Var)      a_Var##R3
     881#else
     882# define CTX_SUFF_Z(a_Var)      a_Var##RZ
    883883#endif
    884884
     
    889889 *
    890890 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    891  * @param   first  First name.
    892  * @param   last    Surname.
     891 * @param   a_First First name.
     892 * @param   a_Last  Surname.
    893893 */
    894894/** @def OTHERCTXMID
     
    897897 *
    898898 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    899  * @param   first  First name.
    900  * @param   last    Surname.
     899 * @param   a_First First name.
     900 * @param   a_Last  Surname.
    901901 * @deprecated use CTX_MID or CTX_MID_Z
    902902 */
    903903#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    904 # define CTXMID(first, last)        first##GC##last
    905 # define OTHERCTXMID(first, last)   first##HC##last
    906 #else
    907 # define CTXMID(first, last)        first##HC##last
    908 # define OTHERCTXMID(first, last)   first##GC##last
     904# define CTXMID(a_First, a_Last)        a_First##GC##a_Last
     905# define OTHERCTXMID(a_First, a_Last)   a_First##HC##a_Last
     906#else
     907# define CTXMID(a_First, a_Last)        a_First##HC##a_Last
     908# define OTHERCTXMID(a_First, a_Last)   a_First##GC##a_Last
    909909#endif
    910910
     
    914914 *
    915915 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    916  * @param   first  First name.
    917  * @param   last    Surname.
     916 * @param   a_First First name.
     917 * @param   a_Last  Surname.
    918918 * @deprecated use CTX_MID or CTX_MID_Z
    919919 */
    920920#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    921 # define CTXALLMID(first, last)     first##GC##last
     921# define CTXALLMID(a_First, a_Last)     a_First##GC##a_Last
    922922#elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING)
    923 # define CTXALLMID(first, last)     first##R0##last
    924 #else
    925 # define CTXALLMID(first, last)     first##R3##last
     923# define CTXALLMID(a_First, a_Last)     a_First##R0##a_Last
     924#else
     925# define CTXALLMID(a_First, a_Last)     a_First##R3##a_Last
    926926#endif
    927927
     
    931931 *
    932932 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    933  * @param   first  First name.
    934  * @param   last    Surname.
     933 * @param   a_First First name.
     934 * @param   a_Last  Surname.
    935935 */
    936936#if defined(IN_RC) && !defined(DOXYGEN_RUNNING)
    937 # define CTX_MID(first, last)       first##RC##last
     937# define CTX_MID(a_First, a_Last)       a_First##RC##a_Last
    938938#elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING)
    939 # define CTX_MID(first, last)       first##R0##last
    940 #else
    941 # define CTX_MID(first, last)       first##R3##last
     939# define CTX_MID(a_First, a_Last)       a_First##R0##a_Last
     940#else
     941# define CTX_MID(a_First, a_Last)       a_First##R3##a_Last
    942942#endif
    943943
     
    948948 *
    949949 * This is macro should only be used in shared code to avoid a forest of ifdefs.
    950  * @param   first  First name.
    951  * @param   last    Surname.
     950 * @param   a_First First name.
     951 * @param   a_Last  Surname.
    952952 */
    953953#ifdef IN_RING3
    954 # define CTX_MID_Z(first, last)     first##R3##last
    955 #else
    956 # define CTX_MID_Z(first, last)     first##RZ##last
     954# define CTX_MID_Z(a_First, a_Last)     a_First##R3##a_Last
     955#else
     956# define CTX_MID_Z(a_First, a_Last)     a_First##RZ##a_Last
    957957#endif
    958958
     
    965965 * between R3, R0 and/or GC. The intention is to avoid the \#ifdef IN_RING3 mess.
    966966 *
    967  * @param   pR3String   The R3 string. Only referenced in R3.
     967 * @param   a_pR3String     The R3 string. Only referenced in R3.
    968968 * @see R0STRING and GCSTRING
    969969 */
    970970#ifdef IN_RING3
    971 # define R3STRING(pR3String)    (pR3String)
    972 #else
    973 # define R3STRING(pR3String)    ("<R3_STRING>")
     971# define R3STRING(a_pR3String)  (a_pR3String)
     972#else
     973# define R3STRING(a_pR3String)  ("<R3_STRING>")
    974974#endif
    975975
     
    981981 * between R3, R0 and/or GC. The intention is to avoid the \#ifdef IN_RING0 mess.
    982982 *
    983  * @param   pR0String  The R0 string. Only referenced in R0.
     983 * @param   a_pR0String The R0 string. Only referenced in R0.
    984984 * @see R3STRING and GCSTRING
    985985 */
    986986#ifdef IN_RING0
    987 # define R0STRING(pR0String)    (pR0String)
    988 #else
    989 # define R0STRING(pR0String)    ("<R0_STRING>")
     987# define R0STRING(a_pR0String)  (a_pR0String)
     988#else
     989# define R0STRING(a_pR0String)  ("<R0_STRING>")
    990990#endif
    991991
     
    997997 * between R3, R0 and/or RC. The intention is to avoid the \#ifdef IN_RC mess.
    998998 *
    999  * @param   pRCString  The RC string. Only referenced in RC.
     999 * @param   a_pRCString The RC string. Only referenced in RC.
    10001000 * @see R3STRING, R0STRING
    10011001 */
    10021002#ifdef IN_RC
    1003 # define RCSTRING(pRCString)    (pRCString)
    1004 #else
    1005 # define RCSTRING(pRCString)    ("<RC_STRING>")
     1003# define RCSTRING(a_pRCString)  (a_pRCString)
     1004#else
     1005# define RCSTRING(a_pRCString)  ("<RC_STRING>")
    10061006#endif
    10071007
     
    10861086 * How to declare a function which does not throw C++ exceptions.
    10871087 *
    1088  * @note This macro can be combined with other macros, for example
     1088 * @param   a_Type      The return type.
     1089 *
     1090 * @note    This macro can be combined with other macros, for example
    10891091 * @code
    10901092 *   EMR3DECL(DECL_NOTHROW(void)) foo(void);
    10911093 * @endcode
    10921094 *
    1093  * @note GCC is currently restricted to 4.2+ given the ominous comments on
    1094  *       RT_NOTHROW_PROTO.
     1095 * @note    GCC is currently restricted to 4.2+ given the ominous comments on
     1096 *          RT_NOTHROW_PROTO.
    10951097 */
    10961098#ifdef __cplusplus
    10971099# ifdef _MSC_VER
    1098 #  define DECL_NOTHROW(type)        __declspec(nothrow) type
     1100#  define DECL_NOTHROW(a_Type)      __declspec(nothrow) a_Type
    10991101# elif RT_CLANG_PREREQ(6,0) || RT_GNUC_PREREQ(4,2)
    1100 #  define DECL_NOTHROW(type)        __attribute__((__nothrow__)) type
     1102#  define DECL_NOTHROW(a_Type)      __attribute__((__nothrow__)) a_Type
    11011103# else
    1102 #  define DECL_NOTHROW(type)        type
    1103 # endif
    1104 #else
    1105 # define DECL_NOTHROW(type)         type
    1106 #endif
    1107 
    1108 /** @def DECL_NOTHROW_TYPEDEF
    1109  * How to declare a function which does not throw C++ exceptions.
    1110  *
    1111  * This only works with Clang at present, but it does makes a difference there.
    1112  */
    1113 #if RT_CLANG_PREREQ(6,0)
    1114 # define DECL_NOTHROW_TYPEDEF(type) __attribute__((__nothrow__)) type
    1115 #else
    1116 # define DECL_NOTHROW_TYPEDEF(type) type
    1117 #endif
    1118 
    1119 /** @def DECL_NOTHROW_PFN
    1120  * How to declare a function which does not throw C++ exceptions.
    1121  *
    1122  * This only works with Clang at present, but it does makes a difference there.
    1123  */
    1124 #if RT_CLANG_PREREQ(6,0)
    1125 # define DECL_NOTHROW_PFN(type, cconv, name)    __attribute__((__nothrow__)) type (cconv * name)
    1126 #elif defined(__IBMC__) || defined(__IBMCPP__)
    1127 # define DECL_NOTHROW_PFN(type, cconv, name)    type (* cconv name)
    1128 #else
    1129 # define DECL_NOTHROW_PFN(type, cconv, name)    type (cconv * name)
     1104#  define DECL_NOTHROW(a_Type)      a_Type
     1105# endif
     1106#else
     1107# define DECL_NOTHROW(a_Type)       a_Type
    11301108#endif
    11311109
     
    11831161 * compilers does not want this kind of information and will warning about it.
    11841162 *
    1185  * @param   type    The type exception.
     1163 * @param   a_Type  The type exception.
    11861164 *
    11871165 * @remarks If the actual throwing is done from the header, enclose it by
     
    11931171#ifdef RT_EXCEPTIONS_ENABLED
    11941172# if RT_MSC_PREREQ_EX(RT_MSC_VER_VC71, 0)
    1195 #   define RT_THROW(type)
     1173#   define RT_THROW(a_Type)
    11961174# elif RT_GNUC_PREREQ(7, 0)
    1197 #   define RT_THROW(type)
     1175#   define RT_THROW(a_Type)
    11981176# else
    1199 #   define RT_THROW(type)       throw(type)
    1200 # endif
    1201 #else
    1202 # define RT_THROW(type)
     1177#   define RT_THROW(a_Type)     throw(a_Type)
     1178# endif
     1179#else
     1180# define RT_THROW(a_Type)
    12031181#endif
    12041182
     
    12321210/** @def RT_NOEXCEPT_EX
    12331211 * Wrapper for the C++11 noexcept keyword with expression.
     1212 * @param   a_Expr      The expression.
    12341213 */
    12351214#ifdef __cplusplus
     
    12371216  || RT_CLANG_HAS_FEATURE(cxx_noexcept) \
    12381217  || (RT_GNUC_PREREQ(7, 0) && __cplusplus >= 201100)
    1239 #  define RT_NOEXCEPT           noexcept
    1240 #  define RT_NOEXCEPT_EX(expr)  noexcept(expr)
     1218#  define RT_NOEXCEPT               noexcept
     1219#  define RT_NOEXCEPT_EX(a_Expr)    noexcept(a_Expr)
    12411220# else
    12421221#  define RT_NOEXCEPT
    1243 #  define RT_NOEXCEPT_EX(expr)
     1222#  define RT_NOEXCEPT_EX(a_Expr)
    12441223# endif
    12451224#else
    12461225# define RT_NOEXCEPT
    1247 # define RT_NOEXCEPT_EX(expr)
     1226# define RT_NOEXCEPT_EX(a_Expr)
    12481227#endif
    12491228
     
    13321311 */
    13331312#if defined(_MSC_VER) || defined(__WATCOMC__)
    1334 # define RTCALL                 __cdecl
     1313# define RTCALL                         __cdecl
    13351314#elif defined(RT_OS_OS2)
    1336 # define RTCALL                 __cdecl
     1315# define RTCALL                         __cdecl
    13371316#elif defined(__GNUC__) && defined(RT_ARCH_X86)
    1338 # define RTCALL                 __attribute__((__cdecl__,__regparm__(0)))
     1317# define RTCALL                         __attribute__((__cdecl__,__regparm__(0)))
    13391318#else
    13401319# define RTCALL
     
    13431322/** @def DECLEXPORT
    13441323 * How to declare an exported function.
    1345  * @param   type    The return type of the function declaration.
     1324 * @param   a_RetType   The return type of the function declaration.
    13461325 */
    13471326#if defined(_MSC_VER) || defined(RT_OS_OS2)
    1348 # define DECLEXPORT(type)       __declspec(dllexport) type
     1327# define DECLEXPORT(a_RetType)          __declspec(dllexport) a_RetType
    13491328#elif defined(RT_USE_VISIBILITY_DEFAULT)
    1350 # define DECLEXPORT(type)       __attribute__((visibility("default"))) type
    1351 #else
    1352 # define DECLEXPORT(type)       type
     1329# define DECLEXPORT(a_RetType)          __attribute__((visibility("default"))) a_RetType
     1330#else
     1331# define DECLEXPORT(a_RetType)          a_RetType
    13531332#endif
    13541333
    13551334/** @def DECL_IMPORT_NOTHROW
    13561335 * How to declare an exported function that does not throw C++ exceptions.
    1357  * @param   type    The return type of the function declaration.
    1358  */
    1359 #define DECL_EXPORT_NOTHROW(a_Type) DECL_NOTHROW(DECLEXPORT(a_Type))
     1336 * @param   a_RetType   The return type of the function declaration.
     1337 */
     1338#define DECL_EXPORT_NOTHROW(a_RetType)  DECL_NOTHROW(DECLEXPORT(a_RetType))
    13601339
    13611340/** @def DECLIMPORT
    13621341 * How to declare an imported function.
    1363  * @param   type    The return type of the function declaration.
     1342 * @param   a_RetType   The return type of the function declaration.
    13641343 */
    13651344#if defined(_MSC_VER) || (defined(RT_OS_OS2) && !defined(__IBMC__) && !defined(__IBMCPP__))
    1366 # define DECLIMPORT(type)       __declspec(dllimport) type
    1367 #else
    1368 # define DECLIMPORT(type)       type
     1345# define DECLIMPORT(a_RetType)          __declspec(dllimport) a_RetType
     1346#else
     1347# define DECLIMPORT(a_RetType)          a_RetType
    13691348#endif
    13701349
    13711350/** @def DECL_IMPORT_NOTHROW
    13721351 * How to declare an imported function that does not throw C++ exceptions.
    1373  * @param   type    The return type of the function declaration.
    1374  */
    1375 #define DECL_IMPORT_NOTHROW(a_Type) DECL_NOTHROW(DECLIMPORT(a_Type))
     1352 * @param   a_RetType  The return type of the function declaration.
     1353 */
     1354#define DECL_IMPORT_NOTHROW(a_RetType)  DECL_NOTHROW(DECLIMPORT(a_RetType))
    13761355
    13771356/** @def DECLHIDDEN
    13781357 * How to declare a non-exported function or variable.
    1379  * @param   type    The return type of the function or the data type of the variable.
     1358 * @param   a_Type  The return type of the function or the data type of the variable.
     1359 * @sa      DECL_HIDDEN_DATA, DECL_HIDDEN_CONST
     1360 * @todo split up into data and non-data.
    13801361 */
    13811362#if !defined(RT_GCC_SUPPORTS_VISIBILITY_HIDDEN) || defined(RT_NO_VISIBILITY_HIDDEN)
    1382 # define DECLHIDDEN(type)       type
    1383 #else
    1384 # define DECLHIDDEN(type)       __attribute__((visibility("hidden"))) type
     1363# define DECLHIDDEN(a_Type)             a_Type
     1364#else
     1365# define DECLHIDDEN(a_Type)             __attribute__((visibility("hidden"))) a_Type
     1366#endif
     1367
     1368/** @def DECL_HIDDEN_DATA
     1369 * How to declare a non-exported variable.
     1370 * @param   a_Type  The data type of the variable.
     1371 * @sa      DECL_HIDDEN_CONST
     1372 */
     1373#if !defined(RT_GCC_SUPPORTS_VISIBILITY_HIDDEN) || defined(RT_NO_VISIBILITY_HIDDEN)
     1374# define DECL_HIDDEN_DATA(a_Type)       a_Type
     1375#else
     1376# define DECL_HIDDEN_DATA(a_Type)       __attribute__((visibility("hidden"))) a_Type
    13851377#endif
    13861378
    13871379/** @def DECL_HIDDEN_CONST
    13881380 * Workaround for g++ warnings when applying the hidden attribute to a const
    1389  * definition.  Use DECLHIDDEN for the declaration.
    1390  * @param   a_Type      The return type of the function or the data type of
    1391  *                      the variable.
     1381 * definition.  Use DECL_HIDDEN_DATA for the declaration.
     1382 * @param   a_Type      The data type of the variable.
     1383 * @sa      DECL_HIDDEN_DATA
    13921384 */
    13931385#if defined(__cplusplus) && defined(__GNUC__)
    1394 # define DECL_HIDDEN_CONST(a_Type)   a_Type
    1395 #else
    1396 # define DECL_HIDDEN_CONST(a_Type)   DECLHIDDEN(a_Type)
     1386# define DECL_HIDDEN_CONST(a_Type)      a_Type
     1387#else
     1388# define DECL_HIDDEN_CONST(a_Type)      DECL_HIDDEN_DATA(a_Type)
    13971389#endif
    13981390
    13991391/** @def DECL_HIDDEN_NOTHROW
    14001392 * How to declare a non-exported function that does not throw C++ exceptions.
    1401  * @param   type    The return type of the function or the data type of the variable.
    1402  */
    1403 #define DECL_HIDDEN_NOTHROW(a_Type) DECL_NOTHROW(DECLHIDDEN(a_Type))
     1393 * @param   a_RetType   The return type of the function.
     1394 */
     1395#define DECL_HIDDEN_NOTHROW(a_RetType)  DECL_NOTHROW(DECLHIDDEN(a_RetType))
    14041396
    14051397/** @def DECL_INVALID
     
    14071399 * The purpose is to create compile or like time errors when used.  This isn't
    14081400 * possible on all platforms.
    1409  * @param   type    The return type of the function.
     1401 * @param   a_RetType   The return type of the function.
    14101402 */
    14111403#if defined(_MSC_VER)
    1412 # define DECL_INVALID(type)     __declspec(dllimport) type __stdcall
     1404# define DECL_INVALID(a_RetType)    __declspec(dllimport) a_RetType __stdcall
    14131405#elif defined(__GNUC__) && defined(__cplusplus)
    1414 # define DECL_INVALID(type)     extern "C++" type
    1415 #else
    1416 # define DECL_INVALID(type)     type
     1406# define DECL_INVALID(a_RetType)    extern "C++" a_RetType
     1407#else
     1408# define DECL_INVALID(a_RetType)    a_RetType
    14171409#endif
    14181410
    14191411/** @def DECLASM
    14201412 * How to declare an internal assembly function.
    1421  * @param   type    The return type of the function declaration.
     1413 * @param   a_RetType   The return type of the function declaration.
    14221414 * @note    DECL_NOTHROW is implied.
    14231415 */
    14241416#ifdef __cplusplus
    1425 # define DECLASM(type)           extern "C" DECL_NOTHROW(type RTCALL)
    1426 #else
    1427 # define DECLASM(type)           DECL_NOTHROW(type RTCALL)
    1428 #endif
    1429 
    1430 /** @def DECLASMTYPE
    1431  * How to declare an internal assembly function type.
    1432  * @param   type    The return type of the function.
    1433  */
    1434 #define DECLASMTYPE(type)       DECL_NOTHROW_TYPEDEF(type RTCALL)
     1417# define DECLASM(a_RetType)         extern "C" DECL_NOTHROW(a_RetType RTCALL)
     1418#else
     1419# define DECLASM(a_RetType)         DECL_NOTHROW(a_RetType RTCALL)
     1420#endif
    14351421
    14361422/** @def RT_ASM_DECL_PRAGMA_WATCOM
     
    14401426 * 8086, 80186 or 80286 is selected as the target CPU. */
    14411427#if defined(__WATCOMC__) && ARCH_BITS == 16 && defined(RT_ARCH_X86)
    1442 # define RT_ASM_DECL_PRAGMA_WATCOM(type)        type
     1428# define RT_ASM_DECL_PRAGMA_WATCOM(a_RetType)       a_RetType
    14431429# if defined(__SW_0) || defined(__SW_1) || defined(__SW_2)
    1444 #  define RT_ASM_DECL_PRAGMA_WATCOM_386(type)   DECLASM(type)
     1430#  define RT_ASM_DECL_PRAGMA_WATCOM_386(a_RetType)  DECLASM(a_RetType)
    14451431# else
    1446 #  define RT_ASM_DECL_PRAGMA_WATCOM_386(type)   type
     1432#  define RT_ASM_DECL_PRAGMA_WATCOM_386(a_RetType)  a_RetType
    14471433# endif
    14481434#elif defined(__WATCOMC__) && ARCH_BITS == 32 && defined(RT_ARCH_X86)
    1449 # define RT_ASM_DECL_PRAGMA_WATCOM(type)        type
    1450 # define RT_ASM_DECL_PRAGMA_WATCOM_386(type)    type
    1451 #else
    1452 # define RT_ASM_DECL_PRAGMA_WATCOM(type)        DECLASM(type)
    1453 # define RT_ASM_DECL_PRAGMA_WATCOM_386(type)    DECLASM(type)
     1435# define RT_ASM_DECL_PRAGMA_WATCOM(a_RetType)       a_RetType
     1436# define RT_ASM_DECL_PRAGMA_WATCOM_386(a_RetType)   a_RetType
     1437#else
     1438# define RT_ASM_DECL_PRAGMA_WATCOM(a_RetType)       DECLASM(a_RetType)
     1439# define RT_ASM_DECL_PRAGMA_WATCOM_386(a_RetType)   DECLASM(a_RetType)
    14541440#endif
    14551441
     
    14621448 */
    14631449#ifdef _MSC_VER
    1464 # define DECL_NO_RETURN(type)       __declspec(noreturn) type
     1450# define DECL_NO_RETURN(a_RetType)  __declspec(noreturn) a_RetType
    14651451#elif defined(__GNUC__)
    1466 # define DECL_NO_RETURN(type)       __attribute__((noreturn)) type
    1467 #else
    1468 # define DECL_NO_RETURN(type)       type
    1469 #endif
    1470 /** @deprecated Use DECL_NO_RETURN instead. */
    1471 #define DECLNORETURN(type)          DECL_NO_RETURN(type)
     1452# define DECL_NO_RETURN(a_RetType)  __attribute__((noreturn)) a_RetType
     1453#else
     1454# define DECL_NO_RETURN(a_RetType)  a_RetType
     1455#endif
    14721456
    14731457/** @def DECL_RETURNS_TWICE
     
    14791463 */
    14801464#if RT_GNUC_PREREQ(4, 1)
    1481 # define DECL_RETURNS_TWICE(type)   __attribute__((returns_twice)) type
     1465# define DECL_RETURNS_TWICE(a_RetType)  __attribute__((returns_twice)) a_RetType
    14821466# else
    1483 # define DECL_RETURNS_TWICE(type)   type
     1467# define DECL_RETURNS_TWICE(a_RetType)  a_RetType
    14841468#endif
    14851469
     
    14931477 */
    14941478#if defined(__GNUC__)
    1495 # define DECLWEAK(type)             type __attribute__((weak))
    1496 #else
    1497 # define DECLWEAK(type)             type
     1479# define DECLWEAK(a_Type)           a_Type __attribute__((weak))
     1480#else
     1481# define DECLWEAK(a_Type)           a_Type
    14981482#endif
    14991483
    15001484/** @def DECLCALLBACK
    15011485 * How to declare an call back function.
    1502  * @param   type    The return type of the function declaration.
     1486 * @param   a_RetType   The return type of the function declaration.
    15031487 * @note    Use DECLCALLBACKTYPE for typedefs.
    15041488 */
    1505 #define DECLCALLBACK(type)          DECL_NOTHROW(type RT_FAR_CODE RTCALL)
     1489#define DECLCALLBACK(a_Type)        DECL_NOTHROW(a_Type RT_FAR_CODE RTCALL)
    15061490
    15071491/** @def DECLCALLBACKTYPE_EX
    15081492 * How to declare an call back function type.
    1509  * @param   type    The return type of the function declaration.
    1510  * @param   cconv   Calling convention.
    1511  * @param   name    The name of the typedef
    1512  * @param   args    The argument list enclosed in parentheses.
     1493 * @param   a_RetType   The return type of the function declaration.
     1494 * @param   a_CallConv  Calling convention.
     1495 * @param   a_Name      The name of the typedef
     1496 * @param   a_Args      The argument list enclosed in parentheses.
    15131497 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    15141498 */
    15151499#if RT_CLANG_PREREQ(6,0)
    1516 # define DECLCALLBACKTYPE_EX(type, cconv, name, args)   __attribute__((__nothrow__)) type cconv name args
     1500# define DECLCALLBACKTYPE_EX(a_RetType, a_CallConv, a_Name, a_Args) __attribute__((__nothrow__)) a_RetType a_CallConv a_Name a_Args
    15171501#elif defined(_MSC_VER) && defined(__cplusplus) && defined(_MSC_EXTENSIONS)
    1518 # define DECLCALLBACKTYPE_EX(type, cconv, name, args)   type cconv name args throw()
    1519 #else
    1520 # define DECLCALLBACKTYPE_EX(type, cconv, name, args)   type cconv name args
     1502# define DECLCALLBACKTYPE_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType a_CallConv a_Name a_Args throw()
     1503#else
     1504# define DECLCALLBACKTYPE_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType a_CallConv a_Name a_Args
    15211505#endif
    15221506/** @def DECLCALLBACKTYPE
    15231507 * How to declare an call back function type.
    1524  * @param   type    The return type of the function declaration.
    1525  * @param   name    The name of the typedef
    1526  * @param   args    The argument list enclosed in parentheses.
     1508 * @param   a_RetType   The return type of the function declaration.
     1509 * @param   a_Name      The name of the typedef
     1510 * @param   a_Args      The argument list enclosed in parentheses.
    15271511 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    15281512 */
    1529 #define DECLCALLBACKTYPE(type, name, args)              DECLCALLBACKTYPE_EX(type, RT_FAR_CODE RTCALL, name, args)
     1513#define DECLCALLBACKTYPE(a_RetType, a_Name, a_Args) DECLCALLBACKTYPE_EX(a_RetType, RT_FAR_CODE RTCALL, a_Name, a_Args)
    15301514
    15311515/** @def DECLCALLBACKPTR_EX
    15321516 * How to declare an call back function pointer.
    1533  * @param   type    The return type of the function declaration.
    1534  * @param   cconv   Calling convention.
    1535  * @param   name    The name of the variable member.
    1536  * @param   args    The argument list enclosed in parentheses.
     1517 * @param   a_RetType   The return type of the function declaration.
     1518 * @param   a_CallConv  Calling convention.
     1519 * @param   a_Name      The name of the variable member.
     1520 * @param   a_Args      The argument list enclosed in parentheses.
    15371521 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    15381522 */
    15391523#if defined(__IBMC__) || defined(__IBMCPP__)
    1540 # define DECLCALLBACKPTR_EX(type, cconv, name, args)    type (* cconv name) args
     1524# define DECLCALLBACKPTR_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (* a_CallConv a_Name) a_Args
    15411525#elif RT_CLANG_PREREQ(6,0)
    1542 # define DECLCALLBACKPTR_EX(type, cconv, name, args)    __attribute__((__nothrow__)) type (cconv * name) args
     1526# define DECLCALLBACKPTR_EX(a_RetType, a_CallConv, a_Name, a_Args) __attribute__((__nothrow__)) a_RetType (a_CallConv * a_Name) a_Args
    15431527#elif defined(_MSC_VER) && defined(__cplusplus) && defined(_MSC_EXTENSIONS)
    1544 # define DECLCALLBACKPTR_EX(type, cconv, name, args)    type (cconv * name) args throw()
    1545 #else
    1546 # define DECLCALLBACKPTR_EX(type, cconv, name, args)    type (cconv * name) args
     1528# define DECLCALLBACKPTR_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (a_CallConv * a_Name) a_Args throw()
     1529#else
     1530# define DECLCALLBACKPTR_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (a_CallConv * a_Name) a_Args
    15471531#endif
    15481532/** @def DECLCALLBACKPTR
    15491533 * How to declare an call back function pointer.
    1550  * @param   type    The return type of the function declaration.
    1551  * @param   name    The name of the variable member.
    1552  * @param   args    The argument list enclosed in parentheses.
     1534 * @param   a_RetType   The return type of the function declaration.
     1535 * @param   a_Name      The name of the variable member.
     1536 * @param   a_Args      The argument list enclosed in parentheses.
    15531537 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    15541538 */
    1555 #define DECLCALLBACKPTR(type, name, args)               DECLCALLBACKPTR_EX(type, RT_FAR_CODE RTCALL, name, args)
     1539#define DECLCALLBACKPTR(a_RetType, a_Name, a_Args) DECLCALLBACKPTR_EX(a_RetType, RT_FAR_CODE RTCALL, a_Name, a_Args)
    15561540
    15571541/** @def DECLCALLBACKMEMBER_EX
    15581542 * How to declare an call back function pointer member.
    1559  * @param   type    The return type of the function declaration.
    1560  * @param   cconv   Calling convention.
    1561  * @param   name    The name of the struct/union/class member.
    1562  * @param   args    The argument list enclosed in parentheses.
     1543 * @param   a_RetType   The return type of the function declaration.
     1544 * @param   a_CallConv  Calling convention.
     1545 * @param   a_Name      The name of the struct/union/class member.
     1546 * @param   a_Args      The argument list enclosed in parentheses.
    15631547 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    15641548 */
    15651549#if defined(__IBMC__) || defined(__IBMCPP__)
    1566 # define DECLCALLBACKMEMBER_EX(type, cconv, name, args) type (* cconv name) args
     1550# define DECLCALLBACKMEMBER_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (* a_CallConv a_Name) a_Args
    15671551#elif RT_CLANG_PREREQ(6,0)
    1568 # define DECLCALLBACKMEMBER_EX(type, cconv, name, args) __attribute__((__nothrow__)) type (cconv *name) args
     1552# define DECLCALLBACKMEMBER_EX(a_RetType, a_CallConv, a_Name, a_Args) __attribute__((__nothrow__)) a_RetType (a_CallConv *a_Name) a_Args
    15691553#elif defined(_MSC_VER) && defined(__cplusplus) && defined(_MSC_EXTENSIONS)
    1570 # define DECLCALLBACKMEMBER_EX(type, cconv, name, args) type (cconv *name) args throw()
    1571 #else
    1572 # define DECLCALLBACKMEMBER_EX(type, cconv, name, args) type (cconv *name) args
     1554# define DECLCALLBACKMEMBER_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (a_CallConv *a_Name) a_Args throw()
     1555#else
     1556# define DECLCALLBACKMEMBER_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (a_CallConv *a_Name) a_Args
    15731557#endif
    15741558/** @def DECLCALLBACKMEMBER
    15751559 * How to declare an call back function pointer member.
    1576  * @param   type    The return type of the function declaration.
    1577  * @param   name    The name of the struct/union/class member.
    1578  * @param   args    The argument list enclosed in parentheses.
     1560 * @param   a_RetType   The return type of the function declaration.
     1561 * @param   a_Name      The name of the struct/union/class member.
     1562 * @param   a_Args      The argument list enclosed in parentheses.
    15791563 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    15801564 */
    1581 #define DECLCALLBACKMEMBER(type, name, args)   DECLCALLBACKMEMBER_EX(type, RT_FAR_CODE RTCALL, name, args)
     1565#define DECLCALLBACKMEMBER(a_RetType, a_Name, a_Args) DECLCALLBACKMEMBER_EX(a_RetType, RT_FAR_CODE RTCALL, a_Name, a_Args)
    15821566
    15831567/** @def DECLR3CALLBACKMEMBER
    15841568 * How to declare an call back function pointer member - R3 Ptr.
    1585  * @param   type    The return type of the function declaration.
    1586  * @param   name    The name of the struct/union/class member.
    1587  * @param   args    The argument list enclosed in parentheses.
     1569 * @param   a_RetType   The return type of the function declaration.
     1570 * @param   a_Name      The name of the struct/union/class member.
     1571 * @param   a_Args      The argument list enclosed in parentheses.
    15881572 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    15891573 */
    15901574#if defined(IN_RING3) || defined(DOXYGEN_RUNNING)
    1591 # define DECLR3CALLBACKMEMBER(type, name, args) DECLCALLBACKMEMBER(type, name, args)
    1592 #else
    1593 # define DECLR3CALLBACKMEMBER(type, name, args) RTR3PTR name
     1575# define DECLR3CALLBACKMEMBER(a_RetType, a_Name, a_Args) DECLCALLBACKMEMBER(a_RetType, a_Name, a_Args)
     1576#else
     1577# define DECLR3CALLBACKMEMBER(a_RetType, a_Name, a_Args) RTR3PTR a_Name
    15941578#endif
    15951579
    15961580/** @def DECLRCCALLBACKMEMBER
    15971581 * How to declare an call back function pointer member - RC Ptr.
    1598  * @param   type    The return type of the function declaration.
    1599  * @param   name    The name of the struct/union/class member.
    1600  * @param   args    The argument list enclosed in parentheses.
     1582 * @param   a_RetType   The return type of the function declaration.
     1583 * @param   a_Name      The name of the struct/union/class member.
     1584 * @param   a_Args      The argument list enclosed in parentheses.
    16011585 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    16021586 */
    16031587#if defined(IN_RC) || defined(DOXYGEN_RUNNING)
    1604 # define DECLRCCALLBACKMEMBER(type, name, args) DECLCALLBACKMEMBER(type, name, args)
    1605 #else
    1606 # define DECLRCCALLBACKMEMBER(type, name, args) RTRCPTR name
     1588# define DECLRCCALLBACKMEMBER(a_RetType, a_Name, a_Args) DECLCALLBACKMEMBER(a_RetType, a_Name, a_Args)
     1589#else
     1590# define DECLRCCALLBACKMEMBER(a_RetType, a_Name, a_Args) RTRCPTR a_Name
    16071591#endif
    16081592#if defined(IN_RC) || defined(DOXYGEN_RUNNING)
    1609 # define DECLRGCALLBACKMEMBER(type, name, args) DECLCALLBACKMEMBER(type, name, args)
    1610 #else
    1611 # define DECLRGCALLBACKMEMBER(type, name, args) RTRGPTR name
     1593# define DECLRGCALLBACKMEMBER(a_RetType, a_Name, a_Args) DECLCALLBACKMEMBER(a_RetType, a_Name, a_Args)
     1594#else
     1595# define DECLRGCALLBACKMEMBER(a_RetType, a_Name, a_Args) RTRGPTR a_Name
    16121596#endif
    16131597
    16141598/** @def DECLR0CALLBACKMEMBER
    16151599 * How to declare an call back function pointer member - R0 Ptr.
    1616  * @param   type    The return type of the function declaration.
    1617  * @param   name    The name of the struct/union/class member.
    1618  * @param   args    The argument list enclosed in parentheses.
     1600 * @param   a_RetType   The return type of the function declaration.
     1601 * @param   a_Name      The name of the struct/union/class member.
     1602 * @param   a_Args      The argument list enclosed in parentheses.
    16191603 * @note    DECL_NOTHROW is implied, but not supported by all compilers yet.
    16201604 */
    16211605#if defined(IN_RING0) || defined(DOXYGEN_RUNNING)
    1622 # define DECLR0CALLBACKMEMBER(type, name, args) DECLCALLBACKMEMBER(type, name, args)
    1623 #else
    1624 # define DECLR0CALLBACKMEMBER(type, name, args) RTR0PTR name
     1606# define DECLR0CALLBACKMEMBER(a_RetType, a_Name, a_Args) DECLCALLBACKMEMBER(a_RetType, a_Name, a_Args)
     1607#else
     1608# define DECLR0CALLBACKMEMBER(a_RetType, a_Name, a_Args) RTR0PTR a_Name
    16251609#endif
    16261610
    16271611/** @def DECLINLINE
    16281612 * How to declare a function as inline that does not throw any C++ exceptions.
    1629  * @param   type    The return type of the function declaration.
     1613 * @param   a_RetType   The return type of the function declaration.
    16301614 * @remarks Don't use this macro on C++ methods.
    16311615 * @sa      DECL_INLINE_THROW
    16321616 */
    16331617#if defined(__GNUC__) && !defined(DOXYGEN_RUNNING)
    1634 # define DECLINLINE(type)           DECL_NOTHROW(static __inline__ type)
     1618# define DECLINLINE(a_RetType)          DECL_NOTHROW(static __inline__ a_RetType)
    16351619#elif defined(__cplusplus) || defined(DOXYGEN_RUNNING)
    1636 # define DECLINLINE(type)           DECL_NOTHROW(static inline type)
     1620# define DECLINLINE(a_RetType)          DECL_NOTHROW(static inline a_RetType)
    16371621#elif defined(_MSC_VER)
    1638 # define DECLINLINE(type)           DECL_NOTHROW(static _inline type)
     1622# define DECLINLINE(a_RetType)          DECL_NOTHROW(static _inline a_RetType)
    16391623#elif defined(__IBMC__)
    1640 # define DECLINLINE(type)           DECL_NOTHROW(_Inline type)
    1641 #else
    1642 # define DECLINLINE(type)           DECL_NOTHROW(inline type)
     1624# define DECLINLINE(a_RetType)          DECL_NOTHROW(_Inline a_RetType)
     1625#else
     1626# define DECLINLINE(a_RetType)          DECL_NOTHROW(inline a_RetType)
    16431627#endif
    16441628
    16451629/** @def DECL_INLINE_THROW
    16461630 * How to declare a function as inline that throws C++ exceptions.
    1647  * @param   type    The return type of the function declaration.
     1631 * @param   a_RetType   The return type of the function declaration.
    16481632 * @remarks Don't use this macro on C++ methods.
    16491633 */
    16501634#if defined(__GNUC__) && !defined(DOXYGEN_RUNNING)
    1651 # define DECL_INLINE_THROW(type)    static __inline__ type
     1635# define DECL_INLINE_THROW(a_RetType)   static __inline__ a_RetType
    16521636#elif defined(__cplusplus) || defined(DOXYGEN_RUNNING)
    1653 # define DECL_INLINE_THROW(type)    static inline type
     1637# define DECL_INLINE_THROW(a_RetType)   static inline a_RetType
    16541638#elif defined(_MSC_VER)
    1655 # define DECL_INLINE_THROW(type)    static _inline type
     1639# define DECL_INLINE_THROW(a_RetType)   static _inline a_RetType
    16561640#elif defined(__IBMC__)
    1657 # define DECL_INLINE_THROW(type)    _Inline type
    1658 #else
    1659 # define DECL_INLINE_THROW(type)    inline type
     1641# define DECL_INLINE_THROW(a_RetType)   _Inline a_RetType
     1642#else
     1643# define DECL_INLINE_THROW(a_RetType)   inline a_RetType
    16601644#endif
    16611645
     
    16641648 * and try convince the compiler to always inline it regardless of optimization
    16651649 * switches.
    1666  * @param   type    The return type of the function declaration.
     1650 * @param   a_RetType   The return type of the function declaration.
    16671651 * @remarks Use sparsely and with care. Don't use this macro on C++ methods.
    16681652 * @sa      DECL_FORCE_INLINE_THROW
    16691653 */
    16701654#ifdef __GNUC__
    1671 # define DECL_FORCE_INLINE(type)    __attribute__((__always_inline__)) DECLINLINE(type)
     1655# define DECL_FORCE_INLINE(a_RetType)   __attribute__((__always_inline__)) DECLINLINE(a_RetType)
    16721656#elif defined(_MSC_VER)
    1673 # define DECL_FORCE_INLINE(type)    DECL_NOTHROW(__forceinline type)
    1674 #else
    1675 # define DECL_FORCE_INLINE(type)    DECLINLINE(type)
     1657# define DECL_FORCE_INLINE(a_RetType)   DECL_NOTHROW(__forceinline a_RetType)
     1658#else
     1659# define DECL_FORCE_INLINE(a_RetType)   DECLINLINE(a_RetType)
    16761660#endif
    16771661
     
    16791663 * How to declare a function throwing C++ exceptions as inline and try convince
    16801664 * the compiler to always inline it regardless of optimization switches.
    1681  * @param   type    The return type of the function declaration.
     1665 * @param   a_RetType   The return type of the function declaration.
    16821666 * @remarks Use sparsely and with care. Don't use this macro on C++ methods.
    16831667 */
    16841668#ifdef __GNUC__
    1685 # define DECL_FORCE_INLINE_THROW(type)  __attribute__((__always_inline__)) DECL_INLINE_THROW(type)
     1669# define DECL_FORCE_INLINE_THROW(a_RetType) __attribute__((__always_inline__)) DECL_INLINE_THROW(a_RetType)
    16861670#elif defined(_MSC_VER)
    1687 # define DECL_FORCE_INLINE_THROW(type)  __forceinline type
    1688 #else
    1689 # define DECL_FORCE_INLINE_THROW(type)  DECL_INLINE_THROW(type)
     1671# define DECL_FORCE_INLINE_THROW(a_RetType) __forceinline a_RetType
     1672#else
     1673# define DECL_FORCE_INLINE_THROW(a_RetType) DECL_INLINE_THROW(a_RetType)
    16901674#endif
    16911675
     
    16941678 * How to declare a function telling the compiler not to inline it.
    16951679 * @param   scope   The function scope, static or RT_NOTHING.
    1696  * @param   type    The return type of the function declaration.
     1680 * @param   a_RetType   The return type of the function declaration.
    16971681 * @remarks Don't use this macro on C++ methods.
    16981682 */
    16991683#ifdef __GNUC__
    1700 # define DECL_NO_INLINE(scope,type) __attribute__((__noinline__)) scope type
     1684# define DECL_NO_INLINE(scope, a_RetType)   __attribute__((__noinline__)) scope a_RetType
    17011685#elif defined(_MSC_VER)
    1702 # define DECL_NO_INLINE(scope,type) __declspec(noinline) scope type
    1703 #else
    1704 # define DECL_NO_INLINE(scope,type) scope type
     1686# define DECL_NO_INLINE(scope, a_RetType)   __declspec(noinline) scope a_RetType
     1687#else
     1688# define DECL_NO_INLINE(scope,a_RetType) scope a_RetType
    17051689#endif
    17061690
     
    17191703 * context ring-0 Runtime Library.
    17201704 */
    1721 /** @def RTR0DECL(type)
     1705/** @def RTR0DECL(a_RetType)
    17221706 * Runtime Library host context ring-0 export or import declaration.
    1723  * @param   type    The return type of the function declaration.
     1707 * @param   a_RetType   The return a_RetType of the function declaration.
    17241708 * @remarks This is only used inside IPRT.  Other APIs need to define their own
    17251709 *          XXXX_DECL macros for dealing with import/export/static visibility.
     
    17281712#ifdef IN_RT_R0
    17291713# ifdef IN_RT_STATIC
    1730 #  define RTR0DECL(type)    DECL_HIDDEN_NOTHROW(type) RTCALL
     1714#  define RTR0DECL(a_RetType)   DECL_HIDDEN_NOTHROW(a_RetType) RTCALL
    17311715# else
    1732 #  define RTR0DECL(type)    DECL_EXPORT_NOTHROW(type) RTCALL
    1733 # endif
    1734 #else
    1735 # define RTR0DECL(type)     DECL_IMPORT_NOTHROW(type) RTCALL
     1716#  define RTR0DECL(a_RetType)   DECL_EXPORT_NOTHROW(a_RetType) RTCALL
     1717# endif
     1718#else
     1719# define RTR0DECL(a_RetType)    DECL_IMPORT_NOTHROW(a_RetType) RTCALL
    17361720#endif
    17371721
     
    17401724 * context ring-3 Runtime Library.
    17411725 */
    1742 /** @def RTR3DECL(type)
     1726/** @def RTR3DECL(a_RetType)
    17431727 * Runtime Library host context ring-3 export or import declaration.
    1744  * @param   type    The return type of the function declaration.
     1728 * @param   a_RetType   The return type of the function declaration.
    17451729 * @remarks This is only used inside IPRT.  Other APIs need to define their own
    17461730 *          XXXX_DECL macros for dealing with import/export/static visibility.
     
    17491733#ifdef IN_RT_R3
    17501734# ifdef IN_RT_STATIC
    1751 #  define RTR3DECL(type)    DECL_HIDDEN_NOTHROW(type) RTCALL
     1735#  define RTR3DECL(a_RetType)   DECL_HIDDEN_NOTHROW(a_RetType) RTCALL
    17521736# else
    1753 #  define RTR3DECL(type)    DECL_EXPORT_NOTHROW(type) RTCALL
    1754 # endif
    1755 #else
    1756 # define RTR3DECL(type)     DECL_IMPORT_NOTHROW(type) RTCALL
     1737#  define RTR3DECL(a_RetType)   DECL_EXPORT_NOTHROW(a_RetType) RTCALL
     1738# endif
     1739#else
     1740# define RTR3DECL(a_RetType)    DECL_IMPORT_NOTHROW(a_RetType) RTCALL
    17571741#endif
    17581742
     
    17611745 * context (RC) runtime library.
    17621746 */
    1763 /** @def RTRCDECL(type)
     1747/** @def RTRCDECL(a_RetType)
    17641748 * Runtime Library raw-mode context export or import declaration.
    1765  * @param   type    The return type of the function declaration.
     1749 * @param   a_RetType   The return type of the function declaration.
    17661750 * @remarks This is only used inside IPRT.  Other APIs need to define their own
    17671751 *          XXXX_DECL macros for dealing with import/export/static visibility.
     
    17701754#ifdef IN_RT_RC
    17711755# ifdef IN_RT_STATIC
    1772 #  define RTRCDECL(type)    DECL_HIDDEN_NOTHROW(type) RTCALL
     1756#  define RTRCDECL(a_RetType)   DECL_HIDDEN_NOTHROW(a_RetType) RTCALL
    17731757# else
    1774 #  define RTRCDECL(type)    DECL_EXPORT_NOTHROW(type) RTCALL
    1775 # endif
    1776 #else
    1777 # define RTRCDECL(type)     DECL_IMPORT_NOTHROW(type) RTCALL
    1778 #endif
    1779 
    1780 /** @def RTDECL(type)
     1758#  define RTRCDECL(a_RetType)   DECL_EXPORT_NOTHROW(a_RetType) RTCALL
     1759# endif
     1760#else
     1761# define RTRCDECL(a_RetType)    DECL_IMPORT_NOTHROW(a_RetType) RTCALL
     1762#endif
     1763
     1764/** @def RTDECL(a_RetType)
    17811765 * Runtime Library export or import declaration.
    17821766 * Functions declared using this macro exists in all contexts.
    1783  * @param   type    The return type of the function declaration.
     1767 * @param   a_RetType   The return type of the function declaration.
    17841768 * @remarks This is only used inside IPRT.  Other APIs need to define their own
    17851769 *          XXXX_DECL macros for dealing with import/export/static visibility.
     
    17881772#if defined(IN_RT_R3) || defined(IN_RT_RC) || defined(IN_RT_R0)
    17891773# ifdef IN_RT_STATIC
    1790 #  define RTDECL(type)      DECL_HIDDEN_NOTHROW(type) RTCALL
     1774#  define RTDECL(a_RetType)     DECL_HIDDEN_NOTHROW(a_RetType) RTCALL
    17911775# else
    1792 #  define RTDECL(type)      DECL_EXPORT_NOTHROW(type) RTCALL
    1793 # endif
    1794 #else
    1795 # define RTDECL(type)       DECL_IMPORT_NOTHROW(type) RTCALL
    1796 #endif
    1797 
    1798 /** @def RTDATADECL(type)
     1776#  define RTDECL(a_RetType)     DECL_EXPORT_NOTHROW(a_RetType) RTCALL
     1777# endif
     1778#else
     1779# define RTDECL(a_RetType)      DECL_IMPORT_NOTHROW(a_RetType) RTCALL
     1780#endif
     1781
     1782/** @def RTDATADECL(a_RetType)
    17991783 * Runtime Library export or import declaration.
    18001784 * Data declared using this macro exists in all contexts.
    1801  * @param   type    The data type.
     1785 * @param   a_RetType   The data type.
    18021786 * @remarks This is only used inside IPRT.  Other APIs need to define their own
    18031787 *          XXXX_DECL macros for dealing with import/export/static visibility.
    18041788 */
    1805 /** @def RT_DECL_DATA_CONST(type)
     1789/** @def RT_DECL_DATA_CONST(a_RetType)
    18061790 * Definition of a const variable. See DECL_HIDDEN_CONST.
    1807  * @param   type    The const data type.
     1791 * @param   a_RetType   The const data type.
    18081792 * @remarks This is only used inside IPRT.  Other APIs need to define their own
    18091793 *          XXXX_DECL macros for dealing with import/export/static visibility.
     
    18111795#if defined(IN_RT_R3) || defined(IN_RT_RC) || defined(IN_RT_R0)
    18121796# ifdef IN_RT_STATIC
    1813 #  define RTDATADECL(type)          DECLHIDDEN(type)
    1814 #  define RT_DECL_DATA_CONST(type)  DECL_HIDDEN_CONST(type)
     1797#  define RTDATADECL(a_RetType)             DECLHIDDEN(a_RetType)
     1798#  define RT_DECL_DATA_CONST(a_RetType)     DECL_HIDDEN_CONST(a_RetType)
    18151799# else
    1816 #  define RTDATADECL(type)          DECLEXPORT(type)
     1800#  define RTDATADECL(a_RetType)             DECLEXPORT(a_RetType)
    18171801#  if defined(__cplusplus) && defined(__GNUC__)
    1818 #   define RT_DECL_DATA_CONST(type) type
     1802#   define RT_DECL_DATA_CONST(a_RetType)    a_RetType
    18191803#  else
    1820 #   define RT_DECL_DATA_CONST(type) DECLEXPORT(type)
     1804#   define RT_DECL_DATA_CONST(a_RetType)    DECLEXPORT(a_RetType)
    18211805#  endif
    18221806# endif
    18231807#else
    1824 # define RTDATADECL(type)           DECLIMPORT(type)
    1825 # define RT_DECL_DATA_CONST(type)   DECLIMPORT(type)
     1808# define RTDATADECL(a_RetType)              DECLIMPORT(a_RetType)
     1809# define RT_DECL_DATA_CONST(a_RetType)      DECLIMPORT(a_RetType)
    18261810#endif
    18271811
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