mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
15 lines
293 B
Rust
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)
|
|
}
|
|
}
|