kernel: implement panic()

This commit is contained in:
2023-04-09 16:35:15 +01:00
parent 9b75ca8b8c
commit da415c7f6d
5 changed files with 184 additions and 4 deletions

View File

@@ -21,15 +21,18 @@ void write_once(volatile T *ptr, T value)
#endif
#undef __used
#define __used __attribute__((used))
#define __used __attribute__((__used__))
#undef __noreturn
#define __noreturn __attribute__((__noreturn__))
#undef __packed
#define __packed __attribute__((packed))
#define __packed __attribute__((__packed__))
#undef __section
#define __section(name) __attribute__((section(name)))
#define __section(name) __attribute__((__section__(name)))
#undef __aligned
#define __aligned(x) __attribute__((aligned(x)))
#define __aligned(x) __attribute__((__aligned__(x)))
#endif

8
include/socks/panic.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef SOCKS_PANIC_H_
#define SOCKS_PANIC_H_
#include <socks/compiler.h>
extern void __noreturn panic(const char *fmt, ...);
#endif