2016-04-26 10:51:14 -07:00
|
|
|
#![feature(intrinsics)]
|
|
|
|
|
|
|
|
pub mod rusti {
|
|
|
|
extern "rust-intrinsic" {
|
2022-06-22 13:02:23 +02:00
|
|
|
pub fn atomic_xchg_seqcst<T>(dst: *mut T, src: T) -> T;
|
2016-04-26 10:51:14 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline(always)]
|
2022-06-22 13:02:23 +02:00
|
|
|
pub fn atomic_xchg_seqcst(dst: *mut isize, src: isize) -> isize {
|
2016-04-26 10:51:14 -07:00
|
|
|
unsafe {
|
2022-06-22 13:02:23 +02:00
|
|
|
rusti::atomic_xchg_seqcst(dst, src)
|
2016-04-26 10:51:14 -07:00
|
|
|
}
|
2015-03-18 22:05:24 +01:00
|
|
|
}
|