Lines Matching +full:tri +full:- +full:state

2  * Copyright 2010-2012 PathScale, Inc. All rights reserved.
29 * guard.cc: Functions for thread-safe static initialisation.
37 * Statics that require initialisation are protected by a 64-bit value. Any
38 * platform that can do 32-bit atomic test and set operations can use this
39 * value as a low-overhead lock. Because statics (in most sane code) are
57 // x86 and ARM are the most common little-endian CPUs, so let's have a
66 * The Itanium C++ ABI defines guard words that are 64-bit (32-bit on AArch32)
71 * On many 32-bit platforms, 64-bit atomics are unavailable (or slow) and so we
72 * treat the two halves of the 64-bit word as independent values and establish
74 * lock word is in the locked state. This means that we can do double-checked
76 * transition the lock word from the unlocked to locked state, and then
82 * The state of the guard variable when an attempt is made to lock it.
106 * used to indicate the locked state is `1<<LockedBit`, the bit used to
107 * indicate the initialised state is `1<<InitBit`.
132 * Release the lock and set the initialised state. In the single-word
145 * Try to acquire the lock. This has a tri-state return, indicating
153 // Try to acquire the lock, assuming that we are in the state where in try_lock()
182 * Class encapsulating using two 32-bit atomic values to represent a 64-bit
214 * Try to acquire the lock. This has a tri-state return, indicating
244 * Set the initialised state and release the lock. In this
268 "Single-word 32-bit guard must be 32 bits");
270 "Single-word 64-bit guard must be 64 bits");
272 "Double-word guard must be 64 bits");
276 * The Arm PCS defines a variant of the Itanium ABI with 32-bit lock words.
282 * On little-endian 64-bit platforms the guard word is a single 64-bit
289 * On bit-endian 64-bit platforms, the guard word is a single 64-bit atomic
298 * 32-bit platforms use the same layout as 64-bit.
303 * 32-bit platforms use the same layout as 64-bit.
320 if (guard_object->is_initialised()) in __cxa_guard_acquire()
331 switch (guard_object->try_lock()) in __cxa_guard_acquire()
356 guard_object->unlock(false); in __cxa_guard_abort()
365 guard_object->unlock(true); in __cxa_guard_release()