there is no portable way to do this, so we have to fake it by trying to lock
the mutex and assert that it fails. This can be very expensive, so we only
do it when built with --enable-diagnostics.
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2416
d4fa192b-c00b-0410-8231-
f00ffab90ce4
} while (0);
#endif
+#ifdef DIAGNOSTICS
+#define ALOCKED(foo) AN(pthread_mutex_trylock(foo))
+#else
+#define ALOCKED(foo) (void)(foo)
+#endif
+
/*
* A normal pointer difference is signed, but we never want a negative value
* so this little tool will make sure we don't get that.