blob: 3ccff29538f5f8746551ad4a375bc8e4eced8f1b [file] [log] [blame]
cat <<EOF
/**
* ${class}${atomicname}() - atomic compare and exchange with ${desc_order} ordering
* @v: pointer to ${atomic}_t
* @old: pointer to ${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, @old is updated to the current value of @v,
* and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* Return: @true if the exchange occured, @false otherwise.
*/
EOF