Lines Matching full:atomic
2 Semantics and Behavior of Atomic and Bitmask Operations
8 maintainers on how to implement atomic counter, bitops, and spinlock
11 Atomic Type And Operations
41 The initializer is atomic in that the return values of the atomic operations
62 The setting is atomic in that the return values of the atomic operations by
73 The read is atomic in that the return value is guaranteed to be one of the
180 locks, or atomic operations if variable a can change at runtime!
186 Now, we move onto the atomic operation interfaces typically implemented with
215 and after the atomic operation calls are strongly ordered with respect
216 to the atomic operation itself.
219 before and after the atomic operation.
221 If the atomic instructions used in an implementation provide explicit
241 given atomic counter. They return a boolean indicating whether the
245 the atomic operation::
255 The given increment is added to the given atomic counter value. A boolean
264 This performs an atomic exchange operation on the atomic variable v, setting
265 the given new value. It returns the old value that the atomic variable v had
272 This performs an atomic compare exchange operation on the atomic value v,
288 If the atomic value v is not equal to u, this function adds a to v, and
290 an atomic operation.
305 Preceding a non-value-returning read-modify-write atomic operation with
308 read-modify-write atomic operations.
317 call are strongly ordered with respect to the atomic counter
320 atomic counter decrement.
323 implementation could legally allow the atomic counter update visible
329 kernel. It is the use of atomic counters to implement reference
397 before the atomic counter decrement is performed.
432 on, and that lock protects the atomic operation. Parisc uses the
439 Atomic Bitmask
442 We will now cover the atomic bitmask operations. You will find that
446 Native atomic bit operations are defined to operate on objects aligned
466 indicates whether the changed bit was set _BEFORE_ the atomic bit
487 All memory operations before the atomic bit operation call must be
488 made visible globally before the atomic bit operation is made visible.
489 Likewise, the atomic bit operation must be visible globally before any
498 "obj->dead = 1;" is visible to cpus before the atomic memory operation
499 done by test_and_set_bit() becomes visible. Likewise, the atomic
541 The __clear_bit_unlock version is non-atomic, however it still implements
545 Finally, there are non-atomic versions of the bitmask operations
548 expensive non-atomic operations may be used in the implementation.
559 These non-atomic variants also do not require any special memory
563 memory-barrier semantics as the atomic and bit operations returning
569 linux/atomic.h should be included rather than asm/cmpxchg.h, unless the
586 int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
599 an abstract atomic operation::
609 As an example usage, here is what an atomic counter update
628 int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
635 old = atomic_read(atomic);
641 ret = cas(atomic, old, new);