...
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user