2012-07-24 16:55:38 -05:00
|
|
|
// xfail-fast - check-fast doesn't understand aux-build
|
|
|
|
// aux-build:cci_intrinsic.rs
|
|
|
|
|
2012-09-11 19:46:20 -05:00
|
|
|
extern mod cci_intrinsic;
|
2012-09-05 14:32:05 -05:00
|
|
|
use 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;
|
|
|
|
}
|