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