Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1386098
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 19/31] locking,s390: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() |
| Date | 2016-04-25 10:30 +0200 |
| Message-ID | <rrK42-2xY-9@gated-at.bofh.it> (permalink) |
| References | <rqFSN-8hs-3@gated-at.bofh.it> <rqFSP-8hs-19@gated-at.bofh.it> <rrJKI-2lq-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Apr 25, 2016 at 10:06:25AM +0200, Martin Schwidefsky wrote: > On Fri, 22 Apr 2016 11:04:32 +0200 > Peter Zijlstra <peterz@infradead.org> wrote: > > > 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> > > --- > > arch/s390/include/asm/atomic.h | 42 +++++++++++++++++++++++++++++++---------- > > 1 file changed, 32 insertions(+), 10 deletions(-) > > That looks good, the code compiles and the functions are generated correctly. > We will know for sure if it works after the first user of these new functions > hit the kernel. So we already have an atomic_fetch_or() user in the kernel, and this series adds an atomic_fetch_add_acquire() user. But yes, we'll undoubtedly grow more over time :-) > Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Thanks!
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC][PATCH 19/31] locking,s390: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra <peterz@infradead.org> - 2016-04-22 11:50 +0200
Re: [RFC][PATCH 19/31] locking,s390: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Martin Schwidefsky <schwidefsky@de.ibm.com> - 2016-04-25 10:10 +0200
Re: [RFC][PATCH 19/31] locking,s390: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra <peterz@infradead.org> - 2016-04-25 10:30 +0200
csiph-web