summaryrefslogtreecommitdiff
path: root/include/mutex
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-26 19:24:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-26 19:24:31 +0000
commit2fa809d9eabddd820af54059faa8362dd50b51de (patch)
treed24999651df3a7a5d330d20573335db9a8afcc89 /include/mutex
parent1c3313bd0215c89fb38710a1ea0762ccf32e859c (diff)
Notes
Diffstat (limited to 'include/mutex')
-rw-r--r--include/mutex2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mutex b/include/mutex
index e92baa51ae75..0b25614e8ead 100644
--- a/include/mutex
+++ b/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>);