blob: 3365474fc215f93a0b5ee3f393ae41b911e62e92 [file] [log] [blame]
swissChili0b35bf22021-02-18 12:49:40 -08001#pragma once
2
3#include "kint.h"
4
swissChili9bd74de2021-06-15 20:30:48 -07005#define RESET "\033[0m"
6#define INFO "[\033[96m INFO " RESET "] "
7#define OKAY "[\033[92m OK " RESET "] "
8#define ERROR "[\033[91m ERROR " RESET "] "
9#define DEBUG "[\033[93m DEBUG " RESET "] "
10
swissChili0b35bf22021-02-18 12:49:40 -080011void kprintf(const char *format, ...);
swissChili825d46b2021-02-21 10:14:16 -080012void kassert_int(bool condition, const char *message, const char *file,
13 const int line);
swissChili0b35bf22021-02-18 12:49:40 -080014
15#define kassert(cond, msg) kassert_int((cond), (msg), __FILE__, __LINE__)
swissChili9bd74de2021-06-15 20:30:48 -070016#define kpanic(msg) \
17 kassert(false, msg); \
swissChili825d46b2021-02-21 10:14:16 -080018 __builtin_unreachable()