rust/tests/ui/intrinsics/auxiliary/cci_intrinsic.rs
2023-01-11 09:32:08 +00:00

15 lines
293 B
Rust

#![feature(intrinsics)]
pub mod rusti {
extern "rust-intrinsic" {
pub fn atomic_xchg_seqcst<T>(dst: *mut T, src: T) -> T;
}
}
#[inline(always)]
pub fn atomic_xchg_seqcst(dst: *mut isize, src: isize) -> isize {
unsafe {
rusti::atomic_xchg_seqcst(dst, src)
}
}