Lines Matching +full:64 +full:- +full:bit
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)
67 * values with one bit defined to indicate that the guarded variable is and
68 * another bit to indicate that it's currently locked (initialisation in
69 * progress). The bit to use depends on the byte order of the target.
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
105 * guard. The word size is defined by the type of `GuardWord`. The bit
106 * used to indicate the locked state is `1<<LockedBit`, the bit used to
113 * The value indicating that the lock bit is set (and no other bits).
119 * The value indicating that the initialised bit is set (and all other
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
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
228 // ordering rule that the initialised bit is only ever updated in try_lock()
245 * implementation, this is ordered, not atomic: the initialise bit is
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
283 * atomic with the lock in the high bit and the initialised flag in the low
284 * bit.
289 * On bit-endian 64-bit platforms, the guard word is a single 64-bit atomic
290 * with the lock in the low bit and the initialised bit in the highest
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()