summaryrefslogtreecommitdiff
path: root/scripts/atomic/kerneldoc/cmpxchg
blob: 02b24ee9d8a4fa63431d9c40627860f84bcea7bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cat <<EOF
/**
 * ${class}${atomicname}() - atomic compare and exchange with ${desc_order} ordering
 * @v: pointer to ${atomic}_t
 * @old: ${int} value to compare with
 * @new: ${int} value to assign
 *
 * If (@v == @old), atomically updates @v to @new with ${desc_order} ordering.
 * Otherwise, @v is not modified and relaxed ordering is provided.
 *
 * ${desc_noinstr}
 *
 * Return: The original value of @v.
 */
EOF