aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/include
diff options
context:
space:
mode:
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