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