mozilla/rust — pull request #3827 by luqmana (2012-10-22 02:35:45+00:00)
Title: Replace rust_atomic_increment/decrement and rust_compare_and_swap_ptr with intrinsics.

Issue #3527

Added some new intrinsics: (compare and exchange)
```
atomic_cxchg
atomic_cxchg_acq
atomic_cxchg_rel
```

Though I had to basically copy/paste two functions since the new intrinsic wouldn't be available in stage0 so `rust_compare_and_swap_ptr` is still used in libcore for stage0.