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