projects
/
linux-block.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[linux-block.git]
/
scripts
/
atomic
/
fallbacks
/
try_cmpxchg
1
cat <<EOF
2
static __always_inline bool
3
arch_${atomic}_try_cmpxchg${order}(${atomic}_t *v, ${int} *old, ${int} new)
4
{
5
${int} r, o = *old;
6
r = arch_${atomic}_cmpxchg${order}(v, o, new);
7
if (unlikely(r != o))
8
*old = r;
9
return likely(r == o);
10
}
11
EOF