diff options
author | Your Name <you@example.com> | 2020-06-24 20:29:38 +0200 |
---|---|---|
committer | Your Name <you@example.com> | 2020-06-24 20:29:38 +0200 |
commit | c2d8c85da6a4b852349c56ee9f3f157baff02e40 (patch) | |
tree | 190b43febbf6372b1d11cca0bc26bc2aff582550 | |
parent | Shell: added some basic commands (diff) | |
download | pOS-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.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 |