tape-kernel 1.0
a modular modern independent kernel
Loading...
Searching...
No Matches
err.c File Reference
#include "err.h"
#include "types.h"
Include dependency graph for err.c:

Go to the source code of this file.

Functions

void __panic (const char *txt)
 panic halts the system with a kernel panic message

Function Documentation

◆ __panic()

void __panic ( const char * txt)

panic halts the system with a kernel panic message

panic is a function that clears the screen to red, displays a kernel panic banner with the provided message, and halts forever

Parameters
txt,theerror message to display

when panic is called the system becomes unrecoverable, it will always halt, so use it only for fatal unrecoverable errors

using panic is done with

#include "../lib/err.h" //or just err.h
panic("something went wrong");
#define panic
Definition err.h:5
See also
assert()

Definition at line 25 of file err.c.

References NORETURN, and vga.