rust/src/test/auxiliary/cci_intrinsic.rs
2012-07-24 14:56:02 -07:00

19 lines
610 B
Rust

#[abi = "rust-intrinsic"]
extern mod rusti {
fn atomic_xchng(&dst: int, src: int) -> int;
fn atomic_xchng_acq(&dst: int, src: int) -> int;
fn atomic_xchng_rel(&dst: int, src: int) -> int;
fn atomic_add(&dst: int, src: int) -> int;
fn atomic_add_acq(&dst: int, src: int) -> int;
fn atomic_add_rel(&dst: int, src: int) -> int;
fn atomic_sub(&dst: int, src: int) -> int;
fn atomic_sub_acq(&dst: int, src: int) -> int;
fn atomic_sub_rel(&dst: int, src: int) -> int;
}
#[inline(always)]
fn atomic_xchng(&dst: int, src: int) -> int {
rusti::atomic_xchng(dst, src)
}