Skip to content

Commit

Permalink
Add g_topology_locked() macro that returns true if we already hold th…
Browse files Browse the repository at this point in the history
…e GEOM

topology lock.
  • Loading branch information
pjd authored and pjd committed Apr 25, 2020
1 parent 9c5723d commit c41a141
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys/geom/geom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down

0 comments on commit c41a141

Please sign in to comment.