38 #ifndef included_clib_types_h 39 #define included_clib_types_h 49 #if defined(CLIB_LINUX_KERNEL) 51 #include <asm/types.h> 52 #define CLIB_AVOID_CLASH_WITH_LINUX_TYPES 56 typedef unsigned char u8;
57 typedef unsigned short u16;
60 #if defined (__x86_64__) 62 typedef int i128 __attribute__ ((mode (TI)));
63 typedef unsigned int u128 __attribute__ ((mode (TI)));
67 #if (defined(i386) || defined(_mips) || defined(powerpc) || defined (__SPU__) || defined(__sparc__) || defined(__arm__) || defined (__xtensa__) || defined(__TMS320C6X__)) 69 typedef long long i64;
71 #ifndef CLIB_AVOID_CLASH_WITH_LINUX_TYPES 72 typedef unsigned int u32;
73 typedef unsigned long long u64;
76 #elif defined(_mips) && __mips == 64 77 #define log2_uword_bits 6 78 #define clib_address_bits _MIPS_SZPTR 80 #elif defined(alpha) || defined(__x86_64__) || defined (__powerpc64__) || defined (__aarch64__) 84 #define log2_uword_bits 6 85 #define clib_address_bits 64 87 #ifndef CLIB_AVOID_CLASH_WITH_LINUX_TYPES 88 typedef unsigned int u32;
89 typedef unsigned long u64;
93 #error "can't define types" 97 #ifndef log2_uword_bits 98 #define log2_uword_bits 5 102 #define uword_bits (1 << log2_uword_bits) 104 #ifndef clib_address_bits 105 #define clib_address_bits 32 120 #if clib_address_bits == 64 136 #define uword_to_pointer(u,type) ((type) (clib_address_t) (u)) 145 typedef __complex__
float cf32;
146 typedef __complex__
double cf64;
155 #define clib_mem_unaligned(pointer,type) \ 156 (((struct { CLIB_PACKED (type _data); } *) (pointer))->_data) 160 #define clib_mem_aligned(addr,type,align) \ 163 __attribute__ ((aligned (align), packed)); \
static uword pointer_to_uword(const void *p)