Minor fixes to comments.
[AROS.git] / rom / kernel / kernel_debug.h
blob958485c09ecca7bc4b4bbe599ebc3391bfc2cbe0
1 /*
2 * This file contains useful redefinition of bug() macro which uses
3 * kernel.resource's own debugging facilities. Include it if you
4 * need bug() in your code.
5 */
7 #include <aros/asmcall.h>
8 #include <aros/libcall.h>
9 #include <stdarg.h>
11 #ifdef bug
12 #undef bug
13 #endif
15 int krnPutC(int chr, struct KernelBase *KernelBase);
16 int krnBug(const char *format, va_list args, APTR kernelBase);
17 void krnDisplayAlert(const char *text, struct KernelBase *KernelBase);
18 void krnPanic(struct KernelBase *KernelBase, const char *fmt, ...);
20 static inline void _bug(APTR kernelBase, const char *format, ...)
22 va_list args;
24 va_start(args, format);
26 /*
27 * We use internal entry here. This is done because this function can be used
28 * during early boot, while KernelBase is NULL. However it's still passed,
29 * just in case.
31 krnBug(format, args, kernelBase);
33 va_end(args);
36 #define bug(...) _bug(KernelBase, __VA_ARGS__)
37 #define nbug(...) _bug(NULL, __VA_ARGS__)