5export module zxfoundation.sys.syschk.core;
6import zxfoundation.sys.syschk.types;
7import arch.s390x.init.zxfl.protocol;
14namespace zxfoundation::sys::syschk {
18 auto init(
const arch::s390x::init::zxfl::protocol& proto)
noexcept ->
void;
31 lib::kernel_error err,
34 std::source_location location
45 template <
typename... Args>
46 [[noreturn]]
auto syschk_fatal(
47 lib::kernel_error err,
51 char buf[ZX_CRASH_MSG_LEN];
52 lib::format::format_to(std::span(buf, ZX_CRASH_MSG_LEN), fl.fmt, args...);
53 system_check(err, syschk_severity::fatal, std::string_view(buf), fl.loc);
54 __builtin_unreachable();
62 template <
typename... Args>
63 [[noreturn]]
auto syschk_critical(
64 lib::kernel_error err,
68 char buf[ZX_CRASH_MSG_LEN];
69 lib::format::format_to(std::span<
char>(buf, ZX_CRASH_MSG_LEN), fl.fmt, args...);
70 system_check(err, syschk_severity::critical, std::string_view(buf), fl.loc);
71 __builtin_unreachable();
79 template <
typename... Args>
81 lib::kernel_error err,
85 char buf[ZX_CRASH_MSG_LEN];
86 lib::format::format_to(std::span<
char>(buf, ZX_CRASH_MSG_LEN), fl.fmt, args...);
87 system_check(err, syschk_severity::warning, std::string_view(buf), fl.loc);
95 template <
typename... Args>
97 lib::kernel_error err,
101 char buf[ZX_CRASH_MSG_LEN];
102 lib::format::format_to(std::span<
char>(buf, ZX_CRASH_MSG_LEN), fl.fmt, args...);
103 system_check(err, syschk_severity::notice, std::string_view(buf), fl.loc);