File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 4242 - name : Run cargo check (without dev-dependencies to catch missing feature flags)
4343 if : startsWith(matrix.rust, 'nightly')
4444 run : cargo check -Z features=dev_dep
45+ - name : Add rust-src
46+ if : startsWith(matrix.rust, 'nightly')
47+ run : rustup component add rust-src
48+ # https://github.com/smol-rs/async-io/pull/144#issuecomment-1666927490
49+ # - name: Check selected Tier 3 targets
50+ # if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest'
51+ # run: cargo check -Z build-std --target=riscv32imc-esp-espidf
4552 - run : cargo test
4653
4754 # Copied from: https://github.com/rust-lang/stacker/pull/19/files
Original file line number Diff line number Diff line change @@ -43,6 +43,14 @@ cfg_if::cfg_if! {
4343 }
4444}
4545
46+ #[ cfg( not( target_os = "espidf" ) ) ]
47+ const TIMER_QUEUE_SIZE : usize = 1000 ;
48+
49+ /// ESP-IDF - being an embedded OS - does not need so many timers
50+ /// and this saves ~ 20K RAM which is a lot for an MCU with RAM < 400K
51+ #[ cfg( target_os = "espidf" ) ]
52+ const TIMER_QUEUE_SIZE : usize = 100 ;
53+
4654const READ : usize = 0 ;
4755const WRITE : usize = 1 ;
4856
@@ -98,7 +106,7 @@ impl Reactor {
98106 sources : Mutex :: new ( Slab :: new ( ) ) ,
99107 events : Mutex :: new ( Vec :: new ( ) ) ,
100108 timers : Mutex :: new ( BTreeMap :: new ( ) ) ,
101- timer_ops : ConcurrentQueue :: bounded ( 1000 ) ,
109+ timer_ops : ConcurrentQueue :: bounded ( TIMER_QUEUE_SIZE ) ,
102110 }
103111 } )
104112 }
You can’t perform that action at this time.
0 commit comments