From 49d1a4c56218cf932adddf60ad2f56a8386c76fc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 15 Jul 2019 17:54:50 -0400 Subject: move lib dirs to lib subdir also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging --- lib/libc/include/any-linux-any/linux/kernel.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/libc/include/any-linux-any/linux/kernel.h (limited to 'lib/libc/include/any-linux-any/linux/kernel.h') diff --git a/lib/libc/include/any-linux-any/linux/kernel.h b/lib/libc/include/any-linux-any/linux/kernel.h new file mode 100644 index 0000000000..52101982c0 --- /dev/null +++ b/lib/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 + +/* + * '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 -- cgit v1.2.3