aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/src/cstdlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/kstd/src/cstdlib.cpp')
-rw-r--r--libs/kstd/src/cstdlib.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/kstd/src/cstdlib.cpp b/libs/kstd/src/cstdlib.cpp
new file mode 100644
index 0000000..8fb5f63
--- /dev/null
+++ b/libs/kstd/src/cstdlib.cpp
@@ -0,0 +1,18 @@
+#include "kstd/bits/os.hpp"
+
+namespace kstd
+{
+
+ extern "C"
+ {
+ [[noreturn]] auto abort() -> void
+ {
+ if (!kstd::os::abort())
+ {
+ os::panic("System abort handler returned.");
+ }
+ __builtin_trap();
+ }
+ }
+
+} // namespace kstd \ No newline at end of file