[libcxx] r301132 - Add missing acquire_load to call_once overload.
Justin Lebar via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 23 09:58:48 PDT 2017
Author: jlebar
Date: Sun Apr 23 11:58:48 2017
New Revision: 301132
URL: http://llvm.org/viewvc/llvm-project?rev=301132&view=rev
Log:
Add missing acquire_load to call_once overload.
Summary: Seemed to have been overlooked in D24028.
This bug was found and brought to my attention by Paul Wankadia.
Reviewers: kubamracek, EricWF, dvyukov
Differential Revision: https://reviews.llvm.org/D32402
Modified:
libcxx/trunk/include/mutex
Modified: libcxx/trunk/include/mutex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/mutex?rev=301132&r1=301131&r2=301132&view=diff
==============================================================================
--- libcxx/trunk/include/mutex (original)
+++ libcxx/trunk/include/mutex Sun Apr 23 11:58:48 2017
@@ -685,7 +685,7 @@ inline _LIBCPP_INLINE_VISIBILITY
void
call_once(once_flag& __flag, const _Callable& __func)
{
- if (__flag.__state_ != ~0ul)
+ if (__libcpp_acquire_load(&__flag.__state_) != ~0ul)
{
__call_once_param<const _Callable> __p(__func);
__call_once(__flag.__state_, &__p, &__call_once_proxy<const _Callable>);
More information about the cfe-commits
mailing list