From d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Mon, 11 Mar 2024 21:30:31 -0400 Subject: usermode capable kernel with logging syscall --- lib/jove.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/jove.h (limited to 'lib/jove.h') diff --git a/lib/jove.h b/lib/jove.h new file mode 100644 index 0000000..4aa60ed --- /dev/null +++ b/lib/jove.h @@ -0,0 +1,15 @@ +#ifndef JOVE_LIB_JOVE_H +#define JOVE_LIB_JOVE_H 1 + +#define ALWAYS_INLINE inline __attribute__((always_inline)) +#define PAGEALIGN __attribute__((aligned(0x1000))) + +//#define LOG2(n) (__builtin_clz(n) ^ 31) + +extern void *_kernel_start; +extern void *_kernel_end; + +__attribute__((noreturn)) void _kpanic(const char *file, int line, const char *fmt, ...); +#define kpanic(...) _kpanic(__FILE__, __LINE__, __VA_ARGS__) + +#endif -- cgit v1.2.1