rust/src/test/run-pass/intrinsic-atomics-cc.rs

12 lines
222 B
Rust
Raw Normal View History

2012-07-24 16:55:38 -05:00
// xfail-fast - check-fast doesn't understand aux-build
// aux-build:cci_intrinsic.rs
use cci_intrinsic;
2012-08-23 16:19:35 -05:00
import cci_intrinsic::atomic_xchg;
2012-07-24 16:55:38 -05:00
fn main() {
let mut x = 1;
2012-08-23 16:19:35 -05:00
atomic_xchg(&mut x, 5);
2012-07-24 16:55:38 -05:00
assert x == 5;
}