summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dbwrap/dbwrap_private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dbwrap/dbwrap_private.h b/lib/dbwrap/dbwrap_private.h
index e1316543212..a6bad04971b 100644
--- a/lib/dbwrap/dbwrap_private.h
+++ b/lib/dbwrap/dbwrap_private.h
@@ -72,5 +72,9 @@ struct db_context {
#define DBWRAP_LOCK_ORDER_MIN DBWRAP_LOCK_ORDER_1
#define DBWRAP_LOCK_ORDER_MAX DBWRAP_LOCK_ORDER_3
+#define DBWRAP_LOCK_ORDER_VALID(order) \
+ (((order) >= DBWRAP_LOCK_ORDER_MIN) && \
+ ((order) <= DBWRAP_LOCK_ORDER_MAX))
+
#endif /* __DBWRAP_PRIVATE_H__ */