Add data structure benchmarks
[c11concurrency-benchmarks.git] / cdschecker_modified_benchmarks / include / model-assert.h
diff --git a/cdschecker_modified_benchmarks/include/model-assert.h b/cdschecker_modified_benchmarks/include/model-assert.h
new file mode 100755 (executable)
index 0000000..5cba524
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef __MODEL_ASSERT_H__
+#define __MODEL_ASSERT_H__
+
+#if __cplusplus
+extern "C" {
+#else
+#include <stdbool.h>
+#endif
+
+#include <cassert>
+
+static void model_assert(bool expr, const char *file, int line) {
+  assert(expr && file && line);
+}
+#define MODEL_ASSERT(expr) model_assert((expr), __FILE__, __LINE__)
+
+#if __cplusplus
+}
+#endif
+
+#endif /* __MODEL_ASSERT_H__ */