summaryrefslogtreecommitdiff
path: root/src/kernel/panic.h
blob: 9407e44f12ed552e2fb6de47e307b16a260e192a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once
#include <kernel/arch/generic.h>
#include <kernel/util.h>

#define panic() do { \
	tty_const(" PANIC! at the "); \
	tty_const(__func__); \
	tty_const(" (" __FILE__ ":" NUM2STR(__LINE__) ") "); \
	halt_cpu(); \
} while (0)

#define assert(stmt) do { if (!(stmt)) panic(); } while (0)