linux-stable/include/linux/atomic
Uros Bizjak e01cc1e8c2 locking/atomic: Add generic support for sync_try_cmpxchg() and its fallback
Provide the generic sync_try_cmpxchg() function from the
raw_ prefixed version, also adding explicit instrumentation.

The patch amends existing scripts to generate sync_try_cmpxchg()
locking primitive and its raw_sync_try_cmpxchg() fallback, while
leaving existing macros from the try_cmpxchg() family unchanged.

The target can define its own arch_sync_try_cmpxchg() to override the
generic version of raw_sync_try_cmpxchg(). This allows the target
to generate more optimal assembly than the generic version.

Additionally, the patch renames two scripts to better reflect
whet they really do.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
2023-10-09 18:14:15 +02:00
..
atomic-arch-fallback.h locking/atomic: Add generic support for sync_try_cmpxchg() and its fallback 2023-10-09 18:14:15 +02:00
atomic-instrumented.h locking/atomic: Add generic support for sync_try_cmpxchg() and its fallback 2023-10-09 18:14:15 +02:00
atomic-long.h locking/atomic: scripts: fix ${atomic}_dec_if_positive() kerneldoc 2023-06-16 16:46:30 +02:00