LumaOS  v0.1.116
An experimental x86-64 OS
Loading...
Searching...
No Matches
panic.h File Reference

Handler for kernel panics. More...

#include <kernel/vars.h>
#include <lib/kstring.h>
#include <kernel/kprintf.h>
Include dependency graph for panic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PANIC(...)
 Calls panic and automatically fills in the parameters.

Functions

 __attribute__ ((noreturn)) void panic_at(const char *file
 Prints information about a kernel panic.

Variables

int line_int
int const char * func

Detailed Description

Handler for kernel panics.

Author
Matheus Boscariol
Since
02/11/2026

Definition in file panic.h.

Macro Definition Documentation

◆ PANIC

#define PANIC ( ...)
Value:
panic_at(__FILE__, __LINE__, __func__, __VA_ARGS__)

Calls panic and automatically fills in the parameters.

Definition at line 17 of file panic.h.

Function Documentation

◆ __attribute__()

__attribute__ ( (noreturn) ) const

Prints information about a kernel panic.

Parameters
fileThe file name that caused the panic (FILLED IN AUTOMATICALLY)
line_intThe line number in the file that caused the panic (FILLED IN AUTOMATICALLY)
funcThe function name that caused the panic (FILLED IN AUTOMATICALLY)
...The extra parameters passed in by the panic (description as a format string, as well as the arguments for that)

Variable Documentation

◆ func

int const char* func

Definition at line 26 of file panic.h.

◆ line_int

int line_int

Definition at line 26 of file panic.h.