]> granicus.if.org Git - libatomic_ops/commit
Workaround TSan false positive in AO_stack_pop_explicit_aux_acquire
authorIvan Maidanski <ivmai@mail.ru>
Wed, 20 Dec 2017 23:25:48 +0000 (02:25 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 20 Dec 2017 23:25:48 +0000 (02:25 +0300)
commit3aefd4e732f2894c31ee74315c3d65644a1f4ac1
treeb55769b5629ae8d29e868f16d71b34f156ac471d
parentca02cd7b1434107ca470f62cb046d1595d5a2a84
Workaround TSan false positive in AO_stack_pop_explicit_aux_acquire
(fix commits c058d9d6ffda1db)

The TSan-related workaround in AO_malloc is no longer needed.

* src/atomic_ops_malloc.c [AO_THREAD_SANITIZER
&& AO_USE_ALMOST_LOCK_FREE] (AO_malloc): Do not use AO_store (always
use *result=log_sz); remove comment.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE
&& AO_THREAD_SANITIZER] (AO_load_next): New static function (with
AO_ATTR_NO_SANITIZE_THREAD attribute); add comments.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE
&& !AO_THREAD_SANITIZER] (AO_load_next): Define to AO_load.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Replace AO_load(first_ptr) with
AO_load_next(first_ptr).
src/atomic_ops_malloc.c
src/atomic_ops_stack.c