/net/dccp/ccids/

on> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2016-11-07 10:36:46 -0800
committerVineet Gupta <vgupta@synopsys.com>2016-11-07 11:01:12 -0800
commite6e335bf3a400bc3b5a65322a891318a25749769 (patch)
tree64f78c4585cf70b210ad004725131d5c997251a1
parenta79a812131b07254c09cf325ec68c0d05aaed0b5 (diff)
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