Sign in
android-kvm
/
linux
/
9c68ece8b2a5c5ff9b2fcaea923dd73efeb174cd
/
.
/
scripts
/
atomic
/
fallbacks
/
try_cmpxchg
blob: d4da82092baf7a3e9017a7252312352bd1bae86f [
file
] [
log
] [
blame
]
cat
<<
EOF
$
{
int
}
r
,
o
=
*
old
;
r
=
raw_$
{
atomic
}
_cmpxchg$
{
order
}(
v
,
o
,
new
);
if
(
unlikely
(
r
!=
o
))
*
old
=
r
;
return
likely
(
r
==
o
);
EOF