77a28a26a6709fe3fe90026acfd9936849824890
[sfrench/cifs-2.6.git] / tools / include / linux / types.h
1 #ifndef _TOOLS_LINUX_TYPES_H_
2 #define _TOOLS_LINUX_TYPES_H_
3
4 #include <stdbool.h>
5 #include <stddef.h>
6 #include <stdint.h>
7
8 #define __SANE_USERSPACE_TYPES__        /* For PPC64, to get LL64 types */
9 #include <asm/types.h>
10 #include <asm/posix_types.h>
11
12 struct page;
13 struct kmem_cache;
14
15 typedef enum {
16         GFP_KERNEL,
17         GFP_ATOMIC,
18         __GFP_HIGHMEM,
19         __GFP_HIGH
20 } gfp_t;
21
22 /*
23  * We define u64 as uint64_t for every architecture
24  * so that we can print it with "%"PRIx64 without getting warnings.
25  *
26  * typedef __u64 u64;
27  * typedef __s64 s64;
28  */
29 typedef uint64_t u64;
30 typedef int64_t s64;
31
32 typedef __u32 u32;
33 typedef __s32 s32;
34
35 typedef __u16 u16;
36 typedef __s16 s16;
37
38 typedef __u8  u8;
39 typedef __s8  s8;
40
41 #ifdef __CHECKER__
42 #define __bitwise__ __attribute__((bitwise))
43 #else
44 #define __bitwise__
45 #endif
46 #define __bitwise __bitwise__
47
48 #define __force
49 #define __user
50 #define __must_check
51 #define __cold
52
53 typedef __u16 __bitwise __le16;
54 typedef __u16 __bitwise __be16;
55 typedef __u32 __bitwise __le32;
56 typedef __u32 __bitwise __be32;
57 typedef __u64 __bitwise __le64;
58 typedef __u64 __bitwise __be64;
59
60 typedef struct {
61         int counter;
62 } atomic_t;
63
64 #ifndef __aligned_u64
65 # define __aligned_u64 __u64 __attribute__((aligned(8)))
66 #endif
67
68 struct list_head {
69         struct list_head *next, *prev;
70 };
71
72 struct hlist_head {
73         struct hlist_node *first;
74 };
75
76 struct hlist_node {
77         struct hlist_node *next, **pprev;
78 };
79
80 #endif /* _TOOLS_LINUX_TYPES_H_ */