Files
my-os-project2/kernel/assert.h
2025-08-15 01:41:11 +02:00

16 lines
248 B
C

#ifndef ASSERT_H_
#define ASSERT_H_
#include "kprintf.h"
#include "hal/hal.h"
#define ASSERT(mod, cond, fmt, ...) \
do { \
if (!(cond)) { \
ERR(mod, fmt, ##__VA_ARGS__); \
hal_hang(); \
} \
} while(0)
#endif // ASSERT_H_