summaryrefslogtreecommitdiff
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2022-07-12 17:49:17 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-09-12 07:55:06 +0300
commit4f1d2a030db09af4d21695983674a18633cd0ffb (patch)
treeb149575bb927d0552a63441ab885a5a9128212f3 /kernel/exit.c
parent05c6257433b7212f07a7e53479a8ab038fc1666a (diff)
downloadlinux-4f1d2a030db09af4d21695983674a18633cd0ffb.tar.xz
llist: use try_cmpxchg in llist_add_batch and llist_del_first
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in llist_add_batch and llist_del_first. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg. Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications. No functional change intended. Link: https://lkml.kernel.org/r/20220712144917.4497-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/exit.c')
0 files changed, 0 insertions, 0 deletions