summaryrefslogtreecommitdiffstats
path: root/src/test/ui/intrinsics/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/intrinsics/auxiliary')
-rw-r--r--src/test/ui/intrinsics/auxiliary/cci_intrinsic.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/intrinsics/auxiliary/cci_intrinsic.rs b/src/test/ui/intrinsics/auxiliary/cci_intrinsic.rs
new file mode 100644
index 000000000..f3b9d569c
--- /dev/null
+++ b/src/test/ui/intrinsics/auxiliary/cci_intrinsic.rs
@@ -0,0 +1,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)
+ }
+}