Fix malloc_mutex_assert_[not_]owner() for --enable-lazy-lock case.
diff --git a/include/jemalloc/internal/mutex.h b/include/jemalloc/internal/mutex.h
index 581aaf5..5ddae11 100644
--- a/include/jemalloc/internal/mutex.h
+++ b/include/jemalloc/internal/mutex.h
@@ -124,7 +124,7 @@
malloc_mutex_assert_owner(tsd_t *tsd, malloc_mutex_t *mutex)
{
- if (config_debug)
+ if (isthreaded && config_debug)
witness_assert_owner(tsd, &mutex->witness);
}
@@ -132,7 +132,7 @@
malloc_mutex_assert_not_owner(tsd_t *tsd, malloc_mutex_t *mutex)
{
- if (config_debug)
+ if (isthreaded && config_debug)
witness_assert_not_owner(tsd, &mutex->witness);
}
#endif