Use the normal cmpxchg() idiom to implement this functionality. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>