Lines Matching refs:atomic

7 maintainers on how to implement atomic counter, bitops, and spinlock
35 The initializer is atomic in that the return values of the atomic operations
56 The setting is atomic in that the return values of the atomic operations by
67 The read is atomic in that the return value is guaranteed to be one of the
174 locks, or atomic operations if variable a can change at runtime!
178 Now, we move onto the atomic operation interfaces typically implemented with
207 and after the atomic operation calls are strongly ordered with respect
208 to the atomic operation itself.
211 before and after the atomic operation.
213 If the atomic instructions used in an implementation provide explicit
233 given atomic counter. They return a boolean indicating whether the
237 the atomic operation.
247 The given increment is added to the given atomic counter value. A boolean
256 This performs an atomic exchange operation on the atomic variable v, setting
257 the given new value. It returns the old value that the atomic variable v had
264 This performs an atomic compare exchange operation on the atomic value v,
280 If the atomic value v is not equal to u, this function adds a to v, and
282 an atomic operation.
304 call are strongly ordered with respect to the atomic counter
307 atomic counter decrement.
310 implementation could legally allow the atomic counter update visible
316 kernel. It is the use of atomic counters to implement reference
382 before the atomic counter decrement is performed.
417 on, and that lock protects the atomic operation. Parisc uses the
423 We will now cover the atomic bitmask operations. You will find that
427 Native atomic bit operations are defined to operate on objects aligned
447 indicates whether the changed bit was set _BEFORE_ the atomic bit
466 All memory operations before the atomic bit operation call must be
467 made visible globally before the atomic bit operation is made visible.
468 Likewise, the atomic bit operation must be visible globally before any
477 "obj->dead = 1;" is visible to cpus before the atomic memory operation
478 done by test_and_set_bit() becomes visible. Likewise, the atomic
520 The __clear_bit_unlock version is non-atomic, however it still implements
524 Finally, there are non-atomic versions of the bitmask operations
527 expensive non-atomic operations may be used in the implementation.
538 These non-atomic variants also do not require any special memory
542 memory-barrier semantics as the atomic and bit operations returning
546 linux/atomic.h should be included rather than asm/cmpxchg.h, unless
563 int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
576 an abstract atomic operation:
586 As an example usage, here is what an atomic counter update
605 int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
612 old = atomic_read(atomic);
618 ret = cas(atomic, old, new);