utils.h: add panic() macro

Signed-off-by: Sven Peter <sven@svenpeter.dev>
This commit is contained in:
Sven Peter 2021-01-23 15:13:33 +01:00 committed by Hector Martin
parent d762391a68
commit 63fad7e3e2

View file

@ -252,4 +252,10 @@ int debug_printf(const char *fmt, ...);
void udelay(u32 d); void udelay(u32 d);
void reboot(void); void reboot(void);
#define panic(fmt, ...) \
do { \
debug_printf(fmt, ##__VA_ARGS__); \
reboot(); \
} while (0)
#endif #endif