aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-10-29 10:39:30 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-10-29 10:39:30 +0100
commitacabbacdee68ad80e829bda56ae5363d04646d2d (patch)
treefaca32b951c286330ebb40205bb908fb2d51be54 /libs/kstd/include
parent27a00c67d0110ddaebb4035e68860e00e32a3b8f (diff)
downloadteachos-acabbacdee68ad80e829bda56ae5363d04646d2d.tar.xz
teachos-acabbacdee68ad80e829bda56ae5363d04646d2d.zip
kstd: clean up libc implementation
Diffstat (limited to 'libs/kstd/include')
-rw-r--r--libs/kstd/include/kstd/bits/os.hpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/libs/kstd/include/kstd/bits/os.hpp b/libs/kstd/include/kstd/bits/os.hpp
index 7f5fcc8..0474f16 100644
--- a/libs/kstd/include/kstd/bits/os.hpp
+++ b/libs/kstd/include/kstd/bits/os.hpp
@@ -6,10 +6,29 @@
namespace kstd::os
{
- auto abort() -> bool;
+ /**
+ * @brief Handle an unrecoverable library error.
+ *
+ * The operating system kernel may choose to implement this function in order to try to perform additional cleanup
+ * before terminating execution. If the kernel does not implement this function, the default implementation will be
+ * chosen. This default implementation doest nothing.
+ */
+ [[noreturn]]
+ auto abort() -> void;
+ /**
+ * @brief Terminate execution of the operating system.
+ *
+ * The operating system must implement this function. This function must terminate the execution of the operating
+ * system kernel as is. It may choose to restart the kernel or to halt execution entirely. The implementation must
+ * guarantee that execution never return from this function.
+ *
+ * @param message A message describing the reason for termination of execution.
+ * @param where The source code location at which the panic was triggered. In general, no argument shall be provided
+ * for this parameter, thus implicitly capturing the location at which the call originates.
+ */
[[noreturn]]
- auto panic(std::string_view message, std::source_location = std::source_location::current()) -> void;
-}
+ auto panic(std::string_view message, std::source_location where = std::source_location::current()) -> void;
+} // namespace kstd::os
#endif \ No newline at end of file