cpuops: Use cmpxchg for xchg to avoid lock semantics