diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/abort.cpp | 3 | ||||
| -rw-r--r-- | src/kstd.cpp | 13 | ||||
| -rw-r--r-- | src/main.cpp | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/src/abort.cpp b/src/abort.cpp new file mode 100644 index 0000000..6b0070e --- /dev/null +++ b/src/abort.cpp @@ -0,0 +1,3 @@ +#include "kapi/system.hpp" + +extern "C" [[noreturn]] auto abort() -> void { teachos::system::panic("Abort called"); } diff --git a/src/kstd.cpp b/src/kstd.cpp new file mode 100644 index 0000000..2149c12 --- /dev/null +++ b/src/kstd.cpp @@ -0,0 +1,13 @@ +#include "kapi/system.hpp" + +#include <kstd/bits/os.hpp> + +namespace kstd::os +{ + + auto panic(std::string_view message, std::source_location location) -> void + { + teachos::system::panic(message, location); + } + +} // namespace kstd::os
\ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..d6199d0 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,13 @@ +#include "kapi/io.hpp" +#include "kapi/memory.hpp" +#include "kapi/system.hpp" + +auto main() -> int +{ + teachos::io::init(); + teachos::io::println("[OS] IO subsystem initialized."); + + teachos::memory::init(); + + teachos::system::panic("Architecture specific main returned!"); +} |
