Skip to content

Commit ad3010c

Browse files
committed
make atomic intrinsic impl details private
1 parent c850ffe commit ad3010c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ pub use rustc_const_eval::interpret::{self, AllocMap, PlaceTy};
6262
pub use crate::shims::dlsym::{Dlsym, EvalContextExt as _};
6363
pub use crate::shims::env::{EnvVars, EvalContextExt as _};
6464
pub use crate::shims::foreign_items::EvalContextExt as _;
65-
pub use crate::shims::intrinsics::atomic::EvalContextExt as _;
6665
pub use crate::shims::intrinsics::EvalContextExt as _;
6766
pub use crate::shims::os_str::EvalContextExt as _;
6867
pub use crate::shims::panic::{CatchUnwindData, EvalContextExt as _};

src/shims/intrinsics/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub mod atomic;
1+
mod atomic;
22
mod simd;
33

44
use std::iter;
@@ -11,6 +11,7 @@ use rustc_middle::{mir, ty, ty::FloatTy};
1111
use rustc_target::abi::Integer;
1212

1313
use crate::*;
14+
use atomic::EvalContextExt as _;
1415
use helpers::check_arg_count;
1516
use simd::EvalContextExt as _;
1617

src/shims/unix/linux/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub fn futex<'tcx>(
169169
//
170170
// Thankfully, preemptions cannot happen inside a Miri shim, so we do not need to
171171
// do anything special to guarantee fence-load-comparison atomicity.
172-
this.atomic_fence(&[], AtomicFenceOrd::SeqCst)?;
172+
this.validate_atomic_fence(AtomicFenceOrd::SeqCst)?;
173173
// Read an `i32` through the pointer, regardless of any wrapper types.
174174
// It's not uncommon for `addr` to be passed as another type than `*mut i32`, such as `*const AtomicI32`.
175175
let futex_val = this
@@ -240,7 +240,7 @@ pub fn futex<'tcx>(
240240
// Together with the SeqCst fence in futex_wait, this makes sure that futex_wait
241241
// will see the latest value on addr which could be changed by our caller
242242
// before doing the syscall.
243-
this.atomic_fence(&[], AtomicFenceOrd::SeqCst)?;
243+
this.validate_atomic_fence(AtomicFenceOrd::SeqCst)?;
244244
let mut n = 0;
245245
for _ in 0..val {
246246
if let Some(thread) = this.futex_wake(addr_usize, bitset) {

0 commit comments

Comments
 (0)