Thread (48 messages) 48 messages, 8 authors, 2016-06-16

Re: [PATCH -v2 22/33] locking,sparc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()

From: David Miller <davem@davemloft.net>
Date: 2016-05-31 17:51:02
Also in: lkml

From: Peter Zijlstra <peterz@infradead.org>
Date: Tue, 31 May 2016 12:19:47 +0200
Implement FETCH-OP atomic primitives, these are very similar to the
existing OP-RETURN primitives we already have, except they return the
value of the atomic variable _before_ modification.

This is especially useful for irreversible operations -- such as
bitops (because it becomes impossible to reconstruct the state prior
to modification).

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help