Lines Matching +full:sync +full:- +full:flag
1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
24 // keep in sync with: 7741191.
31 void __call_once(volatile once_flag::_State_type& flag, void* arg, void (*func)(void*)) { in __call_once() argument
34 if (flag == once_flag::_Unset) { in __call_once()
35 auto guard = std::__make_exception_guard([&flag] { flag = once_flag::_Unset; }); in __call_once()
36 flag = once_flag::_Pending; in __call_once()
38 flag = once_flag::_Complete; in __call_once()
45 while (flag == once_flag::_Pending) in __call_once()
47 if (flag == once_flag::_Unset) { in __call_once()
48 auto guard = std::__make_exception_guard([&flag] { in __call_once()
50 __libcpp_relaxed_store(&flag, once_flag::_Unset); in __call_once()
55 __libcpp_relaxed_store(&flag, once_flag::_Pending); in __call_once()
59 __libcpp_atomic_store(&flag, once_flag::_Complete, _AO_Release); in __call_once()