QortalOS Brooklyn for Raspberry Pi 4
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
cat <<EOF |
|
static __always_inline bool |
|
${arch}${atomic}_try_cmpxchg${order}(${atomic}_t *v, ${int} *old, ${int} new) |
|
{ |
|
${int} r, o = *old; |
|
r = ${arch}${atomic}_cmpxchg${order}(v, o, new); |
|
if (unlikely(r != o)) |
|
*old = r; |
|
return likely(r == o); |
|
} |
|
EOF
|
|
|