summaryrefslogtreecommitdiff
path: root/system/easy-kernel/kernel.h
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-22 02:37:27 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-22 02:37:27 +0000
commit5754f38ed17979c243b5fc4c5f310921c55c4c93 (patch)
treed32758fc01173a94987a60da2fd059e4322cfe45 /system/easy-kernel/kernel.h
parent19cf833e404b062e3dd3f6bfc4ccc54c8998194f (diff)
downloadpackages-5754f38ed17979c243b5fc4c5f310921c55c4c93.tar.gz
packages-5754f38ed17979c243b5fc4c5f310921c55c4c93.tar.bz2
packages-5754f38ed17979c243b5fc4c5f310921c55c4c93.tar.xz
packages-5754f38ed17979c243b5fc4c5f310921c55c4c93.zip
system/easy-kernel: return kernel.h hack for gcc-go and others
Diffstat (limited to 'system/easy-kernel/kernel.h')
-rw-r--r--system/easy-kernel/kernel.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/system/easy-kernel/kernel.h b/system/easy-kernel/kernel.h
new file mode 100644
index 000000000..f9171158b
--- /dev/null
+++ b/system/easy-kernel/kernel.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _LINUX_KERNEL_H
+#define _LINUX_KERNEL_H
+
+#ifdef __GLIBC__
+#include <linux/sysinfo.h>
+#endif
+
+/*
+ * '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 */