@@ -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 ,
@@ -113,7 +113,7 @@ macro_rules! new {
113
113
} ,
114
114
untagged,
115
115
count: AtomicIsize :: new( 0 ) ,
116
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
116
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
117
117
due_time: AtomicU64 :: new( 0 ) ,
118
118
nbulk_reclaims: AtomicUsize :: new( 0 ) ,
119
119
family: PhantomData ,
@@ -370,7 +370,7 @@ impl<F> Domain<F> {
370
370
. compare_exchange_weak ( rcount, 0 , Ordering :: AcqRel , Ordering :: Relaxed )
371
371
{
372
372
Ok ( _) => {
373
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
373
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
374
374
{
375
375
self . due_time
376
376
. store ( Self :: now ( ) + SYNC_TIME_PERIOD , Ordering :: Release ) ;
@@ -383,7 +383,7 @@ impl<F> Domain<F> {
383
383
0
384
384
}
385
385
386
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
386
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
387
387
fn check_due_time ( & self ) -> isize {
388
388
let time = Self :: now ( ) ;
389
389
let due = self . due_time . load ( Ordering :: Acquire ) ;
@@ -411,7 +411,7 @@ impl<F> Domain<F> {
411
411
// TODO: Implement some kind of mock time for no_std.
412
412
// Currently we reclaim only based on rcount on no_std
413
413
// (also the reason for allow unused_mut)
414
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
414
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
415
415
{
416
416
rcount = self . check_due_time ( ) ;
417
417
}
@@ -554,7 +554,7 @@ impl<F> Domain<F> {
554
554
0
555
555
}
556
556
557
- #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( miri ) , not ( loom) ) ) ]
557
+ #[ cfg( all( feature = "std" , target_pointer_width = "64" , not( loom) ) ) ]
558
558
fn now ( ) -> u64 {
559
559
use std:: convert:: TryFrom ;
560
560
u64:: try_from (
0 commit comments