Author: pjd
Date: Sat Apr 25 21:41:09 2020
New Revision: 360323
URL: https://svnweb.freebsd.org/changeset/base/360323

Log:
  Add g_topology_locked() macro that returns true if we already hold the GEOM
  topology lock.

Modified:
  head/sys/geom/geom.h

Modified: head/sys/geom/geom.h
==============================================================================
--- head/sys/geom/geom.h        Sat Apr 25 20:24:41 2020        (r360322)
+++ head/sys/geom/geom.h        Sat Apr 25 21:41:09 2020        (r360323)
@@ -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);          \
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to