Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: helpers: Add i8/i16 atomic try_cmpxchg_release helpers

Add i8/i16 atomic try_cmpxchg_release helpers that call
try_cmpxchg_release() macro implementing atomic try_cmpxchg_release
using architecture-specific instructions.

[boqun: Use try_cmpxchg_release() instead of raw_try_cmpxchg_release()]

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20251227115951.1424458-4-fujita.tomonori@gmail.com

authored by

FUJITA Tomonori and committed by
Boqun Feng
b5992f07 fed6aaa3

+10
+10
rust/helpers/atomic_ext.c
··· 117 117 { 118 118 return try_cmpxchg_acquire(ptr, old, new); 119 119 } 120 + 121 + __rust_helper bool rust_helper_atomic_i8_try_cmpxchg_release(s8 *ptr, s8 *old, s8 new) 122 + { 123 + return try_cmpxchg_release(ptr, old, new); 124 + } 125 + 126 + __rust_helper bool rust_helper_atomic_i16_try_cmpxchg_release(s16 *ptr, s16 *old, s16 new) 127 + { 128 + return try_cmpxchg_release(ptr, old, new); 129 + }