aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/kapi/system.cpp
blob: 228c03fcdcbc28fb573490dccc229ca8da6e839c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "kapi/system.hpp"

#include "kapi/cio.hpp"
#include "kapi/cpu.hpp"

#include <source_location>
#include <string_view>

namespace teachos::system
{

  [[gnu::weak]]
  auto panic(std::string_view message, std::source_location location) -> void
  {
    cio::println_error("!!!Kernel Panic!!! ");
    cio::println_error(message);
    cio::println_error(location.file_name());
    cio::println_error(location.function_name());

    cpu::halt();
  }

}  // namespace teachos::system