2021-02-14 08:01:52 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-02-14 08:01:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-05-02 23:39:47 +00:00
|
|
|
#include <AK/Format.h>
|
|
|
|
|
2021-02-14 08:01:52 +00:00
|
|
|
namespace Kernel {
|
|
|
|
|
2022-04-01 17:58:27 +00:00
|
|
|
[[noreturn]] void __panic(char const* file, unsigned int line, char const* function);
|
2021-02-14 08:01:52 +00:00
|
|
|
|
|
|
|
#define PANIC(...) \
|
|
|
|
do { \
|
2021-04-16 19:58:51 +00:00
|
|
|
critical_dmesgln("KERNEL PANIC! :^("); \
|
|
|
|
critical_dmesgln(__VA_ARGS__); \
|
2021-02-14 08:01:52 +00:00
|
|
|
__panic(__FILE__, __LINE__, __PRETTY_FUNCTION__); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
}
|