summaryrefslogtreecommitdiff
path: root/kernel/log.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-05-24 14:38:36 +0200
committerClifford Wolf <clifford@clifford.at>2013-05-24 14:38:36 +0200
commited0e2f7a6fe721175b80f6397c9abd5c0080033f (patch)
treea5a367e973094bdfa7398103824346163ad43e82 /kernel/log.h
parentccd2a93439098e333a2f41ae6d1ce3d92222f167 (diff)
Added log_assert() api
Diffstat (limited to 'kernel/log.h')
-rw-r--r--kernel/log.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/log.h b/kernel/log.h
index 6d190034..a1b129aa 100644
--- a/kernel/log.h
+++ b/kernel/log.h
@@ -49,5 +49,6 @@ void log_flush();
const char *log_signal(const RTLIL::SigSpec &sig, bool autoint = true);
#define log_abort() log_error("Abort in %s:%d.\n", __FILE__, __LINE__)
+#define log_assert(_assert_expr_) do { if (_assert_expr_) break; log_error("Assert `%s' failed in %s:%d.\n", #_assert_expr_, __FILE__, __LINE__); } while (0)
#endif