tape-kernel 1.0
a modular modern independent kernel
Loading...
Searching...
No Matches
err.h
Go to the documentation of this file.
1#ifndef ERR_H
2#define ERR_H
3
4#define assert __assert
5#define panic __panic
6#include "../lib/types.h"
7
8//assert(cond, msg), its if condition is not true, NOT if it is true
9#define __assert(cond, msg) do { if (!(cond)) { panic(msg); } } while(0) //err handle option
10NORETURN void __panic(const char* txt); //panic
11
12#endif
void __panic(const char *txt)
panic halts the system with a kernel panic message
Definition err.c:25
#define NORETURN
Definition types.h:40