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_acquire helpers

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

[boqun: Use try_cmpxchg_acquire() instead of raw_try_cmpxchg_acquire()]

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-3-fujita.tomonori@gmail.com

authored by

FUJITA Tomonori and committed by
Boqun Feng
fed6aaa3 164e4b56

+10
+10
rust/helpers/atomic_ext.c
··· 107 107 { 108 108 return try_cmpxchg(ptr, old, new); 109 109 } 110 + 111 + __rust_helper bool rust_helper_atomic_i8_try_cmpxchg_acquire(s8 *ptr, s8 *old, s8 new) 112 + { 113 + return try_cmpxchg_acquire(ptr, old, new); 114 + } 115 + 116 + __rust_helper bool rust_helper_atomic_i16_try_cmpxchg_acquire(s16 *ptr, s16 *old, s16 new) 117 + { 118 + return try_cmpxchg_acquire(ptr, old, new); 119 + }