xref: /linux/scripts/atomic/kerneldoc/try_cmpxchg (revision ad8110706f381170c9f9975f1cb06010fd3ca381)
1*ad811070SMark Rutlandcat <<EOF
2*ad811070SMark Rutland/**
3*ad811070SMark Rutland * ${class}${atomicname}() - atomic compare and exchange with ${desc_order} ordering
4*ad811070SMark Rutland * @v: pointer to ${atomic}_t
5*ad811070SMark Rutland * @old: pointer to ${int} value to compare with
6*ad811070SMark Rutland * @new: ${int} value to assign
7*ad811070SMark Rutland *
8*ad811070SMark Rutland * If (@v == @old), atomically updates @v to @new with ${desc_order} ordering.
9*ad811070SMark Rutland * Otherwise, updates @old to the current value of @v.
10*ad811070SMark Rutland *
11*ad811070SMark Rutland * ${desc_noinstr}
12*ad811070SMark Rutland *
13*ad811070SMark Rutland * Return: @true if the exchange occured, @false otherwise.
14*ad811070SMark Rutland */
15*ad811070SMark RutlandEOF
16