While trying to get multithreading working for CloudABI on aarch64, I noticed that compare-and-exchange operations in kernelspace would always fail. It turns out that we don't properly set the return value to 0 when the compare and exchange succeeds. Approved by: andrew Differential Revision: https://reviews.freebsd.org/D3899