summaryrefslogtreecommitdiff
path: root/include/mutex
diff options
context:
space:
mode:
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>);