diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2016-11-07 21:36:46 +0300 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-11-07 22:01:12 +0300 |
commit | e6e335bf3a400bc3b5a65322a891318a25749769 (patch) | |
tree | 64f78c4585cf70b210ad004725131d5c997251a1 /arch/arc/kernel/time.c | |
parent | a79a812131b07254c09cf325ec68c0d05aaed0b5 (diff) | |
download | linux-e6e335bf3a400bc3b5a65322a891318a25749769.tar.xz |
ARC: change return value of userspace cmpxchg assist syscall
The original syscall only used to return errno to indicate if cmpxchg
succeeded. It was not returning the "previous" value which typical cmpxchg
callers are interested in to build their slowpaths or retry loops.
Given user preemption in syscall return path etc, it is not wise to
check this in userspace afterwards, but should be what kernel actually
observed in the syscall.
So change the syscall interface to always return the previous value and
additionally set Z flag to indicate whether operation succeeded or not
(just like ARM implementation when they used to have this syscall)
The flag approach avoids having to put_user errno which is nice given
the use case for this syscall cares mostly about the "previous" value.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/time.c')
0 files changed, 0 insertions, 0 deletions