xref: /kvmtool/include/linux/types.h (revision c8058b88379ef2e72f184ee2be186d99a12beabd)
1 #ifndef LINUX_TYPES_H
2 #define LINUX_TYPES_H
3 
4 #include <kvm/compiler.h>
5 #define __SANE_USERSPACE_TYPES__	/* For PPC64, to get LL64 types */
6 #include <asm/types.h>
7 
8 typedef __u64 u64;
9 typedef __s64 s64;
10 
11 typedef __u32 u32;
12 typedef __s32 s32;
13 
14 typedef __u16 u16;
15 typedef __s16 s16;
16 
17 typedef __u8  u8;
18 typedef __s8  s8;
19 
20 #ifdef __CHECKER__
21 #define __bitwise__ __attribute__((bitwise))
22 #else
23 #define __bitwise__
24 #endif
25 #ifdef __CHECK_ENDIAN__
26 #define __bitwise __bitwise__
27 #else
28 #define __bitwise
29 #endif
30 
31 
32 typedef __u16 __bitwise __le16;
33 typedef __u16 __bitwise __be16;
34 typedef __u32 __bitwise __le32;
35 typedef __u32 __bitwise __be32;
36 typedef __u64 __bitwise __le64;
37 typedef __u64 __bitwise __be64;
38 
39 struct list_head {
40 	struct list_head *next, *prev;
41 };
42 
43 struct hlist_head {
44 	struct hlist_node *first;
45 };
46 
47 struct hlist_node {
48 	struct hlist_node *next, **pprev;
49 };
50 
51 #endif /* LINUX_TYPES_H */
52