about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2020-06-24 20:29:38 +0200
committerYour Name <you@example.com>2020-06-24 20:29:38 +0200
commitc2d8c85da6a4b852349c56ee9f3f157baff02e40 (patch)
tree190b43febbf6372b1d11cca0bc26bc2aff582550
parentShell: added some basic commands (diff)
downloadpOS-c2d8c85da6a4b852349c56ee9f3f157baff02e40.tar.gz
pOS-c2d8c85da6a4b852349c56ee9f3f157baff02e40.tar.bz2
pOS-c2d8c85da6a4b852349c56ee9f3f157baff02e40.zip
stdlib: changed assert from inline to a normal function
-rw-r--r--src/pOS/arch/x86/libc/assert.cpp7
-rw-r--r--src/pOS/include/libc/assert.h6
2 files changed, 8 insertions, 5 deletions
diff --git a/src/pOS/arch/x86/libc/assert.cpp b/src/pOS/arch/x86/libc/assert.cpp
new file mode 100644
index 0000000..851a714
--- /dev/null
+++ b/src/pOS/arch/x86/libc/assert.cpp
@@ -0,0 +1,7 @@
+#include <assert.h>
+
+void _assert(const char* expr, const char* file, int line)
+{
+    printf("Assertion failed! (%s) - %s:%d\n", expr, file ,line);
+    /* TODO: Implement exit */
+}
diff --git a/src/pOS/include/libc/assert.h b/src/pOS/include/libc/assert.h
index 3eae3c5..d491204 100644
--- a/src/pOS/include/libc/assert.h
+++ b/src/pOS/include/libc/assert.h
@@ -5,10 +5,6 @@
 
 #define ASSERT(EXPR) (void)((EXPR) || (_assert (#EXPR, __FILE__, __LINE__),0))
 
-static inline void _assert(const char* expr, const char* file, int line)
-{
-    printf("Assertion failed! (%s) - %s:%d\n", expr, file ,line);
-    /* TODO: Implement exit */
-}
+extern "C" void _assert (const char *msg, const char *file, int line);
 
 #endif