Xyris  0.5
Panic.hpp
Go to the documentation of this file.
1 /**
2  * @file Panic.hpp
3  * @author Keeton Feavel ([email protected])
4  * @brief Kernel panic management
5  * @version 0.1
6  * @date 2021-11-05
7  *
8  * @copyright Copyright the Xyris Contributors (c) 2021
9  *
10  */
11 #pragma once
12 
13 #include <Arch/Arch.hpp>
14 
15 /**
16  * @brief Halt the system and print the provided message on the panic screen.
17  *
18  * @param msg Panic message
19  */
20 [[noreturn]] void panic(const char* msg);
21 
22 /**
23  * @brief Halt the system and print the provided message and arguments on the panic screen.
24  *
25  * @param fmt printf style format panic message
26  * @param ... arguments
27  */
28 [[gnu::format(printf, 1, 2)]]
29 [[noreturn]] void panicf(const char* fmt, ...);
30 
31 /**
32  * @brief Halt the system and print information about the provided register dump.
33  *
34  * @param registers Architecture register structure
35  */
36 [[noreturn]] void panic(struct registers *registers);
panic
void panic(const char *msg)
Halt the system and print the provided message on the panic screen.
Definition: Panic.cpp:82
registers
A structure definining values for all x86 registers. Cannot be namespaced due to C linkage and ASM in...
Definition: regs.hpp:19
Arch.hpp
Architecture control and initialization.
Console::printf
int printf(const char *fmt,...)
Definition: console.cpp:273
panicf
void panicf(const char *fmt,...)
Halt the system and print the provided message and arguments on the panic screen.
Definition: Panic.cpp:87