-#define BT_ASSERT_PRE(_cond, _fmt, ...) \
- _BT_ASSERT_COND("pre", _cond, _fmt, ##__VA_ARGS__)
+#define BT_ASSERT_PRE_FROM_FUNC(_func, _id_suffix, _cond, _fmt, ...) \
+ _BT_ASSERT_COND("pre", _func, _id_suffix, (_cond), _fmt, ##__VA_ARGS__)
+
+/*
+ * Like BT_ASSERT_PRE_FROM_FUNC(), but uses `__func__` (current function
+ * name) as the `_func` parameter.
+ */
+#define BT_ASSERT_PRE(_id_suffix, _cond, _fmt, ...) \
+ BT_ASSERT_PRE_FROM_FUNC(__func__, _id_suffix, (_cond), _fmt, ##__VA_ARGS__)