]> git.saurik.com Git - apple/xnu.git/blob - tests/turnstile_multihop_types.h
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tests / turnstile_multihop_types.h
1 // vim:noexpandtab
2 #ifndef __TYPES_H__
3 #define __TYPES_H__
4
5 #include <stdint.h>
6 #include <stdbool.h>
7
8 typedef signed char s8;
9 typedef unsigned char u8;
10 typedef uint16_t u16;
11 typedef int16_t s16;
12 typedef uint32_t u32;
13 typedef uint64_t u64;
14 typedef int32_t s32;
15 typedef int64_t s64;
16
17 #if defined(__arm64__) || defined(__x86_64__)
18 typedef u64 un;
19 typedef s64 sn;
20 #else
21 typedef u32 un;
22 typedef s32 sn;
23 #endif
24
25 #ifndef __DRT_H__
26 typedef u32 uint;
27 #endif
28
29 #define volatile_read(atom) (*((volatile typeof(*(atom)) *)(atom)))
30 #define volatile_write(atom, value) (*((volatile typeof(*(atom)) *)(atom)) = value)
31
32 #endif