Xyris  0.5
Panic.hpp File Reference
#include <Arch/Arch.hpp>
+ Include dependency graph for Panic.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void panic (const char *msg)
 
void panicf (const char *fmt,...)
 
void panic (struct registers *registers)
 

Detailed Description

Kernel panic management.

Author
Keeton Feavel (keeto.nosp@m.n@xy.nosp@m.r.is)
Version
0.1
Date
2021-11-05

Definition in file Panic.hpp.

Function Documentation

◆ panic() [1/2]

void panic ( const char *  msg)

Halt the system and print the provided message on the panic screen.

Parameters
msgPanic message

Definition at line 82 of file Panic.cpp.

83 {
84  panicInternal(msg, NULL);
85 }
+ Here is the caller graph for this function:

◆ panic() [2/2]

void panic ( struct registers registers)

Halt the system and print information about the provided register dump.

Parameters
registersArchitecture register structure

Definition at line 98 of file Panic.cpp.

99 {
100  panicInternal(PANIC_REG_DUMP_MSG, registers);
101 }

◆ panicf()

void panicf ( const char *  fmt,
  ... 
)

Halt the system and print the provided message and arguments on the panic screen.

Parameters
fmtprintf style format panic message
...arguments

Definition at line 87 of file Panic.cpp.

88 {
89  va_list args;
90  char buf[PANIC_MSG_BUF_SZ];
91  va_start(args, fmt);
92  kvsprintf(buf, fmt, args);
93  va_end(args);
94 
95  panic(buf);
96 }
+ Here is the call graph for this function:
kvsprintf
int kvsprintf(char *buf, const char *fmt, va_list args)
Sends formatted output to a string using an argument list.
Definition: printf.cpp:333
registers
A structure definining values for all x86 registers. Cannot be namespaced due to C linkage and ASM in...
Definition: regs.hpp:19
panic
void panic(const char *msg)
Halt the system and print the provided message on the panic screen.
Definition: Panic.cpp:82
PANIC_REG_DUMP_MSG
#define PANIC_REG_DUMP_MSG
Definition: Panic.cpp:28
PANIC_MSG_BUF_SZ
#define PANIC_MSG_BUF_SZ
Definition: Panic.cpp:23