logging: make failed asserts panic

This commit is contained in:
Matheus
2023-04-23 15:06:34 -03:00
parent cc79f0ee4a
commit ee63940c68
+2 -3
View File
@@ -2,16 +2,15 @@
#define _LOGGING_H
#include <printf.h>
#include <panic.h>
void _putchar(char c);
void logging_sethook(void (*fun)(char));
// TODO panic
#define __assert(x) \
if (!(x)){ \
printf("\e[91m%s:%s:%d: %s failed\n\e[0m", __FILE__, __func__, __LINE__, #x); \
for(;;); \
_panic(NULL, NULL); \
};