]>
Commit | Line | Data |
---|---|---|
744d9859 SG |
1 | /* |
2 | * Copyright (c) 2011 The Chromium OS Authors. | |
3 | * | |
3765b3e7 | 4 | * SPDX-License-Identifier: GPL-2.0+ |
744d9859 SG |
5 | */ |
6 | ||
7 | #ifndef __ASM_SANDBOX_TYPES_H | |
8 | #define __ASM_SANDBOX_TYPES_H | |
9 | ||
10 | typedef unsigned short umode_t; | |
11 | ||
12 | /* | |
13 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | |
14 | * header files exported to user space | |
15 | */ | |
16 | ||
17 | typedef __signed__ char __s8; | |
18 | typedef unsigned char __u8; | |
19 | ||
20 | typedef __signed__ short __s16; | |
21 | typedef unsigned short __u16; | |
22 | ||
23 | typedef __signed__ int __s32; | |
24 | typedef unsigned int __u32; | |
25 | ||
26 | #if defined(__GNUC__) | |
27 | __extension__ typedef __signed__ long long __s64; | |
28 | __extension__ typedef unsigned long long __u64; | |
29 | #endif | |
30 | ||
31 | /* | |
32 | * These aren't exported outside the kernel to avoid name space clashes | |
33 | */ | |
34 | #ifdef __KERNEL__ | |
35 | ||
36 | typedef signed char s8; | |
37 | typedef unsigned char u8; | |
38 | ||
39 | typedef signed short s16; | |
40 | typedef unsigned short u16; | |
41 | ||
42 | typedef signed int s32; | |
43 | typedef unsigned int u32; | |
44 | ||
45 | typedef signed long long s64; | |
46 | typedef unsigned long long u64; | |
47 | ||
48 | #define BITS_PER_LONG CONFIG_SANDBOX_BITS_PER_LONG | |
49 | ||
50 | typedef unsigned long dma_addr_t; | |
51 | typedef unsigned long phys_addr_t; | |
52 | typedef unsigned long phys_size_t; | |
53 | ||
54 | #endif /* __KERNEL__ */ | |
55 | ||
56 | #endif |