Changeset 68572 in vbox
- Timestamp:
- Aug 31, 2017 12:10:45 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117789
- Location:
- trunk/include/iprt
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm-amd64-x86-watcom-16.h
r62473 r68572 30 30 #define ___iprt_asm_amd64_x86_watcom_16_h 31 31 32 #if !RT_ FAR_DATA32 #if !RT_DATA_IS_FAR 33 33 # error "Only works with far data pointers!" 34 34 #endif -
trunk/include/iprt/asm-watcom-x86-16.h
r62473 r68572 30 30 #define ___iprt_asm_watcom_x86_16_h 31 31 32 #if !RT_ FAR_DATA32 #if !RT_DATA_IS_FAR 33 33 # error "Only works with far data pointers!" 34 34 #endif -
trunk/include/iprt/asm.h
r65816 r68572 535 535 DECLINLINE(void *) ASMAtomicXchgPtr(void * volatile *ppv, const void *pv) 536 536 { 537 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)537 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 538 538 return (void *)ASMAtomicXchgU32((volatile uint32_t *)(void *)ppv, (uint32_t)pv); 539 539 #elif ARCH_BITS == 64 … … 590 590 DECLINLINE(RTR0PTR) ASMAtomicXchgR0Ptr(RTR0PTR volatile *ppvR0, RTR0PTR pvR0) 591 591 { 592 #if R0_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)592 #if R0_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 593 593 return (RTR0PTR)ASMAtomicXchgU32((volatile uint32_t *)(void *)ppvR0, (uint32_t)pvR0); 594 594 #elif R0_ARCH_BITS == 64 … … 609 609 DECLINLINE(RTR3PTR) ASMAtomicXchgR3Ptr(RTR3PTR volatile *ppvR3, RTR3PTR pvR3) 610 610 { 611 #if R3_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)611 #if R3_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 612 612 return (RTR3PTR)ASMAtomicXchgU32((volatile uint32_t *)(void *)ppvR3, (uint32_t)pvR3); 613 613 #elif R3_ARCH_BITS == 64 … … 628 628 * @remarks This doesn't currently work for all handles (like RTFILE). 629 629 */ 630 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)630 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 631 631 # define ASMAtomicXchgHandle(ph, hNew, phRes) \ 632 632 do { \ … … 963 963 DECLINLINE(bool) ASMAtomicCmpXchgPtrVoid(void * volatile *ppv, const void *pvNew, const void *pvOld) 964 964 { 965 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)965 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 966 966 return ASMAtomicCmpXchgU32((volatile uint32_t *)(void *)ppv, (uint32_t)pvNew, (uint32_t)pvOld); 967 967 #elif ARCH_BITS == 64 … … 1014 1014 * @remarks x86: Requires a 486 or later. 1015 1015 */ 1016 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)1016 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 1017 1017 # define ASMAtomicCmpXchgHandle(ph, hNew, hOld, fRc) \ 1018 1018 do { \ … … 1273 1273 * @remarks This doesn't currently work for all handles (like RTFILE). 1274 1274 */ 1275 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)1275 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 1276 1276 # define ASMAtomicCmpXchgExHandle(ph, hNew, hOld, fRc, phOldVal) \ 1277 1277 do { \ … … 1335 1335 DECLINLINE(bool) ASMAtomicCmpXchgExPtrVoid(void * volatile *ppv, const void *pvNew, const void *pvOld, void **ppvOld) 1336 1336 { 1337 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)1337 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 1338 1338 return ASMAtomicCmpXchgExU32((volatile uint32_t *)(void *)ppv, (uint32_t)pvNew, (uint32_t)pvOld, (uint32_t *)ppvOld); 1339 1339 #elif ARCH_BITS == 64 … … 1945 1945 DECLINLINE(size_t) ASMAtomicUoReadZ(size_t volatile *pcb) 1946 1946 { 1947 #if ARCH_BITS == 64 || (ARCH_BITS == 16 && RT_ FAR_DATA)1947 #if ARCH_BITS == 64 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 1948 1948 return ASMAtomicUoReadU64((uint64_t volatile *)pcb); 1949 1949 #elif ARCH_BITS == 32 … … 1969 1969 DECLINLINE(void *) ASMAtomicReadPtr(void * volatile *ppv) 1970 1970 { 1971 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)1971 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 1972 1972 return (void *)ASMAtomicReadU32((volatile uint32_t *)(void *)ppv); 1973 1973 #elif ARCH_BITS == 64 … … 2010 2010 DECLINLINE(void *) ASMAtomicUoReadPtr(void * volatile *ppv) 2011 2011 { 2012 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)2012 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 2013 2013 return (void *)ASMAtomicUoReadU32((volatile uint32_t *)(void *)ppv); 2014 2014 #elif ARCH_BITS == 64 … … 2074 2074 * @remarks This doesn't currently work for all handles (like RTFILE). 2075 2075 */ 2076 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)2076 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 2077 2077 # define ASMAtomicReadHandle(ph, phRes) \ 2078 2078 do { \ … … 2101 2101 * @remarks This doesn't currently work for all handles (like RTFILE). 2102 2102 */ 2103 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)2103 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 2104 2104 # define ASMAtomicUoReadHandle(ph, phRes) \ 2105 2105 do { \ … … 2404 2404 DECLINLINE(void) ASMAtomicWritePtrVoid(void * volatile *ppv, const void *pv) 2405 2405 { 2406 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)2406 #if ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 2407 2407 ASMAtomicWriteU32((volatile uint32_t *)(void *)ppv, (uint32_t)pv); 2408 2408 #elif ARCH_BITS == 64 … … 2548 2548 * @remarks This doesn't currently work for all handles (like RTFILE). 2549 2549 */ 2550 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)2550 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 2551 2551 # define ASMAtomicWriteHandle(ph, hNew) \ 2552 2552 do { \ … … 2573 2573 * @remarks This doesn't currently work for all handles (like RTFILE). 2574 2574 */ 2575 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_ FAR_DATA)2575 #if HC_ARCH_BITS == 32 || (ARCH_BITS == 16 && RT_DATA_IS_FAR) 2576 2576 # define ASMAtomicUoWriteHandle(ph, hNew) \ 2577 2577 do { \ -
trunk/include/iprt/cdefs.h
r67187 r68572 1294 1294 * @param type The return type of the function declaration. 1295 1295 */ 1296 #define DECLCALLBACK(type) type RT CALL1296 #define DECLCALLBACK(type) type RT_FAR_CODE RTCALL 1297 1297 1298 1298 /** @def DECLCALLBACKPTR … … 1304 1304 # define DECLCALLBACKPTR(type, name) type (* RTCALL name) 1305 1305 #else 1306 # define DECLCALLBACKPTR(type, name) type (RT CALL * name)1306 # define DECLCALLBACKPTR(type, name) type (RT_FAR_CODE RTCALL * name) 1307 1307 #endif 1308 1308 … … 1315 1315 # define DECLCALLBACKMEMBER(type, name) type (* RTCALL name) 1316 1316 #else 1317 # define DECLCALLBACKMEMBER(type, name) type (RT CALL * name)1317 # define DECLCALLBACKMEMBER(type, name) type (RT_FAR_CODE RTCALL * name) 1318 1318 #endif 1319 1319 … … 3640 3640 #endif 3641 3641 3642 /** @def RT_ FAR_DATA3642 /** @def RT_DATA_IS_FAR 3643 3643 * Set to 1 if we're in 16-bit mode and use far pointers. 3644 3644 */ 3645 3645 #if ARCH_BITS == 16 && defined(__WATCOMC__) \ 3646 3646 && (defined(__COMPACT__) || defined(__LARGE__)) 3647 # define RT_FAR_DATA 1 3648 #else 3649 # define RT_FAR_DATA 0 3650 #endif 3647 # define RT_DATA_IS_FAR 1 3648 #else 3649 # define RT_DATA_IS_FAR 0 3650 #endif 3651 3652 /** @def RT_FAR 3653 * For indicating far pointers in 16-bit code. 3654 * Does nothing in 32-bit and 64-bit code. */ 3655 /** @def RT_NEAR 3656 * For indicating near pointers in 16-bit code. 3657 * Does nothing in 32-bit and 64-bit code. */ 3658 /** @def RT_FAR_CODE 3659 * For indicating far 16-bit functions. 3660 * Does nothing in 32-bit and 64-bit code. */ 3661 /** @def RT_NEAR_CODE 3662 * For indicating near 16-bit functions. 3663 * Does nothing in 32-bit and 64-bit code. */ 3664 /** @def RT_FAR_DATA 3665 * For indicating far 16-bit external data, i.e. in a segment other than DATA16. 3666 * Does nothing in 32-bit and 64-bit code. */ 3667 #if ARCH_BITS == 16 3668 # define RT_FAR __far 3669 # define RT_NEAR __near 3670 # define RT_FAR_CODE __far 3671 # define RT_NEAR_CODE __near 3672 # define RT_FAR_DATA __far 3673 #else 3674 # define RT_FAR 3675 # define RT_NEAR 3676 # define RT_FAR_CODE 3677 # define RT_NEAR_CODE 3678 # define RT_FAR_DATA 3679 #endif 3680 3651 3681 3652 3682 /** @} */ -
trunk/include/iprt/types.h
r68317 r68572 337 337 } RTUINT16U; 338 338 /** Pointer to a 16-bit unsigned integer union. */ 339 typedef RTUINT16U *PRTUINT16U;339 typedef RTUINT16U RT_FAR *PRTUINT16U; 340 340 /** Pointer to a const 32-bit unsigned integer union. */ 341 typedef const RTUINT16U *PCRTUINT16U;341 typedef const RTUINT16U RT_FAR *PCRTUINT16U; 342 342 343 343 … … 380 380 } RTUINT32U; 381 381 /** Pointer to a 32-bit unsigned integer union. */ 382 typedef RTUINT32U *PRTUINT32U;382 typedef RTUINT32U RT_FAR *PRTUINT32U; 383 383 /** Pointer to a const 32-bit unsigned integer union. */ 384 typedef const RTUINT32U *PCRTUINT32U;384 typedef const RTUINT32U RT_FAR *PCRTUINT32U; 385 385 386 386 … … 440 440 } RTUINT64U; 441 441 /** Pointer to a 64-bit unsigned integer union. */ 442 typedef RTUINT64U *PRTUINT64U;442 typedef RTUINT64U RT_FAR *PRTUINT64U; 443 443 /** Pointer to a const 64-bit unsigned integer union. */ 444 typedef const RTUINT64U *PCRTUINT64U;444 typedef const RTUINT64U RT_FAR *PCRTUINT64U; 445 445 446 446 … … 530 530 #pragma pack() 531 531 /** Pointer to a 128-bit unsigned integer union. */ 532 typedef RTUINT128U *PRTUINT128U;532 typedef RTUINT128U RT_FAR *PRTUINT128U; 533 533 /** Pointer to a const 128-bit unsigned integer union. */ 534 typedef const RTUINT128U *PCRTUINT128U;534 typedef const RTUINT128U RT_FAR *PCRTUINT128U; 535 535 536 536 /** @def RTUINT128_INIT … … 660 660 #pragma pack() 661 661 /** Pointer to a 256-bit unsigned integer union. */ 662 typedef RTUINT256U *PRTUINT256U;662 typedef RTUINT256U RT_FAR *PRTUINT256U; 663 663 /** Pointer to a const 256-bit unsigned integer union. */ 664 typedef const RTUINT256U *PCRTUINT256U;664 typedef const RTUINT256U RT_FAR *PCRTUINT256U; 665 665 666 666 /** @def RTUINT256_INIT … … 865 865 #pragma pack() 866 866 /** Pointer to a 512-bit unsigned integer union. */ 867 typedef RTUINT512U *PRTUINT512U;867 typedef RTUINT512U RT_FAR *PRTUINT512U; 868 868 /** Pointer to a const 512-bit unsigned integer union. */ 869 typedef const RTUINT512U *PCRTUINT512U;869 typedef const RTUINT512U RT_FAR *PCRTUINT512U; 870 870 871 871 /** @def RTUINT512_INIT … … 951 951 } RTFLOAT64U; 952 952 /** Pointer to a double precision floating point format union. */ 953 typedef RTFLOAT64U *PRTFLOAT64U;953 typedef RTFLOAT64U RT_FAR *PRTFLOAT64U; 954 954 /** Pointer to a const double precision floating point format union. */ 955 typedef const RTFLOAT64U *PCRTFLOAT64U;955 typedef const RTFLOAT64U RT_FAR *PCRTFLOAT64U; 956 956 957 957 … … 995 995 #pragma pack() 996 996 /** Pointer to a extended precision floating point format union. */ 997 typedef RTFLOAT80U *PRTFLOAT80U;997 typedef RTFLOAT80U RT_FAR *PRTFLOAT80U; 998 998 /** Pointer to a const extended precision floating point format union. */ 999 typedef const RTFLOAT80U *PCRTFLOAT80U;999 typedef const RTFLOAT80U RT_FAR *PCRTFLOAT80U; 1000 1000 1001 1001 … … 1097 1097 /** Pointer to a extended precision floating point format union, 2nd 1098 1098 * variant. */ 1099 typedef RTFLOAT80U2 *PRTFLOAT80U2;1099 typedef RTFLOAT80U2 RT_FAR *PRTFLOAT80U2; 1100 1100 /** Pointer to a const extended precision floating point format union, 2nd 1101 1101 * variant. */ 1102 typedef const RTFLOAT80U2 *PCRTFLOAT80U2;1102 typedef const RTFLOAT80U2 RT_FAR *PCRTFLOAT80U2; 1103 1103 1104 1104 #endif /* uint16_t bitfields doesn't work */ … … 1130 1130 1131 1131 /** Millisecond interval. */ 1132 typedef uint32_t RTMSINTERVAL;1132 typedef uint32_t RTMSINTERVAL; 1133 1133 /** Pointer to a millisecond interval. */ 1134 typedef RTMSINTERVAL *PRTMSINTERVAL;1134 typedef RTMSINTERVAL RT_FAR *PRTMSINTERVAL; 1135 1135 /** Pointer to a const millisecond interval. */ 1136 typedef const RTMSINTERVAL *PCRTMSINTERVAL;1136 typedef const RTMSINTERVAL RT_FAR *PCRTMSINTERVAL; 1137 1137 1138 1138 /** Pointer to a time spec structure. */ 1139 typedef struct RTTIMESPEC *PRTTIMESPEC;1139 typedef struct RTTIMESPEC RT_FAR *PRTTIMESPEC; 1140 1140 /** Pointer to a const time spec structure. */ 1141 typedef const struct RTTIMESPEC *PCRTTIMESPEC;1141 typedef const struct RTTIMESPEC RT_FAR *PCRTTIMESPEC; 1142 1142 1143 1143 … … 1149 1149 /** Signed integer which can contain both GC and HC pointers. */ 1150 1150 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 1151 typedef int32_t RTINTPTR;1151 typedef int32_t RTINTPTR; 1152 1152 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) 1153 typedef int64_t RTINTPTR;1153 typedef int64_t RTINTPTR; 1154 1154 #else 1155 1155 # error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values. 1156 1156 #endif 1157 1157 /** Pointer to signed integer which can contain both GC and HC pointers. */ 1158 typedef RTINTPTR *PRTINTPTR;1158 typedef RTINTPTR RT_FAR *PRTINTPTR; 1159 1159 /** Pointer const to signed integer which can contain both GC and HC pointers. */ 1160 typedef const RTINTPTR *PCRTINTPTR;1160 typedef const RTINTPTR RT_FAR *PCRTINTPTR; 1161 1161 /** The maximum value the RTINTPTR type can hold. */ 1162 1162 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) … … 1169 1169 /** The minimum value the RTINTPTR type can hold. */ 1170 1170 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 1171 # define RTINTPTR_MIN INT32_MIN1171 # define RTINTPTR_MIN INT32_MIN 1172 1172 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) 1173 # define RTINTPTR_MIN INT64_MIN1173 # define RTINTPTR_MIN INT64_MIN 1174 1174 #else 1175 1175 # error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values. … … 1178 1178 /** Unsigned integer which can contain both GC and HC pointers. */ 1179 1179 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 1180 typedef uint32_t RTUINTPTR;1180 typedef uint32_t RTUINTPTR; 1181 1181 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) 1182 typedef uint64_t RTUINTPTR;1182 typedef uint64_t RTUINTPTR; 1183 1183 #else 1184 1184 # error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values. 1185 1185 #endif 1186 1186 /** Pointer to unsigned integer which can contain both GC and HC pointers. */ 1187 typedef RTUINTPTR *PRTUINTPTR;1187 typedef RTUINTPTR RT_FAR *PRTUINTPTR; 1188 1188 /** Pointer const to unsigned integer which can contain both GC and HC pointers. */ 1189 typedef const RTUINTPTR *PCRTUINTPTR;1189 typedef const RTUINTPTR RT_FAR *PCRTUINTPTR; 1190 1190 /** The maximum value the RTUINTPTR type can hold. */ 1191 1191 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 1192 # define RTUINTPTR_MAX UINT32_MAX1192 # define RTUINTPTR_MAX UINT32_MAX 1193 1193 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) 1194 # define RTUINTPTR_MAX UINT64_MAX1194 # define RTUINTPTR_MAX UINT64_MAX 1195 1195 #else 1196 1196 # error Unsupported HC_ARCH_BITS and/or GC_ARCH_BITS values. … … 1198 1198 1199 1199 /** Signed integer. */ 1200 typedef int32_t RTINT;1200 typedef int32_t RTINT; 1201 1201 /** Pointer to signed integer. */ 1202 typedef RTINT *PRTINT;1202 typedef RTINT RT_FAR *PRTINT; 1203 1203 /** Pointer to const signed integer. */ 1204 typedef const RTINT *PCRTINT;1204 typedef const RTINT RT_FAR *PCRTINT; 1205 1205 1206 1206 /** Unsigned integer. */ 1207 typedef uint32_t RTUINT;1207 typedef uint32_t RTUINT; 1208 1208 /** Pointer to unsigned integer. */ 1209 typedef RTUINT *PRTUINT;1209 typedef RTUINT RT_FAR *PRTUINT; 1210 1210 /** Pointer to const unsigned integer. */ 1211 typedef const RTUINT *PCRTUINT;1211 typedef const RTUINT RT_FAR *PCRTUINT; 1212 1212 1213 1213 /** A file offset / size (off_t). */ 1214 typedef int64_t RTFOFF;1214 typedef int64_t RTFOFF; 1215 1215 /** Pointer to a file offset / size. */ 1216 typedef RTFOFF *PRTFOFF;1216 typedef RTFOFF RT_FAR *PRTFOFF; 1217 1217 /** The max value for RTFOFF. */ 1218 #define RTFOFF_MAX INT64_MAX1218 #define RTFOFF_MAX INT64_MAX 1219 1219 /** The min value for RTFOFF. */ 1220 #define RTFOFF_MIN INT64_MIN1220 #define RTFOFF_MIN INT64_MIN 1221 1221 1222 1222 /** File mode (see iprt/fs.h). */ 1223 typedef uint32_t RTFMODE;1223 typedef uint32_t RTFMODE; 1224 1224 /** Pointer to file mode. */ 1225 typedef RTFMODE *PRTFMODE;1225 typedef RTFMODE RT_FAR *PRTFMODE; 1226 1226 1227 1227 /** Device unix number. */ 1228 typedef uint32_t RTDEV;1228 typedef uint32_t RTDEV; 1229 1229 /** Pointer to a device unix number. */ 1230 typedef RTDEV *PRTDEV;1230 typedef RTDEV RT_FAR *PRTDEV; 1231 1231 1232 1232 /** @name RTDEV Macros … … 1254 1254 1255 1255 /** i-node number. */ 1256 typedef uint64_t RTINODE;1256 typedef uint64_t RTINODE; 1257 1257 /** Pointer to a i-node number. */ 1258 typedef RTINODE *PRTINODE;1258 typedef RTINODE RT_FAR *PRTINODE; 1259 1259 1260 1260 /** User id. */ 1261 typedef uint32_t RTUID;1261 typedef uint32_t RTUID; 1262 1262 /** Pointer to a user id. */ 1263 typedef RTUID *PRTUID;1263 typedef RTUID RT_FAR *PRTUID; 1264 1264 /** NIL user id. 1265 1265 * @todo check this for portability! */ 1266 #define NIL_RTUID (~(RTUID)0)1266 #define NIL_RTUID (~(RTUID)0) 1267 1267 1268 1268 /** Group id. */ 1269 typedef uint32_t RTGID;1269 typedef uint32_t RTGID; 1270 1270 /** Pointer to a group id. */ 1271 typedef RTGID *PRTGID;1271 typedef RTGID RT_FAR *PRTGID; 1272 1272 /** NIL group id. 1273 1273 * @todo check this for portability! */ 1274 #define NIL_RTGID (~(RTGID)0)1274 #define NIL_RTGID (~(RTGID)0) 1275 1275 1276 1276 /** I/O Port. */ 1277 typedef uint16_t RTIOPORT;1277 typedef uint16_t RTIOPORT; 1278 1278 /** Pointer to I/O Port. */ 1279 typedef RTIOPORT *PRTIOPORT;1279 typedef RTIOPORT RT_FAR *PRTIOPORT; 1280 1280 /** Pointer to const I/O Port. */ 1281 typedef const RTIOPORT *PCRTIOPORT;1281 typedef const RTIOPORT RT_FAR *PCRTIOPORT; 1282 1282 1283 1283 /** Selector. */ 1284 typedef uint16_t RTSEL;1284 typedef uint16_t RTSEL; 1285 1285 /** Pointer to selector. */ 1286 typedef RTSEL *PRTSEL;1286 typedef RTSEL RT_FAR *PRTSEL; 1287 1287 /** Pointer to const selector. */ 1288 typedef const RTSEL *PCRTSEL;1288 typedef const RTSEL RT_FAR *PCRTSEL; 1289 1289 /** Max selector value. */ 1290 #define RTSEL_MAX UINT16_MAX1290 #define RTSEL_MAX UINT16_MAX 1291 1291 1292 1292 /** Far 16-bit pointer. */ … … 1299 1299 #pragma pack() 1300 1300 /** Pointer to Far 16-bit pointer. */ 1301 typedef RTFAR16 *PRTFAR16;1301 typedef RTFAR16 RT_FAR *PRTFAR16; 1302 1302 /** Pointer to const Far 16-bit pointer. */ 1303 typedef const RTFAR16 *PCRTFAR16;1303 typedef const RTFAR16 RT_FAR *PCRTFAR16; 1304 1304 1305 1305 /** Far 32-bit pointer. */ … … 1312 1312 #pragma pack() 1313 1313 /** Pointer to Far 32-bit pointer. */ 1314 typedef RTFAR32 *PRTFAR32;1314 typedef RTFAR32 RT_FAR *PRTFAR32; 1315 1315 /** Pointer to const Far 32-bit pointer. */ 1316 typedef const RTFAR32 *PCRTFAR32;1316 typedef const RTFAR32 RT_FAR *PCRTFAR32; 1317 1317 1318 1318 /** Far 64-bit pointer. */ … … 1325 1325 #pragma pack() 1326 1326 /** Pointer to Far 64-bit pointer. */ 1327 typedef RTFAR64 *PRTFAR64;1327 typedef RTFAR64 RT_FAR *PRTFAR64; 1328 1328 /** Pointer to const Far 64-bit pointer. */ 1329 typedef const RTFAR64 *PCRTFAR64;1329 typedef const RTFAR64 RT_FAR *PCRTFAR64; 1330 1330 1331 1331 /** @} */ … … 1338 1338 /** HC Natural signed integer. 1339 1339 * @deprecated silly type. */ 1340 typedef int32_t RTHCINT;1340 typedef int32_t RTHCINT; 1341 1341 /** Pointer to HC Natural signed integer. 1342 1342 * @deprecated silly type. */ 1343 typedef RTHCINT 1343 typedef RTHCINT RT_FAR *PRTHCINT; 1344 1344 /** Pointer to const HC Natural signed integer. 1345 1345 * @deprecated silly type. */ 1346 typedef const RTHCINT 1346 typedef const RTHCINT RT_FAR *PCRTHCINT; 1347 1347 1348 1348 /** HC Natural unsigned integer. 1349 1349 * @deprecated silly type. */ 1350 typedef uint32_t RTHCUINT;1350 typedef uint32_t RTHCUINT; 1351 1351 /** Pointer to HC Natural unsigned integer. 1352 1352 * @deprecated silly type. */ 1353 typedef RTHCUINT 1353 typedef RTHCUINT RT_FAR *PRTHCUINT; 1354 1354 /** Pointer to const HC Natural unsigned integer. 1355 1355 * @deprecated silly type. */ 1356 typedef const RTHCUINT 1356 typedef const RTHCUINT RT_FAR *PCRTHCUINT; 1357 1357 1358 1358 1359 1359 /** Signed integer which can contain a HC pointer. */ 1360 #if HC_ARCH_BITS == 32 1361 typedef int32_t RTHCINTPTR;1360 #if HC_ARCH_BITS == 32 || HC_ARCH_BITS == 16 1361 typedef int32_t RTHCINTPTR; 1362 1362 #elif HC_ARCH_BITS == 64 1363 typedef int64_t RTHCINTPTR; 1364 #elif HC_ARCH_BITS == 16 1365 typedef int16_t RTHCINTPTR; 1363 typedef int64_t RTHCINTPTR; 1366 1364 #else 1367 1365 # error Unsupported HC_ARCH_BITS value. 1368 1366 #endif 1369 1367 /** Pointer to signed integer which can contain a HC pointer. */ 1370 typedef RTHCINTPTR 1368 typedef RTHCINTPTR RT_FAR *PRTHCINTPTR; 1371 1369 /** Pointer to const signed integer which can contain a HC pointer. */ 1372 typedef const RTHCINTPTR 1370 typedef const RTHCINTPTR RT_FAR *PCRTHCINTPTR; 1373 1371 /** Max RTHCINTPTR value. */ 1374 1372 #if HC_ARCH_BITS == 32 1375 # define RTHCINTPTR_MAX INT32_MAX1373 # define RTHCINTPTR_MAX INT32_MAX 1376 1374 #elif HC_ARCH_BITS == 64 1377 # define RTHCINTPTR_MAX INT64_MAX1378 #else 1379 # define RTHCINTPTR_MAX INT16_MAX1375 # define RTHCINTPTR_MAX INT64_MAX 1376 #else 1377 # define RTHCINTPTR_MAX INT16_MAX 1380 1378 #endif 1381 1379 /** Min RTHCINTPTR value. */ 1382 1380 #if HC_ARCH_BITS == 32 1383 # define RTHCINTPTR_MIN INT32_MIN1381 # define RTHCINTPTR_MIN INT32_MIN 1384 1382 #elif HC_ARCH_BITS == 64 1385 # define RTHCINTPTR_MIN INT64_MIN1386 #else 1387 # define RTHCINTPTR_MIN INT16_MIN1383 # define RTHCINTPTR_MIN INT64_MIN 1384 #else 1385 # define RTHCINTPTR_MIN INT16_MIN 1388 1386 #endif 1389 1387 1390 1388 /** Signed integer which can contain a HC ring-3 pointer. */ 1391 #if R3_ARCH_BITS == 32 1392 typedef int32_t RTR3INTPTR;1389 #if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16 1390 typedef int32_t RTR3INTPTR; 1393 1391 #elif R3_ARCH_BITS == 64 1394 typedef int64_t RTR3INTPTR; 1395 #elif R3_ARCH_BITS == 16 1396 typedef int16_t RTR3INTPTR; 1392 typedef int64_t RTR3INTPTR; 1397 1393 #else 1398 1394 # error Unsupported R3_ARCH_BITS value. 1399 1395 #endif 1400 1396 /** Pointer to signed integer which can contain a HC ring-3 pointer. */ 1401 typedef RTR3INTPTR 1397 typedef RTR3INTPTR RT_FAR *PRTR3INTPTR; 1402 1398 /** Pointer to const signed integer which can contain a HC ring-3 pointer. */ 1403 typedef const RTR3INTPTR 1399 typedef const RTR3INTPTR RT_FAR *PCRTR3INTPTR; 1404 1400 /** Max RTR3INTPTR value. */ 1405 #if R3_ARCH_BITS == 32 1406 # define RTR3INTPTR_MAX INT32_MAX 1401 #if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16 1402 # define RTR3INTPTR_MAX INT32_MAX 1403 #else 1404 # define RTR3INTPTR_MAX INT64_MAX 1405 #endif 1406 /** Min RTR3INTPTR value. */ 1407 #if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16 1408 # define RTR3INTPTR_MIN INT32_MIN 1409 #else 1410 # define RTR3INTPTR_MIN INT64_MIN 1411 #endif 1412 1413 /** Signed integer which can contain a HC ring-0 pointer. */ 1414 #if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16 1415 typedef int32_t RTR0INTPTR; 1416 #elif R0_ARCH_BITS == 64 1417 typedef int64_t RTR0INTPTR; 1418 #else 1419 # error Unsupported R0_ARCH_BITS value. 1420 #endif 1421 /** Pointer to signed integer which can contain a HC ring-0 pointer. */ 1422 typedef RTR0INTPTR RT_FAR *PRTR0INTPTR; 1423 /** Pointer to const signed integer which can contain a HC ring-0 pointer. */ 1424 typedef const RTR0INTPTR RT_FAR *PCRTR0INTPTR; 1425 /** Max RTR0INTPTR value. */ 1426 #if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16 1427 # define RTR0INTPTR_MAX INT32_MAX 1428 #else 1429 # define RTR0INTPTR_MAX INT64_MAX 1430 #endif 1431 /** Min RTHCINTPTR value. */ 1432 #if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16 1433 # define RTR0INTPTR_MIN INT32_MIN 1434 #else 1435 # define RTR0INTPTR_MIN INT64_MIN 1436 #endif 1437 1438 1439 /** Unsigned integer which can contain a HC pointer. */ 1440 #if HC_ARCH_BITS == 32 || HC_ARCH_BITS == 16 1441 typedef uint32_t RTHCUINTPTR; 1442 #elif HC_ARCH_BITS == 64 1443 typedef uint64_t RTHCUINTPTR; 1444 #else 1445 # error Unsupported HC_ARCH_BITS value. 1446 #endif 1447 /** Pointer to unsigned integer which can contain a HC pointer. */ 1448 typedef RTHCUINTPTR RT_FAR *PRTHCUINTPTR; 1449 /** Pointer to unsigned integer which can contain a HC pointer. */ 1450 typedef const RTHCUINTPTR RT_FAR *PCRTHCUINTPTR; 1451 /** Max RTHCUINTTPR value. */ 1452 #if HC_ARCH_BITS == 32 || HC_ARCH_BITS == 16 1453 # define RTHCUINTPTR_MAX UINT32_MAX 1454 #else 1455 # define RTHCUINTPTR_MAX UINT64_MAX 1456 #endif 1457 1458 /** Unsigned integer which can contain a HC ring-3 pointer. */ 1459 #if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16 1460 typedef uint32_t RTR3UINTPTR; 1407 1461 #elif R3_ARCH_BITS == 64 1408 # define RTR3INTPTR_MAX INT64_MAX 1409 #else 1410 # define RTR3INTPTR_MAX INT16_MAX 1411 #endif 1412 /** Min RTR3INTPTR value. */ 1413 #if R3_ARCH_BITS == 32 1414 # define RTR3INTPTR_MIN INT32_MIN 1415 #elif R3_ARCH_BITS == 64 1416 # define RTR3INTPTR_MIN INT64_MIN 1417 #else 1418 # define RTR3INTPTR_MIN INT16_MIN 1419 #endif 1420 1421 /** Signed integer which can contain a HC ring-0 pointer. */ 1422 #if R0_ARCH_BITS == 32 1423 typedef int32_t RTR0INTPTR; 1462 typedef uint64_t RTR3UINTPTR; 1463 #else 1464 # error Unsupported R3_ARCH_BITS value. 1465 #endif 1466 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */ 1467 typedef RTR3UINTPTR RT_FAR *PRTR3UINTPTR; 1468 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */ 1469 typedef const RTR3UINTPTR RT_FAR *PCRTR3UINTPTR; 1470 /** Max RTHCUINTTPR value. */ 1471 #if R3_ARCH_BITS == 32 || R3_ARCH_BITS == 16 1472 # define RTR3UINTPTR_MAX UINT32_MAX 1473 #else 1474 # define RTR3UINTPTR_MAX UINT64_MAX 1475 #endif 1476 1477 /** Unsigned integer which can contain a HC ring-0 pointer. */ 1478 #if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16 1479 typedef uint32_t RTR0UINTPTR; 1424 1480 #elif R0_ARCH_BITS == 64 1425 typedef int64_t RTR0INTPTR; 1426 #elif R0_ARCH_BITS == 16 1427 typedef int16_t RTR0INTPTR; 1481 typedef uint64_t RTR0UINTPTR; 1428 1482 #else 1429 1483 # error Unsupported R0_ARCH_BITS value. 1430 1484 #endif 1431 /** Pointer to signed integer which can contain a HC ring-0 pointer. */1432 typedef RTR0INTPTR *PRTR0INTPTR;1433 /** Pointer to const signed integer which can contain a HC ring-0 pointer. */1434 typedef const RTR0INTPTR *PCRTR0INTPTR;1435 /** Max RTR0INTPTR value. */1436 #if R0_ARCH_BITS == 321437 # define RTR0INTPTR_MAX INT32_MAX1438 #elif R0_ARCH_BITS == 641439 # define RTR0INTPTR_MAX INT64_MAX1440 #else1441 # define RTR0INTPTR_MAX INT16_MAX1442 #endif1443 /** Min RTHCINTPTR value. */1444 #if R0_ARCH_BITS == 321445 # define RTR0INTPTR_MIN INT32_MIN1446 #elif R0_ARCH_BITS == 641447 # define RTR0INTPTR_MIN INT64_MIN1448 #else1449 # define RTR0INTPTR_MIN INT16_MIN1450 #endif1451 1452 1453 /** Unsigned integer which can contain a HC pointer. */1454 #if HC_ARCH_BITS == 321455 typedef uint32_t RTHCUINTPTR;1456 #elif HC_ARCH_BITS == 641457 typedef uint64_t RTHCUINTPTR;1458 #elif HC_ARCH_BITS == 161459 typedef uint16_t RTHCUINTPTR;1460 #else1461 # error Unsupported HC_ARCH_BITS value.1462 #endif1463 /** Pointer to unsigned integer which can contain a HC pointer. */1464 typedef RTHCUINTPTR *PRTHCUINTPTR;1465 /** Pointer to unsigned integer which can contain a HC pointer. */1466 typedef const RTHCUINTPTR *PCRTHCUINTPTR;1467 /** Max RTHCUINTTPR value. */1468 #if HC_ARCH_BITS == 321469 # define RTHCUINTPTR_MAX UINT32_MAX1470 #elif HC_ARCH_BITS == 641471 # define RTHCUINTPTR_MAX UINT64_MAX1472 #else1473 # define RTHCUINTPTR_MAX UINT16_MAX1474 #endif1475 1476 /** Unsigned integer which can contain a HC ring-3 pointer. */1477 #if R3_ARCH_BITS == 321478 typedef uint32_t RTR3UINTPTR;1479 #elif R3_ARCH_BITS == 641480 typedef uint64_t RTR3UINTPTR;1481 #elif R3_ARCH_BITS == 161482 typedef uint16_t RTR3UINTPTR;1483 #else1484 # error Unsupported R3_ARCH_BITS value.1485 #endif1486 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */1487 typedef RTR3UINTPTR *PRTR3UINTPTR;1488 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */1489 typedef const RTR3UINTPTR *PCRTR3UINTPTR;1490 /** Max RTHCUINTTPR value. */1491 #if R3_ARCH_BITS == 321492 # define RTR3UINTPTR_MAX UINT32_MAX1493 #elif R3_ARCH_BITS == 641494 # define RTR3UINTPTR_MAX UINT64_MAX1495 #else1496 # define RTR3UINTPTR_MAX UINT16_MAX1497 #endif1498 1499 /** Unsigned integer which can contain a HC ring-0 pointer. */1500 #if R0_ARCH_BITS == 321501 typedef uint32_t RTR0UINTPTR;1502 #elif R0_ARCH_BITS == 641503 typedef uint64_t RTR0UINTPTR;1504 #elif R0_ARCH_BITS == 161505 typedef uint16_t RTR0UINTPTR;1506 #else1507 # error Unsupported R0_ARCH_BITS value.1508 #endif1509 1485 /** Pointer to unsigned integer which can contain a HC ring-0 pointer. */ 1510 typedef RTR0UINTPTR 1486 typedef RTR0UINTPTR RT_FAR *PRTR0UINTPTR; 1511 1487 /** Pointer to unsigned integer which can contain a HC ring-0 pointer. */ 1512 typedef const RTR0UINTPTR *PCRTR0UINTPTR;1488 typedef const RTR0UINTPTR RT_FAR *PCRTR0UINTPTR; 1513 1489 /** Max RTR0UINTTPR value. */ 1514 #if R0_ARCH_BITS == 32 1515 # define RTR0UINTPTR_MAX UINT32_MAX 1516 #elif R0_ARCH_BITS == 64 1517 # define RTR0UINTPTR_MAX UINT64_MAX 1518 #else 1519 # define RTR0UINTPTR_MAX UINT16_MAX 1490 #if R0_ARCH_BITS == 32 || R0_ARCH_BITS == 16 1491 # define RTR0UINTPTR_MAX UINT32_MAX 1492 #else 1493 # define RTR0UINTPTR_MAX UINT64_MAX 1520 1494 #endif 1521 1495 1522 1496 1523 1497 /** Host Physical Memory Address. */ 1524 typedef uint64_t RTHCPHYS;1498 typedef uint64_t RTHCPHYS; 1525 1499 /** Pointer to Host Physical Memory Address. */ 1526 typedef RTHCPHYS 1500 typedef RTHCPHYS RT_FAR *PRTHCPHYS; 1527 1501 /** Pointer to const Host Physical Memory Address. */ 1528 typedef const RTHCPHYS 1502 typedef const RTHCPHYS RT_FAR *PCRTHCPHYS; 1529 1503 /** @def NIL_RTHCPHYS 1530 1504 * NIL HC Physical Address. … … 1532 1506 * to the NULL pointer. 1533 1507 */ 1534 #define NIL_RTHCPHYS (~(RTHCPHYS)0)1508 #define NIL_RTHCPHYS (~(RTHCPHYS)0) 1535 1509 /** Max RTHCPHYS value. */ 1536 #define RTHCPHYS_MAX UINT64_MAX1510 #define RTHCPHYS_MAX UINT64_MAX 1537 1511 1538 1512 1539 1513 /** HC pointer. */ 1540 1514 #ifndef IN_RC 1541 typedef void *RTHCPTR;1542 #else 1543 typedef RTHCUINTPTR RTHCPTR;1515 typedef void RT_FAR *RTHCPTR; 1516 #else 1517 typedef RTHCUINTPTR RTHCPTR; 1544 1518 #endif 1545 1519 /** Pointer to HC pointer. */ 1546 typedef RTHCPTR 1520 typedef RTHCPTR RT_FAR *PRTHCPTR; 1547 1521 /** Pointer to const HC pointer. */ 1548 typedef const RTHCPTR *PCRTHCPTR;1522 typedef const RTHCPTR *PCRTHCPTR; 1549 1523 /** @def NIL_RTHCPTR 1550 1524 * NIL HC pointer. 1551 1525 */ 1552 #define NIL_RTHCPTR ((RTHCPTR)0)1526 #define NIL_RTHCPTR ((RTHCPTR)0) 1553 1527 /** Max RTHCPTR value. */ 1554 #define RTHCPTR_MAX ((RTHCPTR)RTHCUINTPTR_MAX)1528 #define RTHCPTR_MAX ((RTHCPTR)RTHCUINTPTR_MAX) 1555 1529 1556 1530 1557 1531 /** HC ring-3 pointer. */ 1558 1532 #ifdef IN_RING3 1559 typedef void *RTR3PTR;1560 #else 1561 typedef RTR3UINTPTR RTR3PTR;1533 typedef void RT_FAR *RTR3PTR; 1534 #else 1535 typedef RTR3UINTPTR RTR3PTR; 1562 1536 #endif 1563 1537 /** Pointer to HC ring-3 pointer. */ 1564 typedef RTR3PTR 1538 typedef RTR3PTR RT_FAR *PRTR3PTR; 1565 1539 /** Pointer to const HC ring-3 pointer. */ 1566 typedef const RTR3PTR *PCRTR3PTR;1540 typedef const RTR3PTR *PCRTR3PTR; 1567 1541 /** @def NIL_RTR3PTR 1568 1542 * NIL HC ring-3 pointer. 1569 1543 */ 1570 1544 #ifndef IN_RING3 1571 # define NIL_RTR3PTR ((RTR3PTR)0)1572 #else 1573 # define NIL_RTR3PTR (NULL)1545 # define NIL_RTR3PTR ((RTR3PTR)0) 1546 #else 1547 # define NIL_RTR3PTR (NULL) 1574 1548 #endif 1575 1549 /** Max RTR3PTR value. */ 1576 #define RTR3PTR_MAX ((RTR3PTR)RTR3UINTPTR_MAX)1550 #define RTR3PTR_MAX ((RTR3PTR)RTR3UINTPTR_MAX) 1577 1551 1578 1552 /** HC ring-0 pointer. */ 1579 1553 #ifdef IN_RING0 1580 typedef void *RTR0PTR;1581 #else 1582 typedef RTR0UINTPTR RTR0PTR;1554 typedef void RT_FAR *RTR0PTR; 1555 #else 1556 typedef RTR0UINTPTR RTR0PTR; 1583 1557 #endif 1584 1558 /** Pointer to HC ring-0 pointer. */ 1585 typedef RTR0PTR 1559 typedef RTR0PTR RT_FAR *PRTR0PTR; 1586 1560 /** Pointer to const HC ring-0 pointer. */ 1587 typedef const RTR0PTR *PCRTR0PTR;1561 typedef const RTR0PTR *PCRTR0PTR; 1588 1562 /** @def NIL_RTR0PTR 1589 1563 * NIL HC ring-0 pointer. 1590 1564 */ 1591 1565 #ifndef IN_RING0 1592 # define NIL_RTR0PTR ((RTR0PTR)0)1593 #else 1594 # define NIL_RTR0PTR (NULL)1566 # define NIL_RTR0PTR ((RTR0PTR)0) 1567 #else 1568 # define NIL_RTR0PTR (NULL) 1595 1569 #endif 1596 1570 /** Max RTR3PTR value. */ 1597 #define RTR0PTR_MAX ((RTR0PTR)RTR0UINTPTR_MAX)1571 #define RTR0PTR_MAX ((RTR0PTR)RTR0UINTPTR_MAX) 1598 1572 1599 1573 1600 1574 /** Unsigned integer register in the host context. */ 1601 1575 #if HC_ARCH_BITS == 32 1602 typedef uint32_t RTHCUINTREG;1576 typedef uint32_t RTHCUINTREG; 1603 1577 #elif HC_ARCH_BITS == 64 1604 typedef uint64_t RTHCUINTREG;1578 typedef uint64_t RTHCUINTREG; 1605 1579 #elif HC_ARCH_BITS == 16 1606 typedef uint16_t RTHCUINTREG;1580 typedef uint16_t RTHCUINTREG; 1607 1581 #else 1608 1582 # error "Unsupported HC_ARCH_BITS!" 1609 1583 #endif 1610 1584 /** Pointer to an unsigned integer register in the host context. */ 1611 typedef RTHCUINTREG 1585 typedef RTHCUINTREG RT_FAR *PRTHCUINTREG; 1612 1586 /** Pointer to a const unsigned integer register in the host context. */ 1613 typedef const RTHCUINTREG *PCRTHCUINTREG;1587 typedef const RTHCUINTREG RT_FAR *PCRTHCUINTREG; 1614 1588 1615 1589 /** Unsigned integer register in the host ring-3 context. */ 1616 1590 #if R3_ARCH_BITS == 32 1617 typedef uint32_t RTR3UINTREG;1591 typedef uint32_t RTR3UINTREG; 1618 1592 #elif R3_ARCH_BITS == 64 1619 typedef uint64_t RTR3UINTREG;1593 typedef uint64_t RTR3UINTREG; 1620 1594 #elif R3_ARCH_BITS == 16 1621 typedef uint16_t RTR3UINTREG;1595 typedef uint16_t RTR3UINTREG; 1622 1596 #else 1623 1597 # error "Unsupported R3_ARCH_BITS!" 1624 1598 #endif 1625 1599 /** Pointer to an unsigned integer register in the host ring-3 context. */ 1626 typedef RTR3UINTREG 1600 typedef RTR3UINTREG RT_FAR *PRTR3UINTREG; 1627 1601 /** Pointer to a const unsigned integer register in the host ring-3 context. */ 1628 typedef const RTR3UINTREG *PCRTR3UINTREG;1602 typedef const RTR3UINTREG RT_FAR *PCRTR3UINTREG; 1629 1603 1630 1604 /** Unsigned integer register in the host ring-3 context. */ 1631 1605 #if R0_ARCH_BITS == 32 1632 typedef uint32_t RTR0UINTREG;1606 typedef uint32_t RTR0UINTREG; 1633 1607 #elif R0_ARCH_BITS == 64 1634 typedef uint64_t RTR0UINTREG;1608 typedef uint64_t RTR0UINTREG; 1635 1609 #elif R0_ARCH_BITS == 16 1636 typedef uint16_t RTR0UINTREG;1610 typedef uint16_t RTR0UINTREG; 1637 1611 #else 1638 1612 # error "Unsupported R3_ARCH_BITS!" 1639 1613 #endif 1640 1614 /** Pointer to an unsigned integer register in the host ring-3 context. */ 1641 typedef RTR0UINTREG 1615 typedef RTR0UINTREG RT_FAR *PRTR0UINTREG; 1642 1616 /** Pointer to a const unsigned integer register in the host ring-3 context. */ 1643 typedef const RTR0UINTREG *PCRTR0UINTREG;1617 typedef const RTR0UINTREG RT_FAR *PCRTR0UINTREG; 1644 1618 1645 1619 /** @} */ … … 1653 1627 * @deprecated silly type. */ 1654 1628 #if GC_ARCH_BITS == 32 1655 typedef int32_t RTGCINT;1629 typedef int32_t RTGCINT; 1656 1630 #elif GC_ARCH_BITS == 64 /** @todo this isn't right, natural int is 32-bit, see RTHCINT. */ 1657 typedef int64_t RTGCINT;1631 typedef int64_t RTGCINT; 1658 1632 #endif 1659 1633 /** Pointer to natural signed integer in GC. 1660 1634 * @deprecated silly type. */ 1661 typedef RTGCINT *PRTGCINT;1635 typedef RTGCINT RT_FAR *PRTGCINT; 1662 1636 /** Pointer to const natural signed integer in GC. 1663 1637 * @deprecated silly type. */ 1664 typedef const RTGCINT *PCRTGCINT;1638 typedef const RTGCINT RT_FAR *PCRTGCINT; 1665 1639 1666 1640 /** Natural unsigned integer in the GC. 1667 1641 * @deprecated silly type. */ 1668 1642 #if GC_ARCH_BITS == 32 1669 typedef uint32_t RTGCUINT;1643 typedef uint32_t RTGCUINT; 1670 1644 #elif GC_ARCH_BITS == 64 /** @todo this isn't right, natural int is 32-bit, see RTHCUINT. */ 1671 typedef uint64_t RTGCUINT;1645 typedef uint64_t RTGCUINT; 1672 1646 #endif 1673 1647 /** Pointer to natural unsigned integer in GC. 1674 1648 * @deprecated silly type. */ 1675 typedef RTGCUINT *PRTGCUINT;1649 typedef RTGCUINT RT_FAR *PRTGCUINT; 1676 1650 /** Pointer to const natural unsigned integer in GC. 1677 1651 * @deprecated silly type. */ 1678 typedef const RTGCUINT *PCRTGCUINT;1652 typedef const RTGCUINT RT_FAR *PCRTGCUINT; 1679 1653 1680 1654 /** Signed integer which can contain a GC pointer. */ 1681 1655 #if GC_ARCH_BITS == 32 1682 typedef int32_t RTGCINTPTR;1656 typedef int32_t RTGCINTPTR; 1683 1657 #elif GC_ARCH_BITS == 64 1684 typedef int64_t RTGCINTPTR;1658 typedef int64_t RTGCINTPTR; 1685 1659 #endif 1686 1660 /** Pointer to signed integer which can contain a GC pointer. */ 1687 typedef RTGCINTPTR *PRTGCINTPTR;1661 typedef RTGCINTPTR RT_FAR *PRTGCINTPTR; 1688 1662 /** Pointer to const signed integer which can contain a GC pointer. */ 1689 typedef const RTGCINTPTR *PCRTGCINTPTR;1663 typedef const RTGCINTPTR RT_FAR *PCRTGCINTPTR; 1690 1664 1691 1665 /** Unsigned integer which can contain a GC pointer. */ 1692 1666 #if GC_ARCH_BITS == 32 1693 typedef uint32_t RTGCUINTPTR;1667 typedef uint32_t RTGCUINTPTR; 1694 1668 #elif GC_ARCH_BITS == 64 1695 typedef uint64_t RTGCUINTPTR;1669 typedef uint64_t RTGCUINTPTR; 1696 1670 #else 1697 1671 # error Unsupported GC_ARCH_BITS value. 1698 1672 #endif 1699 1673 /** Pointer to unsigned integer which can contain a GC pointer. */ 1700 typedef RTGCUINTPTR *PRTGCUINTPTR;1674 typedef RTGCUINTPTR RT_FAR *PRTGCUINTPTR; 1701 1675 /** Pointer to unsigned integer which can contain a GC pointer. */ 1702 typedef const RTGCUINTPTR *PCRTGCUINTPTR;1676 typedef const RTGCUINTPTR RT_FAR *PCRTGCUINTPTR; 1703 1677 1704 1678 /** Unsigned integer which can contain a 32 bits GC pointer. */ 1705 typedef uint32_t RTGCUINTPTR32;1679 typedef uint32_t RTGCUINTPTR32; 1706 1680 /** Pointer to unsigned integer which can contain a 32 bits GC pointer. */ 1707 typedef RTGCUINTPTR32 *PRTGCUINTPTR32;1681 typedef RTGCUINTPTR32 RT_FAR *PRTGCUINTPTR32; 1708 1682 /** Pointer to unsigned integer which can contain a 32 bits GC pointer. */ 1709 typedef const RTGCUINTPTR32 *PCRTGCUINTPTR32;1683 typedef const RTGCUINTPTR32 RT_FAR *PCRTGCUINTPTR32; 1710 1684 1711 1685 /** Unsigned integer which can contain a 64 bits GC pointer. */ 1712 typedef uint64_t RTGCUINTPTR64;1686 typedef uint64_t RTGCUINTPTR64; 1713 1687 /** Pointer to unsigned integer which can contain a 32 bits GC pointer. */ 1714 typedef RTGCUINTPTR64 *PRTGCUINTPTR64;1688 typedef RTGCUINTPTR64 RT_FAR *PRTGCUINTPTR64; 1715 1689 /** Pointer to unsigned integer which can contain a 32 bits GC pointer. */ 1716 typedef const RTGCUINTPTR64 *PCRTGCUINTPTR64;1690 typedef const RTGCUINTPTR64 RT_FAR *PCRTGCUINTPTR64; 1717 1691 1718 1692 /** Guest Physical Memory Address.*/ 1719 typedef uint64_t RTGCPHYS;1693 typedef uint64_t RTGCPHYS; 1720 1694 /** Pointer to Guest Physical Memory Address. */ 1721 typedef RTGCPHYS 1695 typedef RTGCPHYS RT_FAR *PRTGCPHYS; 1722 1696 /** Pointer to const Guest Physical Memory Address. */ 1723 typedef const RTGCPHYS 1697 typedef const RTGCPHYS RT_FAR *PCRTGCPHYS; 1724 1698 /** @def NIL_RTGCPHYS 1725 1699 * NIL GC Physical Address. … … 1728 1702 * some contexts. 1729 1703 */ 1730 #define NIL_RTGCPHYS (~(RTGCPHYS)0U)1704 #define NIL_RTGCPHYS (~(RTGCPHYS)0U) 1731 1705 /** Max guest physical memory address value. */ 1732 #define RTGCPHYS_MAX UINT64_MAX1706 #define RTGCPHYS_MAX UINT64_MAX 1733 1707 1734 1708 1735 1709 /** Guest Physical Memory Address; limited to 32 bits.*/ 1736 typedef uint32_t RTGCPHYS32;1710 typedef uint32_t RTGCPHYS32; 1737 1711 /** Pointer to Guest Physical Memory Address. */ 1738 typedef RTGCPHYS32 1712 typedef RTGCPHYS32 RT_FAR *PRTGCPHYS32; 1739 1713 /** Pointer to const Guest Physical Memory Address. */ 1740 typedef const RTGCPHYS32 1714 typedef const RTGCPHYS32 RT_FAR *PCRTGCPHYS32; 1741 1715 /** @def NIL_RTGCPHYS32 1742 1716 * NIL GC Physical Address. … … 1745 1719 * some contexts. 1746 1720 */ 1747 #define NIL_RTGCPHYS32 (~(RTGCPHYS32)0)1721 #define NIL_RTGCPHYS32 (~(RTGCPHYS32)0) 1748 1722 1749 1723 1750 1724 /** Guest Physical Memory Address; limited to 64 bits.*/ 1751 typedef uint64_t RTGCPHYS64;1725 typedef uint64_t RTGCPHYS64; 1752 1726 /** Pointer to Guest Physical Memory Address. */ 1753 typedef RTGCPHYS64 *PRTGCPHYS64;1727 typedef RTGCPHYS64 RT_FAR *PRTGCPHYS64; 1754 1728 /** Pointer to const Guest Physical Memory Address. */ 1755 typedef const RTGCPHYS64 *PCRTGCPHYS64;1729 typedef const RTGCPHYS64 RT_FAR *PCRTGCPHYS64; 1756 1730 /** @def NIL_RTGCPHYS64 1757 1731 * NIL GC Physical Address. … … 1760 1734 * some contexts. 1761 1735 */ 1762 #define NIL_RTGCPHYS64 (~(RTGCPHYS64)0)1736 #define NIL_RTGCPHYS64 (~(RTGCPHYS64)0) 1763 1737 1764 1738 /** Guest context pointer, 32 bits. … … 1766 1740 * HC and void pointer in GC. 1767 1741 */ 1768 typedef RTGCUINTPTR32 RTGCPTR32;1742 typedef RTGCUINTPTR32 RTGCPTR32; 1769 1743 /** Pointer to a guest context pointer. */ 1770 typedef RTGCPTR32 *PRTGCPTR32;1744 typedef RTGCPTR32 RT_FAR *PRTGCPTR32; 1771 1745 /** Pointer to a const guest context pointer. */ 1772 typedef const RTGCPTR32 *PCRTGCPTR32;1746 typedef const RTGCPTR32 RT_FAR *PCRTGCPTR32; 1773 1747 /** @def NIL_RTGCPTR32 1774 1748 * NIL GC pointer. 1775 1749 */ 1776 #define NIL_RTGCPTR32 ((RTGCPTR32)0)1750 #define NIL_RTGCPTR32 ((RTGCPTR32)0) 1777 1751 1778 1752 /** Guest context pointer, 64 bits. 1779 1753 */ 1780 typedef RTGCUINTPTR64 RTGCPTR64;1754 typedef RTGCUINTPTR64 RTGCPTR64; 1781 1755 /** Pointer to a guest context pointer. */ 1782 typedef RTGCPTR64 *PRTGCPTR64;1756 typedef RTGCPTR64 RT_FAR *PRTGCPTR64; 1783 1757 /** Pointer to a const guest context pointer. */ 1784 typedef const RTGCPTR64 *PCRTGCPTR64;1758 typedef const RTGCPTR64 RT_FAR *PCRTGCPTR64; 1785 1759 /** @def NIL_RTGCPTR64 1786 1760 * NIL GC pointer. 1787 1761 */ 1788 #define NIL_RTGCPTR64 ((RTGCPTR64)0)1762 #define NIL_RTGCPTR64 ((RTGCPTR64)0) 1789 1763 1790 1764 /** Guest context pointer. … … 1793 1767 */ 1794 1768 #if GC_ARCH_BITS == 64 1795 typedef RTGCPTR64 RTGCPTR;1769 typedef RTGCPTR64 RTGCPTR; 1796 1770 /** Pointer to a guest context pointer. */ 1797 typedef PRTGCPTR64 PRTGCPTR;1771 typedef PRTGCPTR64 PRTGCPTR; 1798 1772 /** Pointer to a const guest context pointer. */ 1799 typedef PCRTGCPTR64 PCRTGCPTR;1773 typedef PCRTGCPTR64 PCRTGCPTR; 1800 1774 /** @def NIL_RTGCPTR 1801 1775 * NIL GC pointer. … … 1803 1777 # define NIL_RTGCPTR NIL_RTGCPTR64 1804 1778 /** Max RTGCPTR value. */ 1805 # define RTGCPTR_MAX UINT64_MAX1779 # define RTGCPTR_MAX UINT64_MAX 1806 1780 #elif GC_ARCH_BITS == 32 1807 typedef RTGCPTR32 RTGCPTR;1781 typedef RTGCPTR32 RTGCPTR; 1808 1782 /** Pointer to a guest context pointer. */ 1809 typedef PRTGCPTR32 PRTGCPTR;1783 typedef PRTGCPTR32 PRTGCPTR; 1810 1784 /** Pointer to a const guest context pointer. */ 1811 typedef PCRTGCPTR32 PCRTGCPTR;1785 typedef PCRTGCPTR32 PCRTGCPTR; 1812 1786 /** @def NIL_RTGCPTR 1813 1787 * NIL GC pointer. 1814 1788 */ 1815 # define NIL_RTGCPTR NIL_RTGCPTR321789 # define NIL_RTGCPTR NIL_RTGCPTR32 1816 1790 /** Max RTGCPTR value. */ 1817 # define RTGCPTR_MAX UINT32_MAX1791 # define RTGCPTR_MAX UINT32_MAX 1818 1792 #else 1819 1793 # error "Unsupported GC_ARCH_BITS!" … … 1821 1795 1822 1796 /** Unsigned integer register in the guest context. */ 1823 typedef uint32_t RTGCUINTREG32;1797 typedef uint32_t RTGCUINTREG32; 1824 1798 /** Pointer to an unsigned integer register in the guest context. */ 1825 typedef RTGCUINTREG32 1799 typedef RTGCUINTREG32 RT_FAR *PRTGCUINTREG32; 1826 1800 /** Pointer to a const unsigned integer register in the guest context. */ 1827 typedef const RTGCUINTREG32 *PCRTGCUINTREG32;1828 1829 typedef uint64_t RTGCUINTREG64;1801 typedef const RTGCUINTREG32 RT_FAR *PCRTGCUINTREG32; 1802 1803 typedef uint64_t RTGCUINTREG64; 1830 1804 /** Pointer to an unsigned integer register in the guest context. */ 1831 typedef RTGCUINTREG64 1805 typedef RTGCUINTREG64 RT_FAR *PRTGCUINTREG64; 1832 1806 /** Pointer to a const unsigned integer register in the guest context. */ 1833 typedef const RTGCUINTREG64 *PCRTGCUINTREG64;1807 typedef const RTGCUINTREG64 RT_FAR *PCRTGCUINTREG64; 1834 1808 1835 1809 #if GC_ARCH_BITS == 64 … … 1841 1815 #endif 1842 1816 /** Pointer to an unsigned integer register in the guest context. */ 1843 typedef RTGCUINTREG 1817 typedef RTGCUINTREG RT_FAR *PRTGCUINTREG; 1844 1818 /** Pointer to a const unsigned integer register in the guest context. */ 1845 typedef const RTGCUINTREG 1819 typedef const RTGCUINTREG RT_FAR *PCRTGCUINTREG; 1846 1820 1847 1821 /** @} */ … … 1856 1830 */ 1857 1831 #ifdef IN_RC 1858 typedef void *RTRCPTR;1859 #else 1860 typedef uint32_t RTRCPTR;1832 typedef void RT_FAR *RTRCPTR; 1833 #else 1834 typedef uint32_t RTRCPTR; 1861 1835 #endif 1862 1836 /** Pointer to a raw mode context pointer. */ 1863 typedef RTRCPTR *PRTRCPTR;1837 typedef RTRCPTR RT_FAR *PRTRCPTR; 1864 1838 /** Pointer to a const raw mode context pointer. */ 1865 typedef const RTRCPTR *PCRTRCPTR;1839 typedef const RTRCPTR RT_FAR *PCRTRCPTR; 1866 1840 /** @def NIL_RTGCPTR 1867 1841 * NIL RC pointer. 1868 1842 */ 1869 1843 #ifndef IN_RC 1870 # define NIL_RTRCPTR ((RTRCPTR)0)1871 #else 1872 # define NIL_RTRCPTR (NULL)1844 # define NIL_RTRCPTR ((RTRCPTR)0) 1845 #else 1846 # define NIL_RTRCPTR (NULL) 1873 1847 #endif 1874 1848 /** @def RTRCPTR_MAX 1875 1849 * The maximum value a RTRCPTR can have. Mostly used as INVALID value. 1876 1850 */ 1877 #define RTRCPTR_MAX ((RTRCPTR)UINT32_MAX)1851 #define RTRCPTR_MAX ((RTRCPTR)UINT32_MAX) 1878 1852 1879 1853 /** Raw mode context pointer, unsigned integer variant. */ 1880 typedef int32_t RTRCINTPTR;1854 typedef int32_t RTRCINTPTR; 1881 1855 /** @def RTRCUINTPTR_MAX 1882 1856 * The maximum value a RTRCUINPTR can have. 1883 1857 */ 1884 #define RTRCUINTPTR_MAX ((RTRCUINTPTR)UINT32_MAX)1858 #define RTRCUINTPTR_MAX ((RTRCUINTPTR)UINT32_MAX) 1885 1859 1886 1860 /** Raw mode context pointer, signed integer variant. */ 1887 typedef uint32_t RTRCUINTPTR;1861 typedef uint32_t RTRCUINTPTR; 1888 1862 /** @def RTRCINTPTR_MIN 1889 1863 * The minimum value a RTRCINPTR can have. 1890 1864 */ 1891 #define RTRCINTPTR_MIN ((RTRCINTPTR)INT32_MIN)1865 #define RTRCINTPTR_MIN ((RTRCINTPTR)INT32_MIN) 1892 1866 /** @def RTRCINTPTR_MAX 1893 1867 * The maximum value a RTRCINPTR can have. 1894 1868 */ 1895 #define RTRCINTPTR_MAX ((RTRCINTPTR)INT32_MAX)1869 #define RTRCINTPTR_MAX ((RTRCINTPTR)INT32_MAX) 1896 1870 1897 1871 /** @} */ … … 1909 1883 #endif 1910 1884 /** Pointer to Current Context Physical Memory Address. */ 1911 typedef RTCCPHYS *PRTCCPHYS;1885 typedef RTCCPHYS RT_FAR *PRTCCPHYS; 1912 1886 /** Pointer to const Current Context Physical Memory Address. */ 1913 typedef const RTCCPHYS *PCRTCCPHYS;1887 typedef const RTCCPHYS RT_FAR *PCRTCCPHYS; 1914 1888 /** @def NIL_RTCCPHYS 1915 1889 * NIL CC Physical Address. … … 1918 1892 */ 1919 1893 #ifdef IN_RC 1920 # define NIL_RTCCPHYS NIL_RTGCPHYS1921 #else 1922 # define NIL_RTCCPHYS NIL_RTHCPHYS1894 # define NIL_RTCCPHYS NIL_RTGCPHYS 1895 #else 1896 # define NIL_RTCCPHYS NIL_RTHCPHYS 1923 1897 #endif 1924 1898 … … 1934 1908 #endif 1935 1909 /** Pointer to an unsigned integer register in the current context. */ 1936 typedef RTCCUINTREG 1910 typedef RTCCUINTREG RT_FAR *PRTCCUINTREG; 1937 1911 /** Pointer to a const unsigned integer register in the current context. */ 1938 typedef RTCCUINTREG const 1912 typedef RTCCUINTREG const RT_FAR *PCRTCCUINTREG; 1939 1913 1940 1914 /** Signed integer register in the current context. */ … … 1947 1921 #endif 1948 1922 /** Pointer to a signed integer register in the current context. */ 1949 typedef RTCCINTREG 1923 typedef RTCCINTREG RT_FAR *PRTCCINTREG; 1950 1924 /** Pointer to a const signed integer register in the current context. */ 1951 typedef RTCCINTREG const 1925 typedef RTCCINTREG const RT_FAR *PCRTCCINTREG; 1952 1926 1953 1927 /** Unsigned integer register in the current context. … … 1959 1933 #endif 1960 1934 /** Pointer to an unsigned integer register in the current context. */ 1961 typedef RTCCUINTREG 1935 typedef RTCCUINTREG RT_FAR *PRTCCUINTXREG; 1962 1936 /** Pointer to a const unsigned integer register in the current context. */ 1963 typedef RTCCUINTREG const 1937 typedef RTCCUINTREG const RT_FAR *PCRTCCUINTXREG; 1964 1938 1965 1939 /** Signed integer extended register in the current context. … … 1971 1945 #endif 1972 1946 /** Pointer to a signed integer extended register in the current context. */ 1973 typedef RTCCINTXREG 1947 typedef RTCCINTXREG RT_FAR *PRTCCINTXREG; 1974 1948 /** Pointer to a const signed integer extended register in the current 1975 1949 * context. */ 1976 typedef RTCCINTXREG const 1950 typedef RTCCINTXREG const RT_FAR *PCRTCCINTXREG; 1977 1951 1978 1952 /** @def RTCCUINTREG_C … … 2073 2047 2074 2048 /** Pointer to a big integer number. */ 2075 typedef struct RTBIGNUM 2049 typedef struct RTBIGNUM RT_FAR *PRTBIGNUM; 2076 2050 /** Pointer to a const big integer number. */ 2077 typedef struct RTBIGNUM const 2051 typedef struct RTBIGNUM const RT_FAR *PCRTBIGNUM; 2078 2052 2079 2053 2080 2054 /** Pointer to a critical section. */ 2081 typedef struct RTCRITSECT 2055 typedef struct RTCRITSECT RT_FAR *PRTCRITSECT; 2082 2056 /** Pointer to a const critical section. */ 2083 typedef const struct RTCRITSECT 2057 typedef const struct RTCRITSECT RT_FAR *PCRTCRITSECT; 2084 2058 2085 2059 /** Pointer to a read/write critical section. */ 2086 typedef struct RTCRITSECTRW 2060 typedef struct RTCRITSECTRW RT_FAR *PRTCRITSECTRW; 2087 2061 /** Pointer to a const read/write critical section. */ 2088 typedef const struct RTCRITSECTRW 2062 typedef const struct RTCRITSECTRW RT_FAR *PCRTCRITSECTRW; 2089 2063 2090 2064 2091 2065 /** Condition variable handle. */ 2092 typedef R3PTRTYPE(struct RTCONDVARINTERNAL *)RTCONDVAR;2066 typedef R3PTRTYPE(struct RTCONDVARINTERNAL RT_FAR *) RTCONDVAR; 2093 2067 /** Pointer to a condition variable handle. */ 2094 typedef RTCONDVAR 2068 typedef RTCONDVAR RT_FAR *PRTCONDVAR; 2095 2069 /** Nil condition variable handle. */ 2096 2070 #define NIL_RTCONDVAR 0 2097 2071 2098 2072 /** Cryptographic (certificate) store handle. */ 2099 typedef R3R0PTRTYPE(struct RTCRSTOREINT *)RTCRSTORE;2073 typedef R3R0PTRTYPE(struct RTCRSTOREINT RT_FAR *) RTCRSTORE; 2100 2074 /** Pointer to a Cryptographic (certificate) store handle. */ 2101 typedef RTCRSTORE 2075 typedef RTCRSTORE RT_FAR *PRTCRSTORE; 2102 2076 /** Nil Cryptographic (certificate) store handle. */ 2103 2077 #define NIL_RTCRSTORE 0 2104 2078 2105 2079 /** Pointer to a const (store) certificate context. */ 2106 typedef struct RTCRCERTCTX const 2080 typedef struct RTCRCERTCTX const RT_FAR *PCRTCRCERTCTX; 2107 2081 2108 2082 /** Cryptographic message digest handle. */ 2109 typedef R3R0PTRTYPE(struct RTCRDIGESTINT *)RTCRDIGEST;2083 typedef R3R0PTRTYPE(struct RTCRDIGESTINT RT_FAR *) RTCRDIGEST; 2110 2084 /** Pointer to a cryptographic message digest handle. */ 2111 typedef RTCRDIGEST 2085 typedef RTCRDIGEST RT_FAR *PRTCRDIGEST; 2112 2086 /** NIL cryptographic message digest handle. */ 2113 2087 #define NIL_RTCRDIGEST (0) 2114 2088 2115 2089 /** Public key encryption schema handle. */ 2116 typedef R3R0PTRTYPE(struct RTCRPKIXENCRYPTIONINT *) RTCRPKIXENCRYPTION;2090 typedef R3R0PTRTYPE(struct RTCRPKIXENCRYPTIONINT RT_FAR *) RTCRPKIXENCRYPTION; 2117 2091 /** Pointer to a public key encryption schema handle. */ 2118 typedef RTCRPKIXENCRYPTION 2092 typedef RTCRPKIXENCRYPTION RT_FAR *PRTCRPKIXENCRYPTION; 2119 2093 /** NIL public key encryption schema handle */ 2120 2094 #define NIL_RTCRPKIXENCRYPTION (0) 2121 2095 2122 2096 /** Public key signature schema handle. */ 2123 typedef R3R0PTRTYPE(struct RTCRPKIXSIGNATUREINT *)RTCRPKIXSIGNATURE;2097 typedef R3R0PTRTYPE(struct RTCRPKIXSIGNATUREINT RT_FAR *) RTCRPKIXSIGNATURE; 2124 2098 /** Pointer to a public key signature schema handle. */ 2125 typedef RTCRPKIXSIGNATURE 2099 typedef RTCRPKIXSIGNATURE RT_FAR *PRTCRPKIXSIGNATURE; 2126 2100 /** NIL public key signature schema handle */ 2127 2101 #define NIL_RTCRPKIXSIGNATURE (0) 2128 2102 2129 2103 /** X.509 certificate paths builder & validator handle. */ 2130 typedef R3R0PTRTYPE(struct RTCRX509CERTPATHSINT *)RTCRX509CERTPATHS;2104 typedef R3R0PTRTYPE(struct RTCRX509CERTPATHSINT RT_FAR *) RTCRX509CERTPATHS; 2131 2105 /** Pointer to a certificate paths builder & validator handle. */ 2132 typedef RTCRX509CERTPATHS 2106 typedef RTCRX509CERTPATHS RT_FAR *PRTCRX509CERTPATHS; 2133 2107 /** Nil certificate paths builder & validator handle. */ 2134 2108 #define NIL_RTCRX509CERTPATHS 0 2135 2109 2136 2110 /** File handle. */ 2137 typedef R3R0PTRTYPE(struct RTFILEINT *)RTFILE;2111 typedef R3R0PTRTYPE(struct RTFILEINT RT_FAR *) RTFILE; 2138 2112 /** Pointer to file handle. */ 2139 typedef RTFILE 2113 typedef RTFILE RT_FAR *PRTFILE; 2140 2114 /** Nil file handle. */ 2141 2115 #define NIL_RTFILE ((RTFILE)~(RTHCINTPTR)0) 2142 2116 2143 2117 /** Async I/O request handle. */ 2144 typedef R3PTRTYPE(struct RTFILEAIOREQINTERNAL *)RTFILEAIOREQ;2118 typedef R3PTRTYPE(struct RTFILEAIOREQINTERNAL RT_FAR *) RTFILEAIOREQ; 2145 2119 /** Pointer to an async I/O request handle. */ 2146 typedef RTFILEAIOREQ 2120 typedef RTFILEAIOREQ RT_FAR *PRTFILEAIOREQ; 2147 2121 /** Nil request handle. */ 2148 2122 #define NIL_RTFILEAIOREQ 0 2149 2123 2150 2124 /** Async I/O completion context handle. */ 2151 typedef R3PTRTYPE(struct RTFILEAIOCTXINTERNAL *)RTFILEAIOCTX;2125 typedef R3PTRTYPE(struct RTFILEAIOCTXINTERNAL RT_FAR *) RTFILEAIOCTX; 2152 2126 /** Pointer to an async I/O completion context handle. */ 2153 typedef RTFILEAIOCTX 2127 typedef RTFILEAIOCTX RT_FAR *PRTFILEAIOCTX; 2154 2128 /** Nil context handle. */ 2155 2129 #define NIL_RTFILEAIOCTX 0 2156 2130 2157 2131 /** ISO image maker handle. */ 2158 typedef struct RTFSISOMAKERINT 2132 typedef struct RTFSISOMAKERINT RT_FAR *RTFSISOMAKER; 2159 2133 /** Pointer to an ISO image maker handle. */ 2160 typedef RTFSISOMAKER 2134 typedef RTFSISOMAKER RT_FAR *PRTFSISOMAKER; 2161 2135 /** NIL ISO maker handle. */ 2162 2136 #define NIL_RTFSISOMAKER ((RTFSISOMAKER)0) 2163 2137 2164 2138 /** INI-file handle. */ 2165 typedef struct RTINIFILEINT 2139 typedef struct RTINIFILEINT RT_FAR *RTINIFILE; 2166 2140 /** Pointer to an INI-file handle. */ 2167 typedef RTINIFILE 2141 typedef RTINIFILE RT_FAR *PRTINIFILE; 2168 2142 /** NIL INI-file handle. */ 2169 2143 #define NIL_RTINIFILE ((RTINIFILE)0) 2170 2144 2171 2145 /** Loader module handle. */ 2172 typedef R3R0PTRTYPE(struct RTLDRMODINTERNAL *)RTLDRMOD;2146 typedef R3R0PTRTYPE(struct RTLDRMODINTERNAL RT_FAR *) RTLDRMOD; 2173 2147 /** Pointer to a loader module handle. */ 2174 typedef RTLDRMOD 2148 typedef RTLDRMOD RT_FAR *PRTLDRMOD; 2175 2149 /** Nil loader module handle. */ 2176 2150 #define NIL_RTLDRMOD 0 2177 2151 2178 2152 /** Lock validator class handle. */ 2179 typedef R3R0PTRTYPE(struct RTLOCKVALCLASSINT *)RTLOCKVALCLASS;2153 typedef R3R0PTRTYPE(struct RTLOCKVALCLASSINT RT_FAR *) RTLOCKVALCLASS; 2180 2154 /** Pointer to a lock validator class handle. */ 2181 typedef RTLOCKVALCLASS 2155 typedef RTLOCKVALCLASS RT_FAR *PRTLOCKVALCLASS; 2182 2156 /** Nil lock validator class handle. */ 2183 2157 #define NIL_RTLOCKVALCLASS ((RTLOCKVALCLASS)0) 2184 2158 2185 2159 /** Ring-0 memory object handle. */ 2186 typedef R0PTRTYPE(struct RTR0MEMOBJINTERNAL *)RTR0MEMOBJ;2160 typedef R0PTRTYPE(struct RTR0MEMOBJINTERNAL RT_FAR *) RTR0MEMOBJ; 2187 2161 /** Pointer to a Ring-0 memory object handle. */ 2188 typedef RTR0MEMOBJ 2162 typedef RTR0MEMOBJ RT_FAR *PRTR0MEMOBJ; 2189 2163 /** Nil ring-0 memory object handle. */ 2190 2164 #define NIL_RTR0MEMOBJ 0 … … 2193 2167 typedef RTHCUINTPTR RTNATIVETHREAD; 2194 2168 /** Pointer to an native thread handle. */ 2195 typedef RTNATIVETHREAD 2169 typedef RTNATIVETHREAD RT_FAR *PRTNATIVETHREAD; 2196 2170 /** Nil native thread handle. */ 2197 2171 #define NIL_RTNATIVETHREAD (~(RTNATIVETHREAD)0) 2198 2172 2199 2173 /** Pipe handle. */ 2200 typedef R3R0PTRTYPE(struct RTPIPEINTERNAL *)RTPIPE;2174 typedef R3R0PTRTYPE(struct RTPIPEINTERNAL RT_FAR *) RTPIPE; 2201 2175 /** Pointer to a pipe handle. */ 2202 typedef RTPIPE 2176 typedef RTPIPE RT_FAR *PRTPIPE; 2203 2177 /** Nil pipe handle. 2204 2178 * @remarks This is not 0 because of UNIX and OS/2 handle values. Take care! */ … … 2207 2181 /** @typedef RTPOLLSET 2208 2182 * Poll set handle. */ 2209 typedef R3R0PTRTYPE(struct RTPOLLSETINTERNAL *)RTPOLLSET;2183 typedef R3R0PTRTYPE(struct RTPOLLSETINTERNAL RT_FAR *) RTPOLLSET; 2210 2184 /** Pointer to a poll set handle. */ 2211 typedef RTPOLLSET 2185 typedef RTPOLLSET RT_FAR *PRTPOLLSET; 2212 2186 /** Nil poll set handle handle. */ 2213 2187 #define NIL_RTPOLLSET ((RTPOLLSET)0) … … 2216 2190 typedef uint32_t RTPROCESS; 2217 2191 /** Pointer to a process identifier. */ 2218 typedef RTPROCESS 2192 typedef RTPROCESS RT_FAR *PRTPROCESS; 2219 2193 /** Nil process identifier. */ 2220 2194 #define NIL_RTPROCESS (~(RTPROCESS)0) … … 2223 2197 typedef RTR0UINTPTR RTR0PROCESS; 2224 2198 /** Pointer to a ring-0 process handle. */ 2225 typedef RTR0PROCESS 2199 typedef RTR0PROCESS RT_FAR *PRTR0PROCESS; 2226 2200 /** Nil ring-0 process handle. */ 2227 2201 #define NIL_RTR0PROCESS (~(RTR0PROCESS)0) … … 2229 2203 /** @typedef RTSEMEVENT 2230 2204 * Event Semaphore handle. */ 2231 typedef R3R0PTRTYPE(struct RTSEMEVENTINTERNAL *)RTSEMEVENT;2205 typedef R3R0PTRTYPE(struct RTSEMEVENTINTERNAL RT_FAR *) RTSEMEVENT; 2232 2206 /** Pointer to an event semaphore handle. */ 2233 typedef RTSEMEVENT 2207 typedef RTSEMEVENT RT_FAR *PRTSEMEVENT; 2234 2208 /** Nil event semaphore handle. */ 2235 2209 #define NIL_RTSEMEVENT 0 … … 2237 2211 /** @typedef RTSEMEVENTMULTI 2238 2212 * Event Multiple Release Semaphore handle. */ 2239 typedef R3R0PTRTYPE(struct RTSEMEVENTMULTIINTERNAL *) RTSEMEVENTMULTI;2213 typedef R3R0PTRTYPE(struct RTSEMEVENTMULTIINTERNAL RT_FAR *) RTSEMEVENTMULTI; 2240 2214 /** Pointer to an event multiple release semaphore handle. */ 2241 typedef RTSEMEVENTMULTI 2215 typedef RTSEMEVENTMULTI RT_FAR *PRTSEMEVENTMULTI; 2242 2216 /** Nil multiple release event semaphore handle. */ 2243 2217 #define NIL_RTSEMEVENTMULTI 0 … … 2245 2219 /** @typedef RTSEMFASTMUTEX 2246 2220 * Fast mutex Semaphore handle. */ 2247 typedef R3R0PTRTYPE(struct RTSEMFASTMUTEXINTERNAL *) RTSEMFASTMUTEX;2221 typedef R3R0PTRTYPE(struct RTSEMFASTMUTEXINTERNAL RT_FAR *) RTSEMFASTMUTEX; 2248 2222 /** Pointer to a fast mutex semaphore handle. */ 2249 typedef RTSEMFASTMUTEX 2223 typedef RTSEMFASTMUTEX RT_FAR *PRTSEMFASTMUTEX; 2250 2224 /** Nil fast mutex semaphore handle. */ 2251 2225 #define NIL_RTSEMFASTMUTEX 0 … … 2253 2227 /** @typedef RTSEMMUTEX 2254 2228 * Mutex Semaphore handle. */ 2255 typedef R3R0PTRTYPE(struct RTSEMMUTEXINTERNAL *)RTSEMMUTEX;2229 typedef R3R0PTRTYPE(struct RTSEMMUTEXINTERNAL RT_FAR *) RTSEMMUTEX; 2256 2230 /** Pointer to a mutex semaphore handle. */ 2257 typedef RTSEMMUTEX 2231 typedef RTSEMMUTEX RT_FAR *PRTSEMMUTEX; 2258 2232 /** Nil mutex semaphore handle. */ 2259 2233 #define NIL_RTSEMMUTEX 0 … … 2261 2235 /** @typedef RTSEMSPINMUTEX 2262 2236 * Spinning mutex Semaphore handle. */ 2263 typedef R3R0PTRTYPE(struct RTSEMSPINMUTEXINTERNAL *) RTSEMSPINMUTEX;2237 typedef R3R0PTRTYPE(struct RTSEMSPINMUTEXINTERNAL RT_FAR *) RTSEMSPINMUTEX; 2264 2238 /** Pointer to a spinning mutex semaphore handle. */ 2265 typedef RTSEMSPINMUTEX 2239 typedef RTSEMSPINMUTEX RT_FAR *PRTSEMSPINMUTEX; 2266 2240 /** Nil spinning mutex semaphore handle. */ 2267 2241 #define NIL_RTSEMSPINMUTEX 0 … … 2269 2243 /** @typedef RTSEMRW 2270 2244 * Read/Write Semaphore handle. */ 2271 typedef R3R0PTRTYPE(struct RTSEMRWINTERNAL *)RTSEMRW;2245 typedef R3R0PTRTYPE(struct RTSEMRWINTERNAL RT_FAR *) RTSEMRW; 2272 2246 /** Pointer to a read/write semaphore handle. */ 2273 typedef RTSEMRW 2247 typedef RTSEMRW RT_FAR *PRTSEMRW; 2274 2248 /** Nil read/write semaphore handle. */ 2275 2249 #define NIL_RTSEMRW 0 … … 2277 2251 /** @typedef RTSEMXROADS 2278 2252 * Crossroads semaphore handle. */ 2279 typedef R3R0PTRTYPE(struct RTSEMXROADSINTERNAL *)RTSEMXROADS;2253 typedef R3R0PTRTYPE(struct RTSEMXROADSINTERNAL RT_FAR *) RTSEMXROADS; 2280 2254 /** Pointer to a crossroads semaphore handle. */ 2281 typedef RTSEMXROADS 2255 typedef RTSEMXROADS RT_FAR *PRTSEMXROADS; 2282 2256 /** Nil crossroads semaphore handle. */ 2283 2257 #define NIL_RTSEMXROADS ((RTSEMXROADS)0) 2284 2258 2285 2259 /** Spinlock handle. */ 2286 typedef R3R0PTRTYPE(struct RTSPINLOCKINTERNAL *)RTSPINLOCK;2260 typedef R3R0PTRTYPE(struct RTSPINLOCKINTERNAL RT_FAR *) RTSPINLOCK; 2287 2261 /** Pointer to a spinlock handle. */ 2288 typedef RTSPINLOCK 2262 typedef RTSPINLOCK RT_FAR *PRTSPINLOCK; 2289 2263 /** Nil spinlock handle. */ 2290 2264 #define NIL_RTSPINLOCK 0 2291 2265 2292 2266 /** Socket handle. */ 2293 typedef R3R0PTRTYPE(struct RTSOCKETINT *)RTSOCKET;2267 typedef R3R0PTRTYPE(struct RTSOCKETINT RT_FAR *) RTSOCKET; 2294 2268 /** Pointer to socket handle. */ 2295 typedef RTSOCKET 2269 typedef RTSOCKET RT_FAR *PRTSOCKET; 2296 2270 /** Nil socket handle. */ 2297 2271 #define NIL_RTSOCKET ((RTSOCKET)0) 2298 2272 2299 2273 /** Pointer to a RTTCPSERVER handle. */ 2300 typedef struct RTTCPSERVER 2274 typedef struct RTTCPSERVER RT_FAR *PRTTCPSERVER; 2301 2275 /** Pointer to a RTTCPSERVER handle. */ 2302 typedef PRTTCPSERVER 2276 typedef PRTTCPSERVER RT_FAR *PPRTTCPSERVER; 2303 2277 /** Nil RTTCPSERVER handle. */ 2304 2278 #define NIL_RTTCPSERVER ((PRTTCPSERVER)0) 2305 2279 2306 2280 /** Pointer to a RTUDPSERVER handle. */ 2307 typedef struct RTUDPSERVER 2281 typedef struct RTUDPSERVER RT_FAR *PRTUDPSERVER; 2308 2282 /** Pointer to a RTUDPSERVER handle. */ 2309 typedef PRTUDPSERVER 2283 typedef PRTUDPSERVER RT_FAR *PPRTUDPSERVER; 2310 2284 /** Nil RTUDPSERVER handle. */ 2311 2285 #define NIL_RTUDPSERVER ((PRTUDPSERVER)0) 2312 2286 2313 2287 /** Thread handle.*/ 2314 typedef R3R0PTRTYPE(struct RTTHREADINT *)RTTHREAD;2288 typedef R3R0PTRTYPE(struct RTTHREADINT RT_FAR *) RTTHREAD; 2315 2289 /** Pointer to thread handle. */ 2316 typedef RTTHREAD 2290 typedef RTTHREAD RT_FAR *PRTTHREAD; 2317 2291 /** Nil thread handle. */ 2318 2292 #define NIL_RTTHREAD 0 2319 2293 2320 2294 /** Thread context switching hook handle. */ 2321 typedef R0PTRTYPE(struct RTTHREADCTXHOOKINT *)RTTHREADCTXHOOK;2295 typedef R0PTRTYPE(struct RTTHREADCTXHOOKINT RT_FAR *) RTTHREADCTXHOOK; 2322 2296 /** Pointer to Thread context switching hook handle. */ 2323 typedef RTTHREADCTXHOOK 2297 typedef RTTHREADCTXHOOK RT_FAR *PRTTHREADCTXHOOK; 2324 2298 /** Nil Thread context switching hook handle. */ 2325 2299 #define NIL_RTTHREADCTXHOOK ((RTTHREADCTXHOOK)0) … … 2328 2302 typedef RTHCINTPTR RTTLS; 2329 2303 /** Pointer to a TLS index. */ 2330 typedef RTTLS 2304 typedef RTTLS RT_FAR *PRTTLS; 2331 2305 /** Pointer to a const TLS index. */ 2332 typedef RTTLS const 2306 typedef RTTLS const RT_FAR *PCRTTLS; 2333 2307 /** NIL TLS index value. */ 2334 2308 #define NIL_RTTLS ((RTTLS)-1) … … 2337 2311 * @remarks This is not a R3/R0 type like most other handles! 2338 2312 */ 2339 typedef struct RTTRACEBUFINT 2313 typedef struct RTTRACEBUFINT RT_FAR *RTTRACEBUF; 2340 2314 /** Pointer to a trace buffer handle. */ 2341 typedef RTTRACEBUF 2315 typedef RTTRACEBUF RT_FAR *PRTTRACEBUF; 2342 2316 /** Nil trace buffer handle. */ 2343 2317 #define NIL_RTTRACEBUF ((RTTRACEBUF)0) … … 2347 2321 2348 2322 /** Handle to a simple heap. */ 2349 typedef R3R0PTRTYPE(struct RTHEAPSIMPLEINTERNAL *)RTHEAPSIMPLE;2323 typedef R3R0PTRTYPE(struct RTHEAPSIMPLEINTERNAL RT_FAR *) RTHEAPSIMPLE; 2350 2324 /** Pointer to a handle to a simple heap. */ 2351 typedef RTHEAPSIMPLE 2325 typedef RTHEAPSIMPLE RT_FAR *PRTHEAPSIMPLE; 2352 2326 /** NIL simple heap handle. */ 2353 2327 #define NIL_RTHEAPSIMPLE ((RTHEAPSIMPLE)0) 2354 2328 2355 2329 /** Handle to an offset based heap. */ 2356 typedef R3R0PTRTYPE(struct RTHEAPOFFSETINTERNAL *)RTHEAPOFFSET;2330 typedef R3R0PTRTYPE(struct RTHEAPOFFSETINTERNAL RT_FAR *) RTHEAPOFFSET; 2357 2331 /** Pointer to a handle to an offset based heap. */ 2358 typedef RTHEAPOFFSET 2332 typedef RTHEAPOFFSET RT_FAR *PRTHEAPOFFSET; 2359 2333 /** NIL offset based heap handle. */ 2360 2334 #define NIL_RTHEAPOFFSET ((RTHEAPOFFSET)0) 2361 2335 2362 2336 /** Handle to an environment block. */ 2363 typedef R3PTRTYPE(struct RTENVINTERNAL *)RTENV;2337 typedef R3PTRTYPE(struct RTENVINTERNAL RT_FAR *) RTENV; 2364 2338 /** Pointer to a handle to an environment block. */ 2365 typedef RTENV 2339 typedef RTENV RT_FAR *PRTENV; 2366 2340 /** NIL simple heap handle. */ 2367 2341 #define NIL_RTENV ((RTENV)0) … … 2373 2347 typedef uint32_t RTCPUID; 2374 2348 /** Pointer to a CPU identifier. */ 2375 typedef RTCPUID 2349 typedef RTCPUID RT_FAR *PRTCPUID; 2376 2350 /** Pointer to a const CPU identifier. */ 2377 typedef RTCPUID const 2351 typedef RTCPUID const RT_FAR *PCRTCPUID; 2378 2352 /** Nil CPU Id. */ 2379 2353 #define NIL_RTCPUID ((RTCPUID)~0) … … 2398 2372 } RTCPUSET; 2399 2373 /** Pointer to a CPU set. */ 2400 typedef RTCPUSET 2374 typedef RTCPUSET RT_FAR *PRTCPUSET; 2401 2375 /** Pointer to a const CPU set. */ 2402 typedef RTCPUSET const 2376 typedef RTCPUSET const RT_FAR *PCRTCPUSET; 2403 2377 2404 2378 /** A handle table handle. */ 2405 typedef R3R0PTRTYPE(struct RTHANDLETABLEINT *)RTHANDLETABLE;2379 typedef R3R0PTRTYPE(struct RTHANDLETABLEINT RT_FAR *) RTHANDLETABLE; 2406 2380 /** A pointer to a handle table handle. */ 2407 typedef RTHANDLETABLE 2381 typedef RTHANDLETABLE RT_FAR *PRTHANDLETABLE; 2408 2382 /** @def NIL_RTHANDLETABLE 2409 2383 * NIL handle table handle. */ … … 2411 2385 2412 2386 /** A handle to a low resolution timer. */ 2413 typedef R3R0PTRTYPE(struct RTTIMERLRINT *)RTTIMERLR;2387 typedef R3R0PTRTYPE(struct RTTIMERLRINT RT_FAR *) RTTIMERLR; 2414 2388 /** A pointer to a low resolution timer handle. */ 2415 typedef RTTIMERLR 2389 typedef RTTIMERLR RT_FAR *PRTTIMERLR; 2416 2390 /** @def NIL_RTTIMERLR 2417 2391 * NIL low resolution timer handle value. */ … … 2419 2393 2420 2394 /** Handle to a random number generator. */ 2421 typedef R3R0PTRTYPE(struct RTRANDINT *)RTRAND;2395 typedef R3R0PTRTYPE(struct RTRANDINT RT_FAR *) RTRAND; 2422 2396 /** Pointer to a random number generator handle. */ 2423 typedef RTRAND 2397 typedef RTRAND RT_FAR *PRTRAND; 2424 2398 /** NIL random number generator handle value. */ 2425 2399 #define NIL_RTRAND ((RTRAND)0) 2426 2400 2427 2401 /** Debug address space handle. */ 2428 typedef R3R0PTRTYPE(struct RTDBGASINT *)RTDBGAS;2402 typedef R3R0PTRTYPE(struct RTDBGASINT RT_FAR *) RTDBGAS; 2429 2403 /** Pointer to a debug address space handle. */ 2430 typedef RTDBGAS 2404 typedef RTDBGAS RT_FAR *PRTDBGAS; 2431 2405 /** NIL debug address space handle. */ 2432 2406 #define NIL_RTDBGAS ((RTDBGAS)0) 2433 2407 2434 2408 /** Debug module handle. */ 2435 typedef R3R0PTRTYPE(struct RTDBGMODINT *)RTDBGMOD;2409 typedef R3R0PTRTYPE(struct RTDBGMODINT RT_FAR *) RTDBGMOD; 2436 2410 /** Pointer to a debug module handle. */ 2437 typedef RTDBGMOD 2411 typedef RTDBGMOD RT_FAR *PRTDBGMOD; 2438 2412 /** NIL debug module handle. */ 2439 2413 #define NIL_RTDBGMOD ((RTDBGMOD)0) 2440 2414 2441 2415 /** Manifest handle. */ 2442 typedef struct RTMANIFESTINT 2416 typedef struct RTMANIFESTINT RT_FAR *RTMANIFEST; 2443 2417 /** Pointer to a manifest handle. */ 2444 typedef RTMANIFEST 2418 typedef RTMANIFEST RT_FAR *PRTMANIFEST; 2445 2419 /** NIL manifest handle. */ 2446 2420 #define NIL_RTMANIFEST ((RTMANIFEST)~(uintptr_t)0) 2447 2421 2448 2422 /** Memory pool handle. */ 2449 typedef R3R0PTRTYPE(struct RTMEMPOOLINT *)RTMEMPOOL;2423 typedef R3R0PTRTYPE(struct RTMEMPOOLINT RT_FAR *) RTMEMPOOL; 2450 2424 /** Pointer to a memory pool handle. */ 2451 typedef RTMEMPOOL 2425 typedef RTMEMPOOL RT_FAR *PRTMEMPOOL; 2452 2426 /** NIL memory pool handle. */ 2453 2427 #define NIL_RTMEMPOOL ((RTMEMPOOL)0) … … 2456 2430 2457 2431 /** String cache handle. */ 2458 typedef R3R0PTRTYPE(struct RTSTRCACHEINT *)RTSTRCACHE;2432 typedef R3R0PTRTYPE(struct RTSTRCACHEINT RT_FAR *) RTSTRCACHE; 2459 2433 /** Pointer to a string cache handle. */ 2460 typedef RTSTRCACHE 2434 typedef RTSTRCACHE RT_FAR *PRTSTRCACHE; 2461 2435 /** NIL string cache handle. */ 2462 2436 #define NIL_RTSTRCACHE ((RTSTRCACHE)0) … … 2466 2440 2467 2441 /** Virtual Filesystem handle. */ 2468 typedef struct RTVFSINTERNAL 2442 typedef struct RTVFSINTERNAL RT_FAR *RTVFS; 2469 2443 /** Pointer to a VFS handle. */ 2470 typedef RTVFS 2444 typedef RTVFS RT_FAR *PRTVFS; 2471 2445 /** A NIL VFS handle. */ 2472 2446 #define NIL_RTVFS ((RTVFS)~(uintptr_t)0) 2473 2447 2474 2448 /** Virtual Filesystem base object handle. */ 2475 typedef struct RTVFSOBJINTERNAL 2449 typedef struct RTVFSOBJINTERNAL RT_FAR *RTVFSOBJ; 2476 2450 /** Pointer to a VFS base object handle. */ 2477 typedef RTVFSOBJ 2451 typedef RTVFSOBJ RT_FAR *PRTVFSOBJ; 2478 2452 /** A NIL VFS base object handle. */ 2479 2453 #define NIL_RTVFSOBJ ((RTVFSOBJ)~(uintptr_t)0) 2480 2454 2481 2455 /** Virtual Filesystem directory handle. */ 2482 typedef struct RTVFSDIRINTERNAL 2456 typedef struct RTVFSDIRINTERNAL RT_FAR *RTVFSDIR; 2483 2457 /** Pointer to a VFS directory handle. */ 2484 typedef RTVFSDIR 2458 typedef RTVFSDIR RT_FAR *PRTVFSDIR; 2485 2459 /** A NIL VFS directory handle. */ 2486 2460 #define NIL_RTVFSDIR ((RTVFSDIR)~(uintptr_t)0) 2487 2461 2488 2462 /** Virtual Filesystem filesystem stream handle. */ 2489 typedef struct RTVFSFSSTREAMINTERNAL 2463 typedef struct RTVFSFSSTREAMINTERNAL RT_FAR *RTVFSFSSTREAM; 2490 2464 /** Pointer to a VFS filesystem stream handle. */ 2491 typedef RTVFSFSSTREAM 2465 typedef RTVFSFSSTREAM RT_FAR *PRTVFSFSSTREAM; 2492 2466 /** A NIL VFS filesystem stream handle. */ 2493 2467 #define NIL_RTVFSFSSTREAM ((RTVFSFSSTREAM)~(uintptr_t)0) 2494 2468 2495 2469 /** Virtual Filesystem I/O stream handle. */ 2496 typedef struct RTVFSIOSTREAMINTERNAL 2470 typedef struct RTVFSIOSTREAMINTERNAL RT_FAR *RTVFSIOSTREAM; 2497 2471 /** Pointer to a VFS I/O stream handle. */ 2498 typedef RTVFSIOSTREAM 2472 typedef RTVFSIOSTREAM RT_FAR *PRTVFSIOSTREAM; 2499 2473 /** A NIL VFS I/O stream handle. */ 2500 2474 #define NIL_RTVFSIOSTREAM ((RTVFSIOSTREAM)~(uintptr_t)0) 2501 2475 2502 2476 /** Virtual Filesystem file handle. */ 2503 typedef struct RTVFSFILEINTERNAL 2477 typedef struct RTVFSFILEINTERNAL RT_FAR *RTVFSFILE; 2504 2478 /** Pointer to a VFS file handle. */ 2505 typedef RTVFSFILE 2479 typedef RTVFSFILE RT_FAR *PRTVFSFILE; 2506 2480 /** A NIL VFS file handle. */ 2507 2481 #define NIL_RTVFSFILE ((RTVFSFILE)~(uintptr_t)0) 2508 2482 2509 2483 /** Virtual Filesystem symbolic link handle. */ 2510 typedef struct RTVFSSYMLINKINTERNAL 2484 typedef struct RTVFSSYMLINKINTERNAL RT_FAR *RTVFSSYMLINK; 2511 2485 /** Pointer to a VFS symbolic link handle. */ 2512 typedef RTVFSSYMLINK 2486 typedef RTVFSSYMLINK RT_FAR *PRTVFSSYMLINK; 2513 2487 /** A NIL VFS symbolic link handle. */ 2514 2488 #define NIL_RTVFSSYMLINK ((RTVFSSYMLINK)~(uintptr_t)0) 2515 2489 2516 2490 /** Async I/O manager handle. */ 2517 typedef struct RTAIOMGRINT 2491 typedef struct RTAIOMGRINT RT_FAR *RTAIOMGR; 2518 2492 /** Pointer to a async I/O manager handle. */ 2519 typedef RTAIOMGR 2493 typedef RTAIOMGR RT_FAR *PRTAIOMGR; 2520 2494 /** A NIL async I/O manager handle. */ 2521 2495 #define NIL_RTAIOMGR ((RTAIOMGR)~(uintptr_t)0) 2522 2496 2523 2497 /** Async I/O manager file handle. */ 2524 typedef struct RTAIOMGRFILEINT 2498 typedef struct RTAIOMGRFILEINT RT_FAR *RTAIOMGRFILE; 2525 2499 /** Pointer to a async I/O manager file handle. */ 2526 typedef RTAIOMGRFILE 2500 typedef RTAIOMGRFILE RT_FAR *PRTAIOMGRFILE; 2527 2501 /** A NIL async I/O manager file handle. */ 2528 2502 #define NIL_RTAIOMGRFILE ((RTAIOMGRFILE)~(uintptr_t)0) 2529 2503 2530 2504 /** Kernel module information record handle. */ 2531 typedef struct RTKRNLMODINFOINT 2505 typedef struct RTKRNLMODINFOINT RT_FAR *RTKRNLMODINFO; 2532 2506 /** Pointer to a kernel information record handle. */ 2533 typedef RTKRNLMODINFO 2507 typedef RTKRNLMODINFO RT_FAR *PRTKRNLMODINFO; 2534 2508 /** A NIL kernel module information record handle. */ 2535 2509 #define NIL_RTKRNLMODINFO ((RTKRNLMODINFO)~(uintptr_t)0); … … 2558 2532 } RTHANDLETYPE; 2559 2533 /** Pointer to a handle type. */ 2560 typedef RTHANDLETYPE *PRTHANDLETYPE;2534 typedef RTHANDLETYPE RT_FAR *PRTHANDLETYPE; 2561 2535 2562 2536 /** … … 2577 2551 } RTHANDLEUNION; 2578 2552 /** Pointer to a handle union. */ 2579 typedef RTHANDLEUNION *PRTHANDLEUNION;2553 typedef RTHANDLEUNION RT_FAR *PRTHANDLEUNION; 2580 2554 /** Pointer to a const handle union. */ 2581 typedef RTHANDLEUNION const *PCRTHANDLEUNION;2555 typedef RTHANDLEUNION const RT_FAR *PCRTHANDLEUNION; 2582 2556 2583 2557 /** … … 2592 2566 } RTHANDLE; 2593 2567 /** Pointer to a generic handle. */ 2594 typedef RTHANDLE *PRTHANDLE;2568 typedef RTHANDLE RT_FAR *PRTHANDLE; 2595 2569 /** Pointer to a const generic handle. */ 2596 typedef RTHANDLE const *PCRTHANDLE;2570 typedef RTHANDLE const RT_FAR *PCRTHANDLE; 2597 2571 2598 2572 … … 2637 2611 } RTERRINFO; 2638 2612 /** Pointer to an error info structure. */ 2639 typedef RTERRINFO *PRTERRINFO;2613 typedef RTERRINFO RT_FAR *PRTERRINFO; 2640 2614 /** Pointer to a const error info structure. */ 2641 typedef RTERRINFO const *PCRTERRINFO;2615 typedef RTERRINFO const RT_FAR *PCRTERRINFO; 2642 2616 2643 2617 /** … … 2652 2626 } RTERRINFOSTATIC; 2653 2627 /** Pointer to a error info buffer. */ 2654 typedef RTERRINFOSTATIC *PRTERRINFOSTATIC;2628 typedef RTERRINFOSTATIC RT_FAR *PRTERRINFOSTATIC; 2655 2629 /** Pointer to a const static error info buffer. */ 2656 typedef RTERRINFOSTATIC const *PCRTERRINFOSTATIC;2630 typedef RTERRINFOSTATIC const RT_FAR *PCRTERRINFOSTATIC; 2657 2631 2658 2632 … … 2689 2663 } RTUUID; 2690 2664 /** Pointer to UUID data. */ 2691 typedef RTUUID *PRTUUID;2665 typedef RTUUID RT_FAR *PRTUUID; 2692 2666 /** Pointer to readonly UUID data. */ 2693 typedef const RTUUID *PCRTUUID;2667 typedef const RTUUID RT_FAR *PCRTUUID; 2694 2668 2695 2669 /** Initializes a RTUUID structure with all zeros (RTUuidIsNull() true). */ … … 2701 2675 2702 2676 /** Compression handle. */ 2703 typedef struct RTZIPCOMP *PRTZIPCOMP;2677 typedef struct RTZIPCOMP RT_FAR *PRTZIPCOMP; 2704 2678 /** Decompressor handle. */ 2705 typedef struct RTZIPDECOMP *PRTZIPDECOMP;2679 typedef struct RTZIPDECOMP RT_FAR *PRTZIPDECOMP; 2706 2680 2707 2681 … … 2709 2683 * Unicode Code Point. 2710 2684 */ 2711 typedef uint32_t RTUNICP;2685 typedef uint32_t RTUNICP; 2712 2686 /** Pointer to an Unicode Code Point. */ 2713 typedef RTUNICP 2687 typedef RTUNICP RT_FAR *PRTUNICP; 2714 2688 /** Pointer to an Unicode Code Point. */ 2715 typedef const RTUNICP 2689 typedef const RTUNICP RT_FAR *PCRTUNICP; 2716 2690 /** Max value a RTUNICP type can hold. */ 2717 #define RTUNICP_MAX ( ~(RTUNICP)0 )2691 #define RTUNICP_MAX ( ~(RTUNICP)0 ) 2718 2692 /** Invalid code point. 2719 2693 * This is returned when encountered invalid encodings or invalid 2720 2694 * unicode code points. */ 2721 #define RTUNICP_INVALID ( UINT32_C(0xfffffffe) )2695 #define RTUNICP_INVALID ( UINT32_C(0xfffffffe) ) 2722 2696 2723 2697 … … 2730 2704 * and cch means count of the typedef 'char', which is assumed to be an octet. 2731 2705 */ 2732 typedef uint16_t RTUTF16;2706 typedef uint16_t RTUTF16; 2733 2707 /** Pointer to a UTF-16 character. */ 2734 typedef RTUTF16 *PRTUTF16;2708 typedef RTUTF16 RT_FAR *PRTUTF16; 2735 2709 /** Pointer to a const UTF-16 character. */ 2736 typedef const RTUTF16 *PCRTUTF16;2710 typedef const RTUTF16 RT_FAR *PCRTUTF16; 2737 2711 2738 2712 … … 2748 2722 } RTSTRTUPLE; 2749 2723 /** Pointer to a string tuple. */ 2750 typedef RTSTRTUPLE *PRTSTRTUPLE;2724 typedef RTSTRTUPLE RT_FAR *PRTSTRTUPLE; 2751 2725 /** Pointer to a const string tuple. */ 2752 typedef RTSTRTUPLE const *PCRTSTRTUPLE;2726 typedef RTSTRTUPLE const RT_FAR *PCRTSTRTUPLE; 2753 2727 2754 2728 /** … … 2792 2766 } RTPOINT; 2793 2767 /** Pointer to a point. */ 2794 typedef RTPOINT *PRTPOINT;2768 typedef RTPOINT RT_FAR *PRTPOINT; 2795 2769 /** Pointer to a const point. */ 2796 typedef const RTPOINT *PCRTPOINT;2770 typedef const RTPOINT RT_FAR *PCRTPOINT; 2797 2771 2798 2772 … … 2812 2786 } RTRECT; 2813 2787 /** Pointer to a double point rectangle. */ 2814 typedef RTRECT *PRTRECT;2788 typedef RTRECT RT_FAR *PRTRECT; 2815 2789 /** Pointer to a const double point rectangle. */ 2816 typedef const RTRECT *PCRTRECT;2790 typedef const RTRECT RT_FAR *PCRTRECT; 2817 2791 2818 2792 … … 2838 2812 } RTRECT2; 2839 2813 /** Pointer to a point + size rectangle. */ 2840 typedef RTRECT2 *PRTRECT2;2814 typedef RTRECT2 RT_FAR *PRTRECT2; 2841 2815 /** Pointer to a const point + size rectangle. */ 2842 typedef const RTRECT2 *PCRTRECT2;2816 typedef const RTRECT2 RT_FAR *PCRTRECT2; 2843 2817 2844 2818 … … 2854 2828 } RTRECTSIZE; 2855 2829 /** Pointer to a rectangle size. */ 2856 typedef RTRECTSIZE *PRTRECTSIZE;2830 typedef RTRECTSIZE RT_FAR *PRTRECTSIZE; 2857 2831 /** Pointer to a const rectangle size. */ 2858 typedef const RTRECTSIZE *PCRTRECTSIZE;2832 typedef const RTRECTSIZE RT_FAR *PCRTRECTSIZE; 2859 2833 2860 2834 … … 2876 2850 } RTMAC; 2877 2851 /** Pointer to a MAC address. */ 2878 typedef RTMAC *PRTMAC;2852 typedef RTMAC RT_FAR *PRTMAC; 2879 2853 /** Pointer to a readonly MAC address. */ 2880 typedef const RTMAC *PCRTMAC;2854 typedef const RTMAC RT_FAR *PCRTMAC; 2881 2855 2882 2856 2883 2857 /** Pointer to a lock validator record. 2884 2858 * The structure definition is found in iprt/lockvalidator.h. */ 2885 typedef struct RTLOCKVALRECEXCL 2859 typedef struct RTLOCKVALRECEXCL RT_FAR *PRTLOCKVALRECEXCL; 2886 2860 /** Pointer to a record of one ownership share. 2887 2861 * The structure definition is found in iprt/lockvalidator.h. */ 2888 typedef struct RTLOCKVALRECSHRD 2862 typedef struct RTLOCKVALRECSHRD RT_FAR *PRTLOCKVALRECSHRD; 2889 2863 /** Pointer to a lock validator source position. 2890 2864 * The structure definition is found in iprt/lockvalidator.h. */ 2891 typedef struct RTLOCKVALSRCPOS 2865 typedef struct RTLOCKVALSRCPOS RT_FAR *PRTLOCKVALSRCPOS; 2892 2866 /** Pointer to a const lock validator source position. 2893 2867 * The structure definition is found in iprt/lockvalidator.h. */ 2894 typedef struct RTLOCKVALSRCPOS const 2868 typedef struct RTLOCKVALSRCPOS const RT_FAR *PCRTLOCKVALSRCPOS; 2895 2869 2896 2870 /** @name Special sub-class values. … … 2983 2957 } RTRANGE; 2984 2958 /** Pointer to a range descriptor. */ 2985 typedef RTRANGE *PRTRANGE;2959 typedef RTRANGE RT_FAR *PRTRANGE; 2986 2960 /** Pointer to a readonly range descriptor. */ 2987 typedef const RTRANGE *PCRTRANGE;2961 typedef const RTRANGE RT_FAR *PCRTRANGE; 2988 2962 2989 2963 … … 2994 2968 { 2995 2969 /** Pointer into the void. */ 2996 void 2970 void RT_FAR *pv; 2997 2971 /** As a signed integer. */ 2998 2972 intptr_t i; … … 3000 2974 intptr_t u; 3001 2975 /** Pointer to char value. */ 3002 char 2976 char RT_FAR *pch; 3003 2977 /** Pointer to char value. */ 3004 unsigned char 2978 unsigned char RT_FAR *puch; 3005 2979 /** Pointer to a int value. */ 3006 int 2980 int RT_FAR *pi; 3007 2981 /** Pointer to a unsigned int value. */ 3008 unsigned int 2982 unsigned int RT_FAR *pu; 3009 2983 /** Pointer to a long value. */ 3010 long 2984 long RT_FAR *pl; 3011 2985 /** Pointer to a long value. */ 3012 unsigned long 2986 unsigned long RT_FAR *pul; 3013 2987 /** Pointer to a 8-bit unsigned value. */ 3014 uint8_t 2988 uint8_t RT_FAR *pu8; 3015 2989 /** Pointer to a 16-bit unsigned value. */ 3016 uint16_t 2990 uint16_t RT_FAR *pu16; 3017 2991 /** Pointer to a 32-bit unsigned value. */ 3018 uint32_t 2992 uint32_t RT_FAR *pu32; 3019 2993 /** Pointer to a 64-bit unsigned value. */ 3020 uint64_t 2994 uint64_t RT_FAR *pu64; 3021 2995 /** Pointer to a UTF-16 character. */ 3022 2996 PRTUTF16 pwc; … … 3025 2999 } RTPTRUNION; 3026 3000 /** Pointer to a pointer union. */ 3027 typedef RTPTRUNION *PRTPTRUNION;3001 typedef RTPTRUNION RT_FAR *PRTPTRUNION; 3028 3002 3029 3003 /** … … 3033 3007 { 3034 3008 /** Pointer into the void. */ 3035 void const 3009 void const RT_FAR *pv; 3036 3010 /** As a signed integer. */ 3037 3011 intptr_t i; … … 3039 3013 intptr_t u; 3040 3014 /** Pointer to char value. */ 3041 char const 3015 char const RT_FAR *pch; 3042 3016 /** Pointer to char value. */ 3043 unsigned char const 3017 unsigned char const RT_FAR *puch; 3044 3018 /** Pointer to a int value. */ 3045 int const 3019 int const RT_FAR *pi; 3046 3020 /** Pointer to a unsigned int value. */ 3047 unsigned int const 3021 unsigned int const RT_FAR *pu; 3048 3022 /** Pointer to a long value. */ 3049 long const 3023 long const RT_FAR *pl; 3050 3024 /** Pointer to a long value. */ 3051 unsigned long const 3025 unsigned long const RT_FAR *pul; 3052 3026 /** Pointer to a 8-bit unsigned value. */ 3053 uint8_t const 3027 uint8_t const RT_FAR *pu8; 3054 3028 /** Pointer to a 16-bit unsigned value. */ 3055 uint16_t const 3029 uint16_t const RT_FAR *pu16; 3056 3030 /** Pointer to a 32-bit unsigned value. */ 3057 uint32_t const 3031 uint32_t const RT_FAR *pu32; 3058 3032 /** Pointer to a 64-bit unsigned value. */ 3059 uint64_t const 3033 uint64_t const RT_FAR *pu64; 3060 3034 /** Pointer to a UTF-16 character. */ 3061 3035 PCRTUTF16 pwc; … … 3064 3038 } RTCPTRUNION; 3065 3039 /** Pointer to a const pointer union. */ 3066 typedef RTCPTRUNION *PRTCPTRUNION;3040 typedef RTCPTRUNION RT_FAR *PRTCPTRUNION; 3067 3041 3068 3042 /** … … 3072 3046 { 3073 3047 /** Pointer into the void. */ 3074 void volatile 3048 void volatile RT_FAR *pv; 3075 3049 /** As a signed integer. */ 3076 3050 intptr_t i; … … 3078 3052 intptr_t u; 3079 3053 /** Pointer to char value. */ 3080 char volatile 3054 char volatile RT_FAR *pch; 3081 3055 /** Pointer to char value. */ 3082 unsigned char volatile *puch;3056 unsigned char volatile RT_FAR *puch; 3083 3057 /** Pointer to a int value. */ 3084 int volatile 3058 int volatile RT_FAR *pi; 3085 3059 /** Pointer to a unsigned int value. */ 3086 unsigned int volatile *pu;3060 unsigned int volatile RT_FAR *pu; 3087 3061 /** Pointer to a long value. */ 3088 long volatile 3062 long volatile RT_FAR *pl; 3089 3063 /** Pointer to a long value. */ 3090 unsigned long volatile *pul;3064 unsigned long volatile RT_FAR *pul; 3091 3065 /** Pointer to a 8-bit unsigned value. */ 3092 uint8_t volatile 3066 uint8_t volatile RT_FAR *pu8; 3093 3067 /** Pointer to a 16-bit unsigned value. */ 3094 uint16_t volatile 3068 uint16_t volatile RT_FAR *pu16; 3095 3069 /** Pointer to a 32-bit unsigned value. */ 3096 uint32_t volatile 3070 uint32_t volatile RT_FAR *pu32; 3097 3071 /** Pointer to a 64-bit unsigned value. */ 3098 uint64_t volatile 3072 uint64_t volatile RT_FAR *pu64; 3099 3073 /** Pointer to a UTF-16 character. */ 3100 RTUTF16 volatile 3074 RTUTF16 volatile RT_FAR *pwc; 3101 3075 /** Pointer to a UUID character. */ 3102 RTUUID volatile 3076 RTUUID volatile RT_FAR *pUuid; 3103 3077 } RTVPTRUNION; 3104 3078 /** Pointer to a const pointer union. */ 3105 typedef RTVPTRUNION *PRTVPTRUNION;3079 typedef RTVPTRUNION RT_FAR *PRTVPTRUNION; 3106 3080 3107 3081 /** … … 3111 3085 { 3112 3086 /** Pointer into the void. */ 3113 void const volatile *pv;3087 void const volatile RT_FAR *pv; 3114 3088 /** As a signed integer. */ 3115 intptr_t i;3089 intptr_t i; 3116 3090 /** As an unsigned integer. */ 3117 intptr_t u;3091 intptr_t u; 3118 3092 /** Pointer to char value. */ 3119 char const volatile *pch;3093 char const volatile RT_FAR *pch; 3120 3094 /** Pointer to char value. */ 3121 unsigned char const volatile *puch;3095 unsigned char const volatile RT_FAR *puch; 3122 3096 /** Pointer to a int value. */ 3123 int const volatile *pi;3097 int const volatile RT_FAR *pi; 3124 3098 /** Pointer to a unsigned int value. */ 3125 unsigned int const volatile *pu;3099 unsigned int const volatile RT_FAR *pu; 3126 3100 /** Pointer to a long value. */ 3127 long const volatile *pl;3101 long const volatile RT_FAR *pl; 3128 3102 /** Pointer to a long value. */ 3129 unsigned long const volatile *pul;3103 unsigned long const volatile RT_FAR *pul; 3130 3104 /** Pointer to a 8-bit unsigned value. */ 3131 uint8_t const volatile *pu8;3105 uint8_t const volatile RT_FAR *pu8; 3132 3106 /** Pointer to a 16-bit unsigned value. */ 3133 uint16_t const volatile *pu16;3107 uint16_t const volatile RT_FAR *pu16; 3134 3108 /** Pointer to a 32-bit unsigned value. */ 3135 uint32_t const volatile *pu32;3109 uint32_t const volatile RT_FAR *pu32; 3136 3110 /** Pointer to a 64-bit unsigned value. */ 3137 uint64_t const volatile *pu64;3111 uint64_t const volatile RT_FAR *pu64; 3138 3112 /** Pointer to a UTF-16 character. */ 3139 RTUTF16 const volatile *pwc;3113 RTUTF16 const volatile RT_FAR *pwc; 3140 3114 /** Pointer to a UUID character. */ 3141 RTUUID const volatile *pUuid;3115 RTUUID const volatile RT_FAR *pUuid; 3142 3116 } RTCVPTRUNION; 3143 3117 /** Pointer to a const pointer union. */ 3144 typedef RTCVPTRUNION *PRTCVPTRUNION;3118 typedef RTCVPTRUNION RT_FAR *PRTCVPTRUNION; 3145 3119 3146 3120
Note:
See TracChangeset
for help on using the changeset viewer.