diff options
-rw-r--r-- | src/pOS/arch/x86/libc/assert.cpp | 7 | ||||
-rw-r--r-- | src/pOS/include/libc/assert.h | 6 |
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 |