AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
panic.h
Go to the documentation of this file.
1
#ifndef _CORE_PANIC_H
2
#define _CORE_PANIC_H
3
4
#include <
core/system.h
>
5
#include <
core/printk.h
>
6
#include <
core/arch.h
>
7
8
#define __PANIC_MSG "Bailing out. You are on your own. Good luck.\n"
9
10
/* Stops the kernel for good, when it finds itself in a state it can't
11
* go on from: prints where and why, and a stack trace, then halts the
12
* CPU with its interrupts disabled. */
13
#define panic(s) \
14
{\
15
printk("KERNEL PANIC:\n%s [%d] %s: %s\n" __PANIC_MSG, \
16
__FILE__, __LINE__, __func__, s);\
17
arch_stack_trace(); \
18
arch_interrupts_disable(); \
19
for(;;); \
20
}\
21
22
#endif
/* ! _CORE_PANIC_H */
arch.h
system.h
printk.h
kernel
include
core
panic.h
Generated by
1.18.0