am-kernels/tests/cpu-tests/include/trap.h

14 lines
181 B
C
Raw Normal View History

2020-08-11 17:38:42 +00:00
#ifndef __TRAP_H__
#define __TRAP_H__
#include <am.h>
#include <klib.h>
#include <klib-macros.h>
__attribute__((noinline))
2020-08-11 17:40:29 +00:00
void check(bool cond) {
2020-08-11 17:38:42 +00:00
if (!cond) halt(1);
}
#endif