This commit is contained in:
nub31
2025-09-07 00:08:31 +02:00
parent 4f55956fee
commit 8cc90d6f2f
4 changed files with 34 additions and 36 deletions

View File

@@ -1,13 +1,15 @@
#pragma once
#include <arch.h>
#include <printf.h>
// In arch code, make sure arch_api.panic is set up befire calling
// In arch code, make sure arch_api.panic and arch_api.console.putchar is set up befire calling
static inline void assert(bool condition, const char* msg)
{
#if DEBUG
if (!condition)
{
printf(msg);
arch_api.panic();
}
#endif