From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/intrinsics/auxiliary/cci_intrinsic.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/intrinsics/auxiliary/cci_intrinsic.rs (limited to 'tests/ui/intrinsics/auxiliary') diff --git a/tests/ui/intrinsics/auxiliary/cci_intrinsic.rs b/tests/ui/intrinsics/auxiliary/cci_intrinsic.rs new file mode 100644 index 000000000..f3b9d569c --- /dev/null +++ b/tests/ui/intrinsics/auxiliary/cci_intrinsic.rs @@ -0,0 +1,14 @@ +#![feature(intrinsics)] + +pub mod rusti { + extern "rust-intrinsic" { + pub fn atomic_xchg_seqcst(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) + } +} -- cgit v1.2.3