mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-20 01:11:15 +03:00
Assert the mutex is locked within malloc_mutex_assert_owner().
This commit is contained in:
parent
44db479fad
commit
6cc42173cb
1 changed files with 3 additions and 0 deletions
|
|
@ -250,6 +250,9 @@ malloc_mutex_unlock(tsdn_t *tsdn, malloc_mutex_t *mutex) {
|
|||
static inline void
|
||||
malloc_mutex_assert_owner(tsdn_t *tsdn, malloc_mutex_t *mutex) {
|
||||
witness_assert_owner(tsdn_witness_tsdp_get(tsdn), &mutex->witness);
|
||||
if (isthreaded) {
|
||||
assert(malloc_mutex_is_locked(mutex));
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue