@@ -9,12 +9,12 @@ use core::sync::atomic::Ordering;
9
9
// `SYNC_TIME_PERIOD` nanoseconds. The next time we should run reclamation is stored in
10
10
// `due_time` inside `Domain`. On `no_std` we don't (yet) have access to time so this feature is
11
11
// disabled. Also on platforms with < 64 bits, we can only store 2^32 nanoseconds -> ~4 seconds or
12
- // less, so this feature is also disabled. Additionally, miri can't support time because of
13
- // system calls (perhaps this can be mocked), and loom can't support time for reasons of determinism.
12
+ // less, so this feature is also disabled. Additionally, loom can't support time for reasons of
13
+ // determinism.
14
14
15
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
15
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
16
16
const SYNC_TIME_PERIOD : u64 = std:: time:: Duration :: from_nanos ( 2000000000 ) . as_nanos ( ) as u64 ;
17
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
17
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
18
18
use crate :: sync:: atomic:: AtomicU64 ;
19
19
20
20
#[ cfg( loom) ]
@@ -62,7 +62,7 @@ pub struct Domain<F> {
62
62
hazptrs : HazPtrRecords ,
63
63
untagged : [ RetiredList ; NUM_SHARDS ] ,
64
64
family : PhantomData < F > ,
65
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
65
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
66
66
due_time : AtomicU64 ,
67
67
nbulk_reclaims : AtomicUsize ,
68
68
count : AtomicIsize ,
@@ -111,7 +111,7 @@ macro_rules! new {
111
111
} ,
112
112
untagged,
113
113
count: AtomicIsize :: new( 0 ) ,
114
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
114
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
115
115
due_time: AtomicU64 :: new( 0 ) ,
116
116
nbulk_reclaims: AtomicUsize :: new( 0 ) ,
117
117
family: PhantomData ,
@@ -368,7 +368,7 @@ impl<F> Domain<F> {
368
368
. compare_exchange_weak ( rcount, 0 , Ordering :: AcqRel , Ordering :: Relaxed )
369
369
{
370
370
Ok ( _) => {
371
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
371
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
372
372
{
373
373
self . due_time
374
374
. store ( Self :: now ( ) + SYNC_TIME_PERIOD , Ordering :: Release ) ;
@@ -381,7 +381,7 @@ impl<F> Domain<F> {
381
381
0
382
382
}
383
383
384
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
384
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
385
385
fn check_due_time ( & self ) -> isize {
386
386
let time = Self :: now ( ) ;
387
387
let due = self . due_time . load ( Ordering :: Acquire ) ;
@@ -409,7 +409,7 @@ impl<F> Domain<F> {
409
409
// TODO: Implement some kind of mock time for no_std.
410
410
// Currently we reclaim only based on rcount on no_std
411
411
// (also the reason for allow unused_mut)
412
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
412
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
413
413
{
414
414
rcount = self . check_due_time ( ) ;
415
415
}
@@ -553,7 +553,7 @@ impl<F> Domain<F> {
553
553
0
554
554
}
555
555
556
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
556
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
557
557
fn now ( ) -> u64 {
558
558
use std:: convert:: TryFrom ;
559
559
u64:: try_from (
0 commit comments