summaryrefslogtreecommitdiff
path: root/kernel/nsproxy.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2023-01-16 17:53:37 +0100
committerThomas Gleixner <tglx@linutronix.de>2023-02-06 14:22:09 +0100
commit915d4ad3830aa1a2dafda9b737749fb410cb9790 (patch)
treee8287c524625634c219ad3dc4e553a1d429bdcec /kernel/nsproxy.c
parentcbdb1f163af2bb90d01be1f0263df1d8d5c9d9d3 (diff)
posix-timers: Use atomic64_try_cmpxchg() in __update_gt_cputime()
Use atomic64_try_cmpxchg() instead of atomic64_cmpxchg() in __update_gt_cputime(). The x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg() (and related move instruction in front of cmpxchg()). Also, atomic64_try_cmpxchg() implicitly assigns old *ptr value to "old" when cmpxchg() fails. There is no need to re-read the value in the loop. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230116165337.5810-1-ubizjak@gmail.com
Diffstat (limited to 'kernel/nsproxy.c')
0 files changed, 0 insertions, 0 deletions