|
| std::atomic< uint64_t > | guard {0} |
| | 原子守护变量:bit 0 = is_initialized, bit 8 = is_in_use
|
| |
if ( obj_guard.first_byte == 0 ) { if ( __cxa_guard_acquire(&obj_guard) ) { try { ... initialize the object ...; } catch (...) { __cxa_guard_abort(&obj_guard); throw; } ... queue object destructor with __cxa_atexit() ...; __cxa_guard_release(&obj_guard); } }
- Note
- 根据 Itanium C++ ABI,守护变量必须是 64 位
- See also
- https://itanium-cxx-abi.github.io/cxx-abi/abi.html#once-ctor
Definition at line 111 of file kstd_libcxx.cpp.
◆ guard
| std::atomic<uint64_t> GuardType::guard {0} |
原子守护变量:bit 0 = is_initialized, bit 8 = is_in_use
Definition at line 113 of file kstd_libcxx.cpp.
◆ kInitializedMask
| constexpr uint64_t GuardType::kInitializedMask = 0x01 |
|
staticconstexpr |
◆ kInUseMask
| constexpr uint64_t GuardType::kInUseMask = 0x100 |
|
staticconstexpr |
The documentation for this struct was generated from the following file: