Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/types.h
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | |||||
typedef __vm_offset_t vm_offset_t; | typedef __vm_offset_t vm_offset_t; | ||||
typedef __uint64_t vm_ooffset_t; | typedef __uint64_t vm_ooffset_t; | ||||
typedef __vm_paddr_t vm_paddr_t; | typedef __vm_paddr_t vm_paddr_t; | ||||
typedef __uint64_t vm_pindex_t; | typedef __uint64_t vm_pindex_t; | ||||
typedef __vm_size_t vm_size_t; | typedef __vm_size_t vm_size_t; | ||||
typedef __rman_res_t rman_res_t; | typedef __rman_res_t rman_res_t; | ||||
#ifdef _KERNEL | #if defined(_KERNEL) | ||||
typedef int boolean_t; | typedef int boolean_t; | ||||
typedef struct device *device_t; | typedef struct device *device_t; | ||||
typedef __intfptr_t intfptr_t; | typedef __intfptr_t intfptr_t; | ||||
/* | /* | ||||
* XXX this is fixed width for historical reasons. It should have had type | * XXX this is fixed width for historical reasons. It should have had type | ||||
* __int_fast32_t. Fixed-width types should not be used unless binary | * __int_fast32_t. Fixed-width types should not be used unless binary | ||||
* compatibility is essential. Least-width types should be used even less | * compatibility is essential. Least-width types should be used even less | ||||
* since they provide smaller benefits. | * since they provide smaller benefits. | ||||
* | * | ||||
* XXX should be MD. | * XXX should be MD. | ||||
* | * | ||||
* XXX this is bogus in -current, but still used for spl*(). | * XXX this is bogus in -current, but still used for spl*(). | ||||
*/ | */ | ||||
typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ | typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ | ||||
typedef __uintfptr_t uintfptr_t; | typedef __uintfptr_t uintfptr_t; | ||||
typedef __uint64_t uoff_t; | typedef __uint64_t uoff_t; | ||||
typedef char vm_memattr_t; /* memory attribute codes */ | typedef char vm_memattr_t; /* memory attribute codes */ | ||||
typedef struct vm_page *vm_page_t; | typedef struct vm_page *vm_page_t; | ||||
#define offsetof(type, field) __offsetof(type, field) | |||||
#endif /* _KERNEL */ | |||||
#if defined(_KERNEL) || defined(_STANDALONE) | |||||
#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) | #if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) | ||||
#define __bool_true_false_are_defined 1 | #define __bool_true_false_are_defined 1 | ||||
#define false 0 | #define false 0 | ||||
#define true 1 | #define true 1 | ||||
#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) | #if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER) | ||||
typedef int _Bool; | typedef int _Bool; | ||||
#endif | #endif | ||||
typedef _Bool bool; | typedef _Bool bool; | ||||
#endif /* !__bool_true_false_are_defined && !__cplusplus */ | #endif /* !__bool_true_false_are_defined && !__cplusplus */ | ||||
#endif /* KERNEL || _STANDALONE */ | |||||
#define offsetof(type, field) __offsetof(type, field) | |||||
#endif /* _KERNEL */ | |||||
/* | /* | ||||
* The following are all things that really shouldn't exist in this header, | * The following are all things that really shouldn't exist in this header, | ||||
* since its purpose is to provide typedefs, not miscellaneous doodads. | * since its purpose is to provide typedefs, not miscellaneous doodads. | ||||
*/ | */ | ||||
#ifdef __POPCNT__ | #ifdef __POPCNT__ | ||||
#define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) | #define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) | ||||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |