Re: [PATCHv2 13/16] atomics/treewide: make test ops optional

2018-06-04 Thread Palmer Dabbelt
On Tue, 29 May 2018 08:43:43 PDT (-0700), mark.rutl...@arm.com wrote: Some of the atomics return the result of a test applied after the atomic operation, and almost all architectures implement these as trivial wrappers around the underlying atomic. Specifically: * _inc_and_test(v) is

Re: [PATCHv2 13/16] atomics/treewide: make test ops optional

2018-06-04 Thread Palmer Dabbelt
On Tue, 29 May 2018 08:43:43 PDT (-0700), mark.rutl...@arm.com wrote: Some of the atomics return the result of a test applied after the atomic operation, and almost all architectures implement these as trivial wrappers around the underlying atomic. Specifically: * _inc_and_test(v) is

[PATCHv2 13/16] atomics/treewide: make test ops optional

2018-05-29 Thread Mark Rutland
Some of the atomics return the result of a test applied after the atomic operation, and almost all architectures implement these as trivial wrappers around the underlying atomic. Specifically: * _inc_and_test(v) is (_inc_return(v) == 0) * _dec_and_test(v) is (_dec_return(v) == 0) *

[PATCHv2 13/16] atomics/treewide: make test ops optional

2018-05-29 Thread Mark Rutland
Some of the atomics return the result of a test applied after the atomic operation, and almost all architectures implement these as trivial wrappers around the underlying atomic. Specifically: * _inc_and_test(v) is (_inc_return(v) == 0) * _dec_and_test(v) is (_dec_return(v) == 0) *