Changeset 85123 in vbox for trunk/include
- Timestamp:
- Jul 8, 2020 8:15:47 PM (5 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/em.h
r85121 r85123 328 328 VMMR3_INT_DECL(void) EMR3Reset(PVM pVM); 329 329 VMMR3_INT_DECL(int) EMR3Term(PVM pVM); 330 VMMR3DECL(DECL NORETURN(void))EMR3FatalError(PVMCPU pVCpu, int rc);330 VMMR3DECL(DECL_NO_RETURN(void)) EMR3FatalError(PVMCPU pVCpu, int rc); 331 331 VMMR3_INT_DECL(int) EMR3ExecuteVM(PVM pVM, PVMCPU pVCpu); 332 332 VMMR3_INT_DECL(int) EMR3CheckRawForcedActions(PVM pVM, PVMCPU pVCpu); -
trunk/include/iprt/cdefs.h
r85122 r85123 738 738 * Declare a type differently in GC, R3 and R0. 739 739 * 740 * @param GCTypeThe GC type.741 * @param R3TypeThe R3 type.742 * @param R0TypeThe R0 type.740 * @param a_GCType The GC type. 741 * @param a_R3Type The R3 type. 742 * @param a_R0Type The R0 type. 743 743 * @remark For pointers used only in one context use RCPTRTYPE(), R3R0PTRTYPE(), R3PTRTYPE() or R0PTRTYPE(). 744 744 */ 745 745 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 746 # define CTXTYPE( GCType, R3Type, R0Type)GCType746 # define CTXTYPE(a_GCType, a_R3Type, a_R0Type) a_GCType 747 747 #elif defined(IN_RING3) || defined(DOXYGEN_RUNNING) 748 # define CTXTYPE( GCType, R3Type, R0Type)R3Type749 #else 750 # define CTXTYPE( GCType, R3Type, R0Type)R0Type748 # define CTXTYPE(a_GCType, a_R3Type, a_R0Type) a_R3Type 749 #else 750 # define CTXTYPE(a_GCType, a_R3Type, a_R0Type) a_R0Type 751 751 #endif 752 752 … … 759 759 */ 760 760 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 761 # define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) 761 # define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) a_RCExpr 762 762 #elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING) 763 # define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) 764 #else 765 # define CTX_EXPR(a_R3Expr, a_R0Expr, a_RCExpr) 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 766 766 #endif 767 767 … … 771 771 * size when built for different architectures. 772 772 * 773 * @param RCTypeThe 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) 776 776 777 777 /** @def RGPTRTYPE 778 778 * This will become RCPTRTYPE once we've convered all uses of RCPTRTYPE to this. 779 779 * 780 * @param RCTypeThe 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) 783 783 784 784 /** @def R3R0PTRTYPE … … 787 787 * make sure structures have the same size when built for different architectures. 788 788 * 789 * @param R3R0Type The R3R0 type.789 * @param a_R3R0Type The R3R0 type. 790 790 * @remarks This used to be called HCPTRTYPE. 791 791 */ 792 #define R3R0PTRTYPE( R3R0Type) CTXTYPE(RTHCPTR, R3R0Type,R3R0Type)792 #define R3R0PTRTYPE(a_R3R0Type) CTXTYPE(RTHCPTR, a_R3R0Type, a_R3R0Type) 793 793 794 794 /** @def R3PTRTYPE … … 797 797 * size when built for different architectures. 798 798 * 799 * @param R3TypeThe 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) 802 802 803 803 /** @def R0PTRTYPE … … 806 806 * size when built for different architectures. 807 807 * 808 * @param R0TypeThe 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) 811 811 812 812 /** @def CTXSUFF … … 815 815 * 816 816 * This is macro should only be used in shared code to avoid a forest of ifdefs. 817 * @param varIdentifier name.817 * @param a_Var Identifier name. 818 818 * @deprecated Use CTX_SUFF. Do NOT use this for new code. 819 819 */ … … 823 823 * 824 824 * This is macro should only be used in shared code to avoid a forest of ifdefs. 825 * @param varIdentifier name.825 * @param a_Var Identifier name. 826 826 * @deprecated Use CTX_SUFF. Do NOT use this for new code. 827 827 */ 828 828 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 829 # define CTXSUFF( var) var##GC830 # define OTHERCTXSUFF( var) var##HC831 #else 832 # define CTXSUFF( var) var##HC833 # define OTHERCTXSUFF( var) var##GC829 # 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 834 834 #endif 835 835 … … 839 839 * 840 840 * 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. 842 842 * @deprecated Use CTX_SUFF. Do NOT use this for new code. 843 843 */ 844 844 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 845 # define CTXALLSUFF( var) var##GC845 # define CTXALLSUFF(a_Var) a_Var##GC 846 846 #elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING) 847 # define CTXALLSUFF( var) var##R0848 #else 849 # define CTXALLSUFF( var) var##R3847 # define CTXALLSUFF(a_Var) a_Var##R0 848 #else 849 # define CTXALLSUFF(a_Var) a_Var##R3 850 850 #endif 851 851 … … 855 855 * 856 856 * This is macro should only be used in shared code to avoid a forest of ifdefs. 857 * @param varIdentifier name.857 * @param a_Var Identifier name. 858 858 * 859 859 * @remark This will replace CTXALLSUFF and CTXSUFF before long. 860 860 */ 861 861 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 862 # define CTX_SUFF( var) var##RC862 # define CTX_SUFF(a_Var) a_Var##RC 863 863 #elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING) 864 # define CTX_SUFF( var) var##R0865 #else 866 # define CTX_SUFF( var) var##R3864 # define CTX_SUFF(a_Var) a_Var##R0 865 #else 866 # define CTX_SUFF(a_Var) a_Var##R3 867 867 #endif 868 868 … … 873 873 * 874 874 * This is macro should only be used in shared code to avoid a forest of ifdefs. 875 * @param varIdentifier name.875 * @param a_Var Identifier name. 876 876 * 877 877 * @remark This will replace CTXALLSUFF and CTXSUFF before long. 878 878 */ 879 879 #if defined(IN_RING3) || defined(DOXYGEN_RUNNING) 880 # define CTX_SUFF_Z( var) var##R3881 #else 882 # define CTX_SUFF_Z( var) var##RZ880 # define CTX_SUFF_Z(a_Var) a_Var##R3 881 #else 882 # define CTX_SUFF_Z(a_Var) a_Var##RZ 883 883 #endif 884 884 … … 889 889 * 890 890 * This is macro should only be used in shared code to avoid a forest of ifdefs. 891 * @param firstFirst name.892 * @param lastSurname.891 * @param a_First First name. 892 * @param a_Last Surname. 893 893 */ 894 894 /** @def OTHERCTXMID … … 897 897 * 898 898 * This is macro should only be used in shared code to avoid a forest of ifdefs. 899 * @param firstFirst name.900 * @param lastSurname.899 * @param a_First First name. 900 * @param a_Last Surname. 901 901 * @deprecated use CTX_MID or CTX_MID_Z 902 902 */ 903 903 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 904 # define CTXMID( first, last) first##GC##last905 # define OTHERCTXMID( first, last) first##HC##last906 #else 907 # define CTXMID( first, last) first##HC##last908 # define OTHERCTXMID( first, last) first##GC##last904 # 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 909 909 #endif 910 910 … … 914 914 * 915 915 * This is macro should only be used in shared code to avoid a forest of ifdefs. 916 * @param firstFirst name.917 * @param lastSurname.916 * @param a_First First name. 917 * @param a_Last Surname. 918 918 * @deprecated use CTX_MID or CTX_MID_Z 919 919 */ 920 920 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 921 # define CTXALLMID( first, last) first##GC##last921 # define CTXALLMID(a_First, a_Last) a_First##GC##a_Last 922 922 #elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING) 923 # define CTXALLMID( first, last) first##R0##last924 #else 925 # define CTXALLMID( first, last) first##R3##last923 # 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 926 926 #endif 927 927 … … 931 931 * 932 932 * This is macro should only be used in shared code to avoid a forest of ifdefs. 933 * @param firstFirst name.934 * @param lastSurname.933 * @param a_First First name. 934 * @param a_Last Surname. 935 935 */ 936 936 #if defined(IN_RC) && !defined(DOXYGEN_RUNNING) 937 # define CTX_MID( first, last) first##RC##last937 # define CTX_MID(a_First, a_Last) a_First##RC##a_Last 938 938 #elif defined(IN_RING0) && !defined(DOXYGEN_RUNNING) 939 # define CTX_MID( first, last) first##R0##last940 #else 941 # define CTX_MID( first, last) first##R3##last939 # 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 942 942 #endif 943 943 … … 948 948 * 949 949 * This is macro should only be used in shared code to avoid a forest of ifdefs. 950 * @param firstFirst name.951 * @param lastSurname.950 * @param a_First First name. 951 * @param a_Last Surname. 952 952 */ 953 953 #ifdef IN_RING3 954 # define CTX_MID_Z( first, last) first##R3##last955 #else 956 # define CTX_MID_Z( first, last) first##RZ##last954 # 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 957 957 #endif 958 958 … … 965 965 * between R3, R0 and/or GC. The intention is to avoid the \#ifdef IN_RING3 mess. 966 966 * 967 * @param pR3StringThe R3 string. Only referenced in R3.967 * @param a_pR3String The R3 string. Only referenced in R3. 968 968 * @see R0STRING and GCSTRING 969 969 */ 970 970 #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>") 974 974 #endif 975 975 … … 981 981 * between R3, R0 and/or GC. The intention is to avoid the \#ifdef IN_RING0 mess. 982 982 * 983 * @param pR0StringThe R0 string. Only referenced in R0.983 * @param a_pR0String The R0 string. Only referenced in R0. 984 984 * @see R3STRING and GCSTRING 985 985 */ 986 986 #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>") 990 990 #endif 991 991 … … 997 997 * between R3, R0 and/or RC. The intention is to avoid the \#ifdef IN_RC mess. 998 998 * 999 * @param pRCStringThe RC string. Only referenced in RC.999 * @param a_pRCString The RC string. Only referenced in RC. 1000 1000 * @see R3STRING, R0STRING 1001 1001 */ 1002 1002 #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>") 1006 1006 #endif 1007 1007 … … 1086 1086 * How to declare a function which does not throw C++ exceptions. 1087 1087 * 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 1089 1091 * @code 1090 1092 * EMR3DECL(DECL_NOTHROW(void)) foo(void); 1091 1093 * @endcode 1092 1094 * 1093 * @note GCC is currently restricted to 4.2+ given the ominous comments on1094 * RT_NOTHROW_PROTO.1095 * @note GCC is currently restricted to 4.2+ given the ominous comments on 1096 * RT_NOTHROW_PROTO. 1095 1097 */ 1096 1098 #ifdef __cplusplus 1097 1099 # ifdef _MSC_VER 1098 # define DECL_NOTHROW( type) __declspec(nothrow) type1100 # define DECL_NOTHROW(a_Type) __declspec(nothrow) a_Type 1099 1101 # elif RT_CLANG_PREREQ(6,0) || RT_GNUC_PREREQ(4,2) 1100 # define DECL_NOTHROW( type) __attribute__((__nothrow__)) type1102 # define DECL_NOTHROW(a_Type) __attribute__((__nothrow__)) a_Type 1101 1103 # 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 1130 1108 #endif 1131 1109 … … 1183 1161 * compilers does not want this kind of information and will warning about it. 1184 1162 * 1185 * @param typeThe type exception.1163 * @param a_Type The type exception. 1186 1164 * 1187 1165 * @remarks If the actual throwing is done from the header, enclose it by … … 1193 1171 #ifdef RT_EXCEPTIONS_ENABLED 1194 1172 # if RT_MSC_PREREQ_EX(RT_MSC_VER_VC71, 0) 1195 # define RT_THROW( type)1173 # define RT_THROW(a_Type) 1196 1174 # elif RT_GNUC_PREREQ(7, 0) 1197 # define RT_THROW( type)1175 # define RT_THROW(a_Type) 1198 1176 # 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) 1203 1181 #endif 1204 1182 … … 1232 1210 /** @def RT_NOEXCEPT_EX 1233 1211 * Wrapper for the C++11 noexcept keyword with expression. 1212 * @param a_Expr The expression. 1234 1213 */ 1235 1214 #ifdef __cplusplus … … 1237 1216 || RT_CLANG_HAS_FEATURE(cxx_noexcept) \ 1238 1217 || (RT_GNUC_PREREQ(7, 0) && __cplusplus >= 201100) 1239 # define RT_NOEXCEPT noexcept1240 # define RT_NOEXCEPT_EX( expr) noexcept(expr)1218 # define RT_NOEXCEPT noexcept 1219 # define RT_NOEXCEPT_EX(a_Expr) noexcept(a_Expr) 1241 1220 # else 1242 1221 # define RT_NOEXCEPT 1243 # define RT_NOEXCEPT_EX( expr)1222 # define RT_NOEXCEPT_EX(a_Expr) 1244 1223 # endif 1245 1224 #else 1246 1225 # define RT_NOEXCEPT 1247 # define RT_NOEXCEPT_EX( expr)1226 # define RT_NOEXCEPT_EX(a_Expr) 1248 1227 #endif 1249 1228 … … 1332 1311 */ 1333 1312 #if defined(_MSC_VER) || defined(__WATCOMC__) 1334 # define RTCALL __cdecl1313 # define RTCALL __cdecl 1335 1314 #elif defined(RT_OS_OS2) 1336 # define RTCALL __cdecl1315 # define RTCALL __cdecl 1337 1316 #elif defined(__GNUC__) && defined(RT_ARCH_X86) 1338 # define RTCALL __attribute__((__cdecl__,__regparm__(0)))1317 # define RTCALL __attribute__((__cdecl__,__regparm__(0))) 1339 1318 #else 1340 1319 # define RTCALL … … 1343 1322 /** @def DECLEXPORT 1344 1323 * How to declare an exported function. 1345 * @param typeThe return type of the function declaration.1324 * @param a_RetType The return type of the function declaration. 1346 1325 */ 1347 1326 #if defined(_MSC_VER) || defined(RT_OS_OS2) 1348 # define DECLEXPORT( type) __declspec(dllexport) type1327 # define DECLEXPORT(a_RetType) __declspec(dllexport) a_RetType 1349 1328 #elif defined(RT_USE_VISIBILITY_DEFAULT) 1350 # define DECLEXPORT( type) __attribute__((visibility("default"))) type1351 #else 1352 # define DECLEXPORT( type) type1329 # define DECLEXPORT(a_RetType) __attribute__((visibility("default"))) a_RetType 1330 #else 1331 # define DECLEXPORT(a_RetType) a_RetType 1353 1332 #endif 1354 1333 1355 1334 /** @def DECL_IMPORT_NOTHROW 1356 1335 * How to declare an exported function that does not throw C++ exceptions. 1357 * @param typeThe 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)) 1360 1339 1361 1340 /** @def DECLIMPORT 1362 1341 * How to declare an imported function. 1363 * @param typeThe return type of the function declaration.1342 * @param a_RetType The return type of the function declaration. 1364 1343 */ 1365 1344 #if defined(_MSC_VER) || (defined(RT_OS_OS2) && !defined(__IBMC__) && !defined(__IBMCPP__)) 1366 # define DECLIMPORT( type) __declspec(dllimport) type1367 #else 1368 # define DECLIMPORT( type) type1345 # define DECLIMPORT(a_RetType) __declspec(dllimport) a_RetType 1346 #else 1347 # define DECLIMPORT(a_RetType) a_RetType 1369 1348 #endif 1370 1349 1371 1350 /** @def DECL_IMPORT_NOTHROW 1372 1351 * How to declare an imported function that does not throw C++ exceptions. 1373 * @param typeThe 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)) 1376 1355 1377 1356 /** @def DECLHIDDEN 1378 1357 * 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. 1380 1361 */ 1381 1362 #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 1385 1377 #endif 1386 1378 1387 1379 /** @def DECL_HIDDEN_CONST 1388 1380 * Workaround for g++ warnings when applying the hidden attribute to a const 1389 * definition. Use DECL HIDDENfor the declaration.1390 * @param a_Type The return type of the function or the data type of1391 * 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 1392 1384 */ 1393 1385 #if defined(__cplusplus) && defined(__GNUC__) 1394 # define DECL_HIDDEN_CONST(a_Type) a_Type1395 #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) 1397 1389 #endif 1398 1390 1399 1391 /** @def DECL_HIDDEN_NOTHROW 1400 1392 * 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)) 1404 1396 1405 1397 /** @def DECL_INVALID … … 1407 1399 * The purpose is to create compile or like time errors when used. This isn't 1408 1400 * possible on all platforms. 1409 * @param typeThe return type of the function.1401 * @param a_RetType The return type of the function. 1410 1402 */ 1411 1403 #if defined(_MSC_VER) 1412 # define DECL_INVALID( type) __declspec(dllimport) type __stdcall1404 # define DECL_INVALID(a_RetType) __declspec(dllimport) a_RetType __stdcall 1413 1405 #elif defined(__GNUC__) && defined(__cplusplus) 1414 # define DECL_INVALID( type) extern "C++" type1415 #else 1416 # define DECL_INVALID( type) type1406 # define DECL_INVALID(a_RetType) extern "C++" a_RetType 1407 #else 1408 # define DECL_INVALID(a_RetType) a_RetType 1417 1409 #endif 1418 1410 1419 1411 /** @def DECLASM 1420 1412 * How to declare an internal assembly function. 1421 * @param typeThe return type of the function declaration.1413 * @param a_RetType The return type of the function declaration. 1422 1414 * @note DECL_NOTHROW is implied. 1423 1415 */ 1424 1416 #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 1435 1421 1436 1422 /** @def RT_ASM_DECL_PRAGMA_WATCOM … … 1440 1426 * 8086, 80186 or 80286 is selected as the target CPU. */ 1441 1427 #if defined(__WATCOMC__) && ARCH_BITS == 16 && defined(RT_ARCH_X86) 1442 # define RT_ASM_DECL_PRAGMA_WATCOM( type) type1428 # define RT_ASM_DECL_PRAGMA_WATCOM(a_RetType) a_RetType 1443 1429 # 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) 1445 1431 # else 1446 # define RT_ASM_DECL_PRAGMA_WATCOM_386( type) type1432 # define RT_ASM_DECL_PRAGMA_WATCOM_386(a_RetType) a_RetType 1447 1433 # endif 1448 1434 #elif defined(__WATCOMC__) && ARCH_BITS == 32 && defined(RT_ARCH_X86) 1449 # define RT_ASM_DECL_PRAGMA_WATCOM( type) type1450 # define RT_ASM_DECL_PRAGMA_WATCOM_386( type) type1451 #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) 1454 1440 #endif 1455 1441 … … 1462 1448 */ 1463 1449 #ifdef _MSC_VER 1464 # define DECL_NO_RETURN( type) __declspec(noreturn) type1450 # define DECL_NO_RETURN(a_RetType) __declspec(noreturn) a_RetType 1465 1451 #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 1472 1456 1473 1457 /** @def DECL_RETURNS_TWICE … … 1479 1463 */ 1480 1464 #if RT_GNUC_PREREQ(4, 1) 1481 # define DECL_RETURNS_TWICE( type) __attribute__((returns_twice)) type1465 # define DECL_RETURNS_TWICE(a_RetType) __attribute__((returns_twice)) a_RetType 1482 1466 # else 1483 # define DECL_RETURNS_TWICE( type) type1467 # define DECL_RETURNS_TWICE(a_RetType) a_RetType 1484 1468 #endif 1485 1469 … … 1493 1477 */ 1494 1478 #if defined(__GNUC__) 1495 # define DECLWEAK( type) type __attribute__((weak))1496 #else 1497 # define DECLWEAK( type) type1479 # define DECLWEAK(a_Type) a_Type __attribute__((weak)) 1480 #else 1481 # define DECLWEAK(a_Type) a_Type 1498 1482 #endif 1499 1483 1500 1484 /** @def DECLCALLBACK 1501 1485 * How to declare an call back function. 1502 * @param typeThe return type of the function declaration.1486 * @param a_RetType The return type of the function declaration. 1503 1487 * @note Use DECLCALLBACKTYPE for typedefs. 1504 1488 */ 1505 #define DECLCALLBACK( type) DECL_NOTHROW(type RT_FAR_CODE RTCALL)1489 #define DECLCALLBACK(a_Type) DECL_NOTHROW(a_Type RT_FAR_CODE RTCALL) 1506 1490 1507 1491 /** @def DECLCALLBACKTYPE_EX 1508 1492 * How to declare an call back function type. 1509 * @param typeThe return type of the function declaration.1510 * @param cconvCalling convention.1511 * @param nameThe name of the typedef1512 * @param a rgsThe 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. 1513 1497 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1514 1498 */ 1515 1499 #if RT_CLANG_PREREQ(6,0) 1516 # define DECLCALLBACKTYPE_EX( type, cconv, name, args) __attribute__((__nothrow__)) type cconv name args1500 # define DECLCALLBACKTYPE_EX(a_RetType, a_CallConv, a_Name, a_Args) __attribute__((__nothrow__)) a_RetType a_CallConv a_Name a_Args 1517 1501 #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 args1502 # 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 1521 1505 #endif 1522 1506 /** @def DECLCALLBACKTYPE 1523 1507 * How to declare an call back function type. 1524 * @param typeThe return type of the function declaration.1525 * @param nameThe name of the typedef1526 * @param a rgsThe 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. 1527 1511 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1528 1512 */ 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) 1530 1514 1531 1515 /** @def DECLCALLBACKPTR_EX 1532 1516 * How to declare an call back function pointer. 1533 * @param typeThe return type of the function declaration.1534 * @param cconvCalling convention.1535 * @param nameThe name of the variable member.1536 * @param a rgsThe 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. 1537 1521 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1538 1522 */ 1539 1523 #if defined(__IBMC__) || defined(__IBMCPP__) 1540 # define DECLCALLBACKPTR_EX( type, cconv, name, args) type (* cconv name) args1524 # define DECLCALLBACKPTR_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (* a_CallConv a_Name) a_Args 1541 1525 #elif RT_CLANG_PREREQ(6,0) 1542 # define DECLCALLBACKPTR_EX( type, cconv, name, args) __attribute__((__nothrow__)) type (cconv * name) args1526 # define DECLCALLBACKPTR_EX(a_RetType, a_CallConv, a_Name, a_Args) __attribute__((__nothrow__)) a_RetType (a_CallConv * a_Name) a_Args 1543 1527 #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) args1528 # 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 1547 1531 #endif 1548 1532 /** @def DECLCALLBACKPTR 1549 1533 * How to declare an call back function pointer. 1550 * @param typeThe return type of the function declaration.1551 * @param nameThe name of the variable member.1552 * @param a rgsThe 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. 1553 1537 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1554 1538 */ 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) 1556 1540 1557 1541 /** @def DECLCALLBACKMEMBER_EX 1558 1542 * How to declare an call back function pointer member. 1559 * @param typeThe return type of the function declaration.1560 * @param cconvCalling convention.1561 * @param nameThe name of the struct/union/class member.1562 * @param a rgsThe 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. 1563 1547 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1564 1548 */ 1565 1549 #if defined(__IBMC__) || defined(__IBMCPP__) 1566 # define DECLCALLBACKMEMBER_EX( type, cconv, name, args) type (* cconv name) args1550 # define DECLCALLBACKMEMBER_EX(a_RetType, a_CallConv, a_Name, a_Args) a_RetType (* a_CallConv a_Name) a_Args 1567 1551 #elif RT_CLANG_PREREQ(6,0) 1568 # define DECLCALLBACKMEMBER_EX( type, cconv, name, args) __attribute__((__nothrow__)) type (cconv *name) args1552 # define DECLCALLBACKMEMBER_EX(a_RetType, a_CallConv, a_Name, a_Args) __attribute__((__nothrow__)) a_RetType (a_CallConv *a_Name) a_Args 1569 1553 #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) args1554 # 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 1573 1557 #endif 1574 1558 /** @def DECLCALLBACKMEMBER 1575 1559 * How to declare an call back function pointer member. 1576 * @param typeThe return type of the function declaration.1577 * @param nameThe name of the struct/union/class member.1578 * @param a rgsThe 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. 1579 1563 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1580 1564 */ 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) 1582 1566 1583 1567 /** @def DECLR3CALLBACKMEMBER 1584 1568 * How to declare an call back function pointer member - R3 Ptr. 1585 * @param typeThe return type of the function declaration.1586 * @param nameThe name of the struct/union/class member.1587 * @param a rgsThe 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. 1588 1572 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1589 1573 */ 1590 1574 #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 name1575 # 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 1594 1578 #endif 1595 1579 1596 1580 /** @def DECLRCCALLBACKMEMBER 1597 1581 * How to declare an call back function pointer member - RC Ptr. 1598 * @param typeThe return type of the function declaration.1599 * @param nameThe name of the struct/union/class member.1600 * @param a rgsThe 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. 1601 1585 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1602 1586 */ 1603 1587 #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 name1588 # 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 1607 1591 #endif 1608 1592 #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 name1593 # 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 1612 1596 #endif 1613 1597 1614 1598 /** @def DECLR0CALLBACKMEMBER 1615 1599 * How to declare an call back function pointer member - R0 Ptr. 1616 * @param typeThe return type of the function declaration.1617 * @param nameThe name of the struct/union/class member.1618 * @param a rgsThe 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. 1619 1603 * @note DECL_NOTHROW is implied, but not supported by all compilers yet. 1620 1604 */ 1621 1605 #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 name1606 # 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 1625 1609 #endif 1626 1610 1627 1611 /** @def DECLINLINE 1628 1612 * How to declare a function as inline that does not throw any C++ exceptions. 1629 * @param typeThe return type of the function declaration.1613 * @param a_RetType The return type of the function declaration. 1630 1614 * @remarks Don't use this macro on C++ methods. 1631 1615 * @sa DECL_INLINE_THROW 1632 1616 */ 1633 1617 #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) 1635 1619 #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) 1637 1621 #elif defined(_MSC_VER) 1638 # define DECLINLINE( type) DECL_NOTHROW(static _inline type)1622 # define DECLINLINE(a_RetType) DECL_NOTHROW(static _inline a_RetType) 1639 1623 #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) 1643 1627 #endif 1644 1628 1645 1629 /** @def DECL_INLINE_THROW 1646 1630 * How to declare a function as inline that throws C++ exceptions. 1647 * @param typeThe return type of the function declaration.1631 * @param a_RetType The return type of the function declaration. 1648 1632 * @remarks Don't use this macro on C++ methods. 1649 1633 */ 1650 1634 #if defined(__GNUC__) && !defined(DOXYGEN_RUNNING) 1651 # define DECL_INLINE_THROW( type) static __inline__ type1635 # define DECL_INLINE_THROW(a_RetType) static __inline__ a_RetType 1652 1636 #elif defined(__cplusplus) || defined(DOXYGEN_RUNNING) 1653 # define DECL_INLINE_THROW( type) static inline type1637 # define DECL_INLINE_THROW(a_RetType) static inline a_RetType 1654 1638 #elif defined(_MSC_VER) 1655 # define DECL_INLINE_THROW( type) static _inline type1639 # define DECL_INLINE_THROW(a_RetType) static _inline a_RetType 1656 1640 #elif defined(__IBMC__) 1657 # define DECL_INLINE_THROW( type) _Inline type1658 #else 1659 # define DECL_INLINE_THROW( type) inline type1641 # define DECL_INLINE_THROW(a_RetType) _Inline a_RetType 1642 #else 1643 # define DECL_INLINE_THROW(a_RetType) inline a_RetType 1660 1644 #endif 1661 1645 … … 1664 1648 * and try convince the compiler to always inline it regardless of optimization 1665 1649 * switches. 1666 * @param typeThe return type of the function declaration.1650 * @param a_RetType The return type of the function declaration. 1667 1651 * @remarks Use sparsely and with care. Don't use this macro on C++ methods. 1668 1652 * @sa DECL_FORCE_INLINE_THROW 1669 1653 */ 1670 1654 #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) 1672 1656 #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) 1676 1660 #endif 1677 1661 … … 1679 1663 * How to declare a function throwing C++ exceptions as inline and try convince 1680 1664 * the compiler to always inline it regardless of optimization switches. 1681 * @param typeThe return type of the function declaration.1665 * @param a_RetType The return type of the function declaration. 1682 1666 * @remarks Use sparsely and with care. Don't use this macro on C++ methods. 1683 1667 */ 1684 1668 #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) 1686 1670 #elif defined(_MSC_VER) 1687 # define DECL_FORCE_INLINE_THROW( type) __forceinline type1688 #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) 1690 1674 #endif 1691 1675 … … 1694 1678 * How to declare a function telling the compiler not to inline it. 1695 1679 * @param scope The function scope, static or RT_NOTHING. 1696 * @param typeThe return type of the function declaration.1680 * @param a_RetType The return type of the function declaration. 1697 1681 * @remarks Don't use this macro on C++ methods. 1698 1682 */ 1699 1683 #ifdef __GNUC__ 1700 # define DECL_NO_INLINE(scope, type) __attribute__((__noinline__)) scope type1684 # define DECL_NO_INLINE(scope, a_RetType) __attribute__((__noinline__)) scope a_RetType 1701 1685 #elif defined(_MSC_VER) 1702 # define DECL_NO_INLINE(scope, type) __declspec(noinline) scope type1703 #else 1704 # define DECL_NO_INLINE(scope, type) scope type1686 # 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 1705 1689 #endif 1706 1690 … … 1719 1703 * context ring-0 Runtime Library. 1720 1704 */ 1721 /** @def RTR0DECL( type)1705 /** @def RTR0DECL(a_RetType) 1722 1706 * 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. 1724 1708 * @remarks This is only used inside IPRT. Other APIs need to define their own 1725 1709 * XXXX_DECL macros for dealing with import/export/static visibility. … … 1728 1712 #ifdef IN_RT_R0 1729 1713 # ifdef IN_RT_STATIC 1730 # define RTR0DECL( type) DECL_HIDDEN_NOTHROW(type) RTCALL1714 # define RTR0DECL(a_RetType) DECL_HIDDEN_NOTHROW(a_RetType) RTCALL 1731 1715 # else 1732 # define RTR0DECL( type) DECL_EXPORT_NOTHROW(type) RTCALL1733 # endif 1734 #else 1735 # define RTR0DECL( type) DECL_IMPORT_NOTHROW(type) RTCALL1716 # 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 1736 1720 #endif 1737 1721 … … 1740 1724 * context ring-3 Runtime Library. 1741 1725 */ 1742 /** @def RTR3DECL( type)1726 /** @def RTR3DECL(a_RetType) 1743 1727 * Runtime Library host context ring-3 export or import declaration. 1744 * @param typeThe return type of the function declaration.1728 * @param a_RetType The return type of the function declaration. 1745 1729 * @remarks This is only used inside IPRT. Other APIs need to define their own 1746 1730 * XXXX_DECL macros for dealing with import/export/static visibility. … … 1749 1733 #ifdef IN_RT_R3 1750 1734 # ifdef IN_RT_STATIC 1751 # define RTR3DECL( type) DECL_HIDDEN_NOTHROW(type) RTCALL1735 # define RTR3DECL(a_RetType) DECL_HIDDEN_NOTHROW(a_RetType) RTCALL 1752 1736 # else 1753 # define RTR3DECL( type) DECL_EXPORT_NOTHROW(type) RTCALL1754 # endif 1755 #else 1756 # define RTR3DECL( type) DECL_IMPORT_NOTHROW(type) RTCALL1737 # 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 1757 1741 #endif 1758 1742 … … 1761 1745 * context (RC) runtime library. 1762 1746 */ 1763 /** @def RTRCDECL( type)1747 /** @def RTRCDECL(a_RetType) 1764 1748 * Runtime Library raw-mode context export or import declaration. 1765 * @param typeThe return type of the function declaration.1749 * @param a_RetType The return type of the function declaration. 1766 1750 * @remarks This is only used inside IPRT. Other APIs need to define their own 1767 1751 * XXXX_DECL macros for dealing with import/export/static visibility. … … 1770 1754 #ifdef IN_RT_RC 1771 1755 # ifdef IN_RT_STATIC 1772 # define RTRCDECL( type) DECL_HIDDEN_NOTHROW(type) RTCALL1756 # define RTRCDECL(a_RetType) DECL_HIDDEN_NOTHROW(a_RetType) RTCALL 1773 1757 # else 1774 # define RTRCDECL( type) DECL_EXPORT_NOTHROW(type) RTCALL1775 # endif 1776 #else 1777 # define RTRCDECL( type) DECL_IMPORT_NOTHROW(type) RTCALL1778 #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) 1781 1765 * Runtime Library export or import declaration. 1782 1766 * Functions declared using this macro exists in all contexts. 1783 * @param typeThe return type of the function declaration.1767 * @param a_RetType The return type of the function declaration. 1784 1768 * @remarks This is only used inside IPRT. Other APIs need to define their own 1785 1769 * XXXX_DECL macros for dealing with import/export/static visibility. … … 1788 1772 #if defined(IN_RT_R3) || defined(IN_RT_RC) || defined(IN_RT_R0) 1789 1773 # ifdef IN_RT_STATIC 1790 # define RTDECL( type) DECL_HIDDEN_NOTHROW(type) RTCALL1774 # define RTDECL(a_RetType) DECL_HIDDEN_NOTHROW(a_RetType) RTCALL 1791 1775 # else 1792 # define RTDECL( type) DECL_EXPORT_NOTHROW(type) RTCALL1793 # endif 1794 #else 1795 # define RTDECL( type) DECL_IMPORT_NOTHROW(type) RTCALL1796 #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) 1799 1783 * Runtime Library export or import declaration. 1800 1784 * Data declared using this macro exists in all contexts. 1801 * @param typeThe data type.1785 * @param a_RetType The data type. 1802 1786 * @remarks This is only used inside IPRT. Other APIs need to define their own 1803 1787 * XXXX_DECL macros for dealing with import/export/static visibility. 1804 1788 */ 1805 /** @def RT_DECL_DATA_CONST( type)1789 /** @def RT_DECL_DATA_CONST(a_RetType) 1806 1790 * Definition of a const variable. See DECL_HIDDEN_CONST. 1807 * @param typeThe const data type.1791 * @param a_RetType The const data type. 1808 1792 * @remarks This is only used inside IPRT. Other APIs need to define their own 1809 1793 * XXXX_DECL macros for dealing with import/export/static visibility. … … 1811 1795 #if defined(IN_RT_R3) || defined(IN_RT_RC) || defined(IN_RT_R0) 1812 1796 # 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) 1815 1799 # else 1816 # define RTDATADECL( type) DECLEXPORT(type)1800 # define RTDATADECL(a_RetType) DECLEXPORT(a_RetType) 1817 1801 # if defined(__cplusplus) && defined(__GNUC__) 1818 # define RT_DECL_DATA_CONST( type) type1802 # define RT_DECL_DATA_CONST(a_RetType) a_RetType 1819 1803 # else 1820 # define RT_DECL_DATA_CONST( type) DECLEXPORT(type)1804 # define RT_DECL_DATA_CONST(a_RetType) DECLEXPORT(a_RetType) 1821 1805 # endif 1822 1806 # endif 1823 1807 #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) 1826 1810 #endif 1827 1811
Note:
See TracChangeset
for help on using the changeset viewer.