Add g_topology_locked() macro that returns true if we already hold the GEOM

topology lock.
This commit is contained in:
Pawel Jakub Dawidek 2020-04-25 21:41:09 +00:00
parent 61fbd61b59
commit cefbc0d19b

View File

@ -395,6 +395,8 @@ g_free(void *ptr)
sx_xunlock(&topology_lock); \
} while (0)
#define g_topology_locked() sx_xlocked(&topology_lock)
#define g_topology_assert() \
do { \
sx_assert(&topology_lock, SX_XLOCKED); \