]> granicus.if.org Git - libatomic_ops/commit
Use dedicated no_sanitize_thread load/store instead of copy_before_cas
authorIvan Maidanski <ivmai@mail.ru>
Thu, 21 Dec 2017 07:49:27 +0000 (10:49 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 21 Dec 2017 07:49:27 +0000 (10:49 +0300)
commit441415c8cb93549f9efe0812ad716485d2f50879
tree53d7aaaa8bdff5ee26b2590c26923ed4091189e4
parent3aefd4e732f2894c31ee74315c3d65644a1f4ac1
Use dedicated no_sanitize_thread load/store instead of copy_before_cas
(fix commits 6ffda1db110b0dcc)

This is also a workaround for a TSan false positive reported
in AO_stack_pop_acquire.

* src/atomic_ops_stack.c (AO_copy_before_cas): Remove.
* src/atomic_ops_stack.c (store_before_cas): New static function (or
defined as a macro).
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (load_before_cas):
Likewiese.
* src/atomic_ops_stack.c (AO_stack_push_explicit_aux_release,
AO_stack_push_release): Use store_before_cas instead of
AO_copy_before_cas.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (load_before_cas):
Add volatile to addr argument if Clang.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (AO_stack_pop_acquire):
Use load_before_cas instead of AO_copy_before_cas.
src/atomic_ops_stack.c