diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-03-18 13:47:59 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-03-18 13:47:59 -0400 |
| commit | 7dfbeca13eca48a506bbeba6ce7a18b2a8d25ce1 (patch) | |
| tree | bfe391827fec58195e61a682b5a1da4e7111a67f /libc/include/any-linux-any/linux/kernel.h | |
| parent | 6acabd6b577ac63274b31bd1b2ae22cc75ab2c7a (diff) | |
| download | zig-7dfbeca13eca48a506bbeba6ce7a18b2a8d25ce1.tar.gz zig-7dfbeca13eca48a506bbeba6ce7a18b2a8d25ce1.zip | |
libc: separate linux headers from musl/glibc
Diffstat (limited to 'libc/include/any-linux-any/linux/kernel.h')
| -rw-r--r-- | libc/include/any-linux-any/linux/kernel.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/include/any-linux-any/linux/kernel.h b/libc/include/any-linux-any/linux/kernel.h new file mode 100644 index 0000000000..52101982c0 --- /dev/null +++ b/libc/include/any-linux-any/linux/kernel.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _LINUX_KERNEL_H +#define _LINUX_KERNEL_H + +#include <linux/sysinfo.h> + +/* + * 'kernel.h' contains some often-used function prototypes etc + */ +#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) +#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) + +#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) + +#endif /* _LINUX_KERNEL_H */
\ No newline at end of file |
