diff options
author | pjd <pjd@FreeBSD.org> | 2004-02-10 15:53:28 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-02-10 15:53:28 +0000 |
commit | e8bed31902fd788ed5dc9d062a3f86a36c81566b (patch) | |
tree | f2cdaa792d7f21428eb211aa7ecb164a45043bda /sys/geom/geom.h | |
parent | 861b899f5cd996e41d39de68eaff0821680b801c (diff) | |
download | FreeBSD-src-e8bed31902fd788ed5dc9d062a3f86a36c81566b.zip FreeBSD-src-e8bed31902fd788ed5dc9d062a3f86a36c81566b.tar.gz |
Added macro which will be used to assert, that the topology lock is not held.
Approved by: phk, scottl (mentor)
Diffstat (limited to 'sys/geom/geom.h')
-rw-r--r-- | sys/geom/geom.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 0420eea..656f320 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -281,6 +281,12 @@ extern struct sx topology_lock; sx_assert(&topology_lock, SX_XLOCKED); \ } while (0) +#define g_topology_assert_not() \ + do { \ + g_sanity(NULL); \ + sx_assert(&topology_lock, SX_UNLOCKED); \ + } while (0) + #define DECLARE_GEOM_CLASS(class, name) \ static moduledata_t name##_mod = { \ #name, g_modevent, &class \ |