diff options
author | guangli-dai <gdai@fb.com> | 2023-01-18 15:43:43 -0800 |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2023-04-06 10:57:04 -0700 |
commit | 5f64ad60cdd2359249c863c2a01f8555672d7c35 (patch) | |
tree | 0736bef70c14767f94e371bdd1c04c721c68efac | |
parent | 434a68e221f7dbb6f30bd13d318d0c22e1b47e78 (diff) | |
download | jemalloc-5f64ad60cdd2359249c863c2a01f8555672d7c35.tar.gz |
Remove locked flag set in malloc_mutex_trylock
As a hint flag of the lock, parameter locked should be set only
when the lock is gained or freed.
-rw-r--r-- | include/jemalloc/internal/mutex.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/jemalloc/internal/mutex.h b/include/jemalloc/internal/mutex.h index 63a0b1b3..03d3557b 100644 --- a/include/jemalloc/internal/mutex.h +++ b/include/jemalloc/internal/mutex.h @@ -175,7 +175,6 @@ malloc_mutex_trylock(tsdn_t *tsdn, malloc_mutex_t *mutex) { witness_assert_not_owner(tsdn_witness_tsdp_get(tsdn), &mutex->witness); if (isthreaded) { if (malloc_mutex_trylock_final(mutex)) { - atomic_store_b(&mutex->locked, true, ATOMIC_RELAXED); return true; } mutex_owner_stats_update(tsdn, mutex); |