serenity/Kernel/EFIPrekernel/Panic.h
2024-12-01 13:20:45 +01:00

24 lines
669 B
C++

/*
* Copyright (c) 2024, Sönke Holz <sholz8530@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Format.h>
#include <Kernel/EFIPrekernel/DebugOutput.h>
namespace Kernel {
[[noreturn]] void __panic(char const* file, unsigned int line, char const* function);
#define PANIC(...) \
do { \
::Kernel::ucs2_dbgln(u"PREKERNEL PANIC! :^("); \
dbgln(__VA_ARGS__); \
::Kernel::__panic(__FILE__, __LINE__, __PRETTY_FUNCTION__); \
} while (0)
}