summaryrefslogtreecommitdiffhomepage
path: root/dev/libSystem/src/VerifyCalls.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-10-08 21:50:05 +0200
committerGitHub <noreply@github.com>2025-10-08 21:50:05 +0200
commit4afdeade47b4295e49b9d65ae26fa218e2fd81dd (patch)
tree769db6f20bbaa86b0f886d409251e3a33cbc4b02 /dev/libSystem/src/VerifyCalls.cc
parent3b6a7e8c87f94391f92b55f20b9ba3e560ef280e (diff)
feat: libSystem: new version of libSystem.
Diffstat (limited to 'dev/libSystem/src/VerifyCalls.cc')
-rw-r--r--dev/libSystem/src/VerifyCalls.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/dev/libSystem/src/VerifyCalls.cc b/dev/libSystem/src/VerifyCalls.cc
new file mode 100644
index 00000000..fb38c682
--- /dev/null
+++ b/dev/libSystem/src/VerifyCalls.cc
@@ -0,0 +1,17 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <libSystem/SystemKit/Err.h>
+#include <libSystem/SystemKit/Verify.h>
+
+using namespace LibSystem;
+
+IMPORT_C Void _rtl_assert(Bool expr, const Char* origin) {
+ if (!expr) {
+ PrintOut(nullptr, "Assertion failed: %s\r", origin);
+ libsys_syscall_arg_1(SYSCALL_HASH("_rtl_debug_break"));
+ }
+} \ No newline at end of file