1 cat <<EOF 1 cat <<EOF >> 2 static __always_inline bool >> 3 ${arch}${atomic}_try_cmpxchg${order}(${atomic}_t *v, ${int} *old, ${int} new) >> 4 { 2 ${int} r, o = *old; 5 ${int} r, o = *old; 3 r = raw_${atomic}_cmpxchg${order}(v, o !! 6 r = ${arch}${atomic}_cmpxchg${order}(v, o, new); 4 if (unlikely(r != o)) 7 if (unlikely(r != o)) 5 *old = r; 8 *old = r; 6 return likely(r == o); 9 return likely(r == o); >> 10 } 7 EOF 11 EOF
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.