Changeset 53653 in vbox for trunk/src/VBox/ExtPacks/VBoxDTrace/include
- Timestamp:
- Jan 2, 2015 12:19:28 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 97423
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h
r53652 r53653 47 47 typedef unsigned int uint_t; 48 48 typedef uintptr_t ulong_t; 49 typedef uint64_t u_longlong_t; 49 50 typedef uint64_t hrtime_t; 50 51 typedef RTCCUINTREG greg_t; … … 61 62 62 63 #define NANOSEC RT_NS_1SEC 64 #define MICROSEC RT_US_1SEC 63 65 #define MILLISEC RT_MS_1SEC 66 #define SEC 1 64 67 #define MAXPATHLEN RTPATH_MAX 65 68 #define PATH_MAX RTPATH_MAX … … 67 70 #define NCPU RTCPUSET_MAX_CPUS 68 71 72 #define MIN(a1, a2) RT_MIN(a1, a2) 73 #define MAX(a1, a2) RT_MAX(a1, a2) 74 #define ABS(a_iValue) RT_ABS(a_iValue) 75 #define roundup(uWhat, uUnit) ( ( (uWhat) + ((uUnit) - 1)) / (uUnit) * (uUnit) ) 76 69 77 #if defined(RT_ARCH_X86) 70 78 # ifndef __i386 71 # define __i386 179 # define __i386 1 72 80 # endif 73 81 # ifndef __x86 74 # define __x86 1 82 # define __x86 1 83 # endif 84 # ifndef _IPL32 85 # define _IPL32 1 75 86 # endif 76 87 77 88 #elif defined(RT_ARCH_AMD64) 78 89 # ifndef __x86_64 79 # define __x86_64 190 # define __x86_64 1 80 91 # endif 81 92 # ifndef __x86 82 # define __x86 1 93 # define __x86 1 94 # endif 95 # ifndef _LP64 96 # define _LP64 1 83 97 # endif 84 98 … … 109 123 # define snprintf RTStrPrintf 110 124 #endif 111 112 125 113 126 /* … … 131 144 #if defined(_MSC_VER) || defined(IN_RING0) 132 145 # define EALREADY (114) 146 # define EOVERFLOW (79) 147 #endif 148 149 /* 150 * Bitmap stuff. 151 */ 152 #define BT_SIZEOFMAP(a_cBits) ( (a_cBits + 63) / 8 ) 153 #define BT_SET(a_aulBitmap, iBit) ASMBitSet(a_aulBitmap, iBit) 154 #define BT_CLEAR(a_aulBitmap, iBit) ASMBitClear(a_aulBitmap, iBit) 155 #define BT_TEST(a_aulBitmap, iBit) ASMBitTest(a_aulBitmap, iBit) 156 #if ARCH_BITS == 32 157 # define BT_NBIPUL 32 158 # define BT_ULSHIFT 5 /* log2(32) = 5 */ 159 # define BT_ULMASK 0x1f 160 # define BT_BITOUL(a_cBits) ( ((a_cBits) + 31) / 32 ) 161 #elif ARCH_BITS == 64 162 # define BT_NBIPUL 64 163 # define BT_ULSHIFT 6 /* log2(32) = 6 */ 164 # define BT_ULMASK 0x3f 165 # define BT_BITOUL(a_cBits) ( ((a_cBits) + 63) / 64 ) 166 #else 167 # error Bad ARCH_BITS... 133 168 #endif 134 169 … … 141 176 #define P2ROUNDUP(uWhat, uAlign) ( ((uWhat) + (uAlign) - 1) & ~(uAlign - 1) ) 142 177 #define IS_P2ALIGNED(uWhat, uAlign) ( !((uWhat) & ((uAlign) - 1)) ) 143 #define roundup(uWhat, uUnit) ( ( (uWhat) + ((uUnit) - 1)) / (uUnit) * (uUnit) )144 #define MIN(a1, a2) RT_MIN(a1, a2)145 178 146 179 #define B_FALSE (0) … … 359 392 */ 360 393 # include <iprt/alloca.h> 394 # include <iprt/assert.h> 361 395 # include <iprt/mem.h> 362 396 # include <iprt/string.h> 363 397 # include <iprt/time.h> 364 398 # define gethrtime() RTTimeNanoTS() 399 # define strcasecmp(a_psz1, a_psz2) RTStrICmp(a_psz1, a_psz2) 400 # define strncasecmp(a_psz1, a_psz2, a_cch) \ 401 RTStrNICmp(a_psz1, a_psz2, a_cch) 402 # define assert(expr) Assert(expr) 365 403 366 404 /* This isn't necessarily making things easier at first, but allows EF and … … 373 411 # define free(a_pvMem) RTMemFree(a_pvMem) 374 412 # define strdup(a_psz) RTStrDup(a_psz) 413 # define strlcpy(a_pszDst, a_pszSrc, a_cbDst) ((void)RTStrCopy(a_pszDst, a_cbDst, a_pszSrc)) 414 375 415 376 416 #endif
Note:
See TracChangeset
for help on using the changeset viewer.