diff options
author | Marvin Borner | 2020-08-09 16:51:01 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-09 16:51:01 +0200 |
commit | 162d024a53e1e31e00ff0b6f47dd4590edebc551 (patch) | |
tree | 711d3886c300dfaddffdafaa89b690b45eb2101d /lib/inc/assert.h | |
parent | 79f2fa136f26a0b87917336e089485712ee49bd6 (diff) |
Heavy restructuring of libc, kernel and apps
Diffstat (limited to 'lib/inc/assert.h')
-rw-r--r-- | lib/inc/assert.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/inc/assert.h b/lib/inc/assert.h new file mode 100644 index 0000000..2cb095b --- /dev/null +++ b/lib/inc/assert.h @@ -0,0 +1,11 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#ifndef ASSERT_H +#define ASSERT_H + +#include <print.h> + +#define assert(exp) \ + (exp) ? 0 : printf("%s:%d: %s: Assertion '%s' failed\n", __FILE__, __LINE__, __func__, #exp) + +#endif |