summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/witness.h
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-10-31 22:28:22 (GMT)
committerJason Evans <jasone@canonware.com>2016-10-31 22:28:22 (GMT)
commit90b60eeae4f557fae99158f9899bd7b01a9ac662 (patch)
treec313d1b5ee36337e4e20ac45e4bac1d6498e8107 /include/jemalloc/internal/witness.h
parent6a834d94bb863d1abd0175a07e98f4b9797fa435 (diff)
downloadjemalloc-90b60eeae4f557fae99158f9899bd7b01a9ac662.zip
jemalloc-90b60eeae4f557fae99158f9899bd7b01a9ac662.tar.gz
jemalloc-90b60eeae4f557fae99158f9899bd7b01a9ac662.tar.bz2
Add an assertion in witness_owner().
Diffstat (limited to 'include/jemalloc/internal/witness.h')
-rw-r--r--include/jemalloc/internal/witness.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/jemalloc/internal/witness.h b/include/jemalloc/internal/witness.h
index 3bc5ebe..26024ac 100644
--- a/include/jemalloc/internal/witness.h
+++ b/include/jemalloc/internal/witness.h
@@ -121,12 +121,15 @@ void witness_unlock(tsdn_t *tsdn, witness_t *witness);
#endif
#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_MUTEX_C_))
+/* Helper, not intended for direct use. */
JEMALLOC_INLINE bool
witness_owner(tsd_t *tsd, const witness_t *witness)
{
witness_list_t *witnesses;
witness_t *w;
+ cassert(config_debug);
+
witnesses = tsd_witnessesp_get(tsd);
ql_foreach(w, witnesses, link) {
if (w == witness)