aboutsummaryrefslogtreecommitdiff
path: root/kapi/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-07-24 15:31:31 +0000
committerFelix Morgner <felix.morgner@ost.ch>2025-07-24 15:31:31 +0000
commit4edbe94ce1266c9acc6a695fedf1d2edd4ce11cd (patch)
tree6738e5ab071075c15beccc59b3f79f53477f477d /kapi/include
parent2b8fafa2bddc48ddec047de517115c8e65ee61e8 (diff)
downloadteachos-4edbe94ce1266c9acc6a695fedf1d2edd4ce11cd.tar.xz
teachos-4edbe94ce1266c9acc6a695fedf1d2edd4ce11cd.zip
build: factor out kernel API
Diffstat (limited to 'kapi/include')
-rw-r--r--kapi/include/kapi/io.hpp17
-rw-r--r--kapi/include/kapi/memory.hpp9
-rw-r--r--kapi/include/kapi/system.hpp14
3 files changed, 40 insertions, 0 deletions
diff --git a/kapi/include/kapi/io.hpp b/kapi/include/kapi/io.hpp
new file mode 100644
index 0000000..764738f
--- /dev/null
+++ b/kapi/include/kapi/io.hpp
@@ -0,0 +1,17 @@
+#ifndef TEACHOS_KAPI_IO_HPP
+#define TEACHOS_KAPI_IO_HPP
+
+#include <string_view>
+
+namespace teachos::io
+{
+ auto init() -> void;
+
+ auto print(std::string_view text) -> void;
+ auto println(std::string_view text) -> void;
+
+ auto print_error(std::string_view text) -> void;
+ auto println_error(std::string_view text) -> void;
+} // namespace teachos::io
+
+#endif
diff --git a/kapi/include/kapi/memory.hpp b/kapi/include/kapi/memory.hpp
new file mode 100644
index 0000000..842a2fa
--- /dev/null
+++ b/kapi/include/kapi/memory.hpp
@@ -0,0 +1,9 @@
+#ifndef TEACHOS_KAPI_MEMORY_HPP
+#define TEACHOS_KAPI_MEMORY_HPP
+
+namespace teachos::memory
+{
+ auto init() -> void;
+}
+
+#endif
diff --git a/kapi/include/kapi/system.hpp b/kapi/include/kapi/system.hpp
new file mode 100644
index 0000000..0d4f2c9
--- /dev/null
+++ b/kapi/include/kapi/system.hpp
@@ -0,0 +1,14 @@
+#ifndef TEACHOS_KAPI_SYSTEM_HPP
+#define TEACHOS_KAPI_SYSTEM_HPP
+
+#include <source_location>
+#include <string_view>
+
+namespace teachos::system
+{
+ [[noreturn]] auto halt() -> void;
+
+ [[noreturn]] auto panic(std::string_view message, std::source_location = std::source_location::current()) -> void;
+} // namespace teachos::system
+
+#endif