]> git.sesse.net Git - bcachefs-tools-debian/blob - include/linux/types.h
Disable pristine-tar option in gbp.conf, since there is no pristine-tar branch.
[bcachefs-tools-debian] / 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 #include <fcntl.h>
9 #include <sys/stat.h>
10 #include <sys/types.h>
11 #include <linux/posix_types.h>
12
13 #define __SANE_USERSPACE_TYPES__        /* For PPC64, to get LL64 types */
14 #include <asm/types.h>
15
16 #include <linux/cache.h>
17
18 #define BITS_PER_LONG   __BITS_PER_LONG
19
20 struct page;
21 struct kmem_cache;
22
23 typedef unsigned long           pgoff_t;
24
25 typedef unsigned short          umode_t;
26
27 typedef unsigned gfp_t;
28
29 #define GFP_ATOMIC      0
30 #define GFP_NOFS        0
31 #define GFP_NOIO        0
32 #define GFP_NOWAIT      0
33 #define __GFP_FS        0
34 #define __GFP_IO        0
35 #define __GFP_NOWARN    0
36 #define __GFP_NORETRY   0
37 #define __GFP_NOFAIL    0
38 #define __GFP_ZERO      1
39 #define GFP_KERNEL      2
40
41 #define PAGE_ALLOC_COSTLY_ORDER 6
42
43 typedef __u64 u64;
44 typedef __s64 s64;
45 typedef __u32 u32;
46 typedef __s32 s32;
47 typedef __u16 u16;
48 typedef __s16 s16;
49 typedef __u8  u8;
50 typedef __s8  s8;
51
52 #ifdef __CHECKER__
53 #define __bitwise__ __attribute__((bitwise))
54 #else
55 #define __bitwise__
56 #endif
57 #ifdef __CHECK_ENDIAN__
58 #define __bitwise __bitwise__
59 #else
60 #define __bitwise
61 #endif
62
63 #define __force
64 #define __user
65 #define __must_check
66 #define __cold
67
68 typedef __u16 __bitwise __le16;
69 typedef __u16 __bitwise __be16;
70 typedef __u32 __bitwise __le32;
71 typedef __u32 __bitwise __be32;
72 typedef __u64 __bitwise __le64;
73 typedef __u64 __bitwise __be64;
74
75 #ifndef __aligned_u64
76 # define __aligned_u64 __u64 __attribute__((aligned(8)))
77 #endif
78
79 typedef u64 sector_t;
80
81 typedef void (*swap_r_func_t)(void *a, void *b, int size, const void *priv);
82 typedef void (*swap_func_t)(void *a, void *b, int size);
83
84 typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
85 typedef int (*cmp_func_t)(const void *a, const void *b);
86
87 typedef unsigned int __bitwise slab_flags_t;
88 typedef u64 phys_addr_t;
89 struct vm_struct;
90 struct mnt_idmap;
91
92 #endif /* _TOOLS_LINUX_TYPES_H_ */