aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/exception_handling
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2024-10-20 12:18:06 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2024-10-20 12:18:06 +0000
commita706f9732ed9a91854f6245980cdbbca0d220835 (patch)
tree25cf94120a62033cb907e2d16500acecec38b6bd /arch/x86_64/src/exception_handling
parentaa0634589cb7d51f57e3e555bb15ebca99bc162e (diff)
parent2129bdb22bab7dc5a9d23a31c23f38e847511a46 (diff)
downloadteachos-a706f9732ed9a91854f6245980cdbbca0d220835.tar.xz
teachos-a706f9732ed9a91854f6245980cdbbca0d220835.zip
Merge branch 'feat_memory_manager' of ssh://gitlab.ost.ch:45022/teachos/kernel into feat_memory_manager
Diffstat (limited to 'arch/x86_64/src/exception_handling')
-rw-r--r--arch/x86_64/src/exception_handling/abort.cpp1
-rw-r--r--arch/x86_64/src/exception_handling/assert.cpp13
2 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86_64/src/exception_handling/abort.cpp b/arch/x86_64/src/exception_handling/abort.cpp
index 77576b1..e331d34 100644
--- a/arch/x86_64/src/exception_handling/abort.cpp
+++ b/arch/x86_64/src/exception_handling/abort.cpp
@@ -12,5 +12,4 @@ namespace teachos::arch::exception_handling
* currently implement, @p ::abort gets overridden to simply panic.
*/
extern "C" auto abort() -> void { panic("Terminate was called, possibly due to an unhandled exception"); }
-
} // namespace teachos::arch::exception_handling
diff --git a/arch/x86_64/src/exception_handling/assert.cpp b/arch/x86_64/src/exception_handling/assert.cpp
new file mode 100644
index 0000000..b36f52d
--- /dev/null
+++ b/arch/x86_64/src/exception_handling/assert.cpp
@@ -0,0 +1,13 @@
+#include "arch/exception_handling/assert.hpp"
+
+namespace teachos::arch::exception_handling
+{
+ auto assert(bool condition, char const * message) -> void
+ {
+ if (condition)
+ {
+ return;
+ }
+ panic("Assertion Violation: ", message);
+ }
+} // namespace teachos::arch::exception_handling