blob: f3b9d569ce3b1977a4d87a0690b529de67cb571c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#![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)
}
}
|