blob: a4ae42b23e0ad640a1bd13af37c428cfdccd76d3 [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 "] "
swissChilib7ef65d2021-07-17 12:51:52 -07008#define WARN "[\033[93m WARN " RESET "] "
swissChili9bd74de2021-06-15 20:30:48 -07009#define ERROR "[\033[91m ERROR " RESET "] "
10#define DEBUG "[\033[93m DEBUG " RESET "] "
11
swissChili0b35bf22021-02-18 12:49:40 -080012void kprintf(const char *format, ...);
swissChili825d46b2021-02-21 10:14:16 -080013void kassert_int(bool condition, const char *message, const char *file,
14 const int line);
swissChili0b35bf22021-02-18 12:49:40 -080015
16#define kassert(cond, msg) kassert_int((cond), (msg), __FILE__, __LINE__)
swissChili9bd74de2021-06-15 20:30:48 -070017#define kpanic(msg) \
18 kassert(false, msg); \
swissChili825d46b2021-02-21 10:14:16 -080019 __builtin_unreachable()