summaryrefslogtreecommitdiffstats
path: root/libcxx/include/mutex
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2017-04-23 16:58:48 +0000
committerJustin Lebar <jlebar@google.com>2017-04-23 16:58:48 +0000
commitdd9a4b9ae80b12f93ca33620a3de0907e81dfe7b (patch)
tree96c97bd5ba8da53f4bcaa3de19b3b8c1b3d040bc /libcxx/include/mutex
parent42a84ac7100c83139f674c20ca99db8088d8cc3f (diff)
downloadbcm5719-llvm-dd9a4b9ae80b12f93ca33620a3de0907e81dfe7b.tar.gz
bcm5719-llvm-dd9a4b9ae80b12f93ca33620a3de0907e81dfe7b.zip
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 llvm-svn: 301132
Diffstat (limited to 'libcxx/include/mutex')
-rw-r--r--libcxx/include/mutex2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index e92baa51ae7..0b25614e8ea 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -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>);
OpenPOWER on IntegriCloud