Add compareAndSwap for double