@@ -8,14 +8,12 @@ use core::{ffi::c_int, sync::atomic::Ordering};
8
8
use alloc:: format;
9
9
use embassy_executor:: SendSpawner ;
10
10
use embassy_futures:: yield_now;
11
+ #[ allow( unused_imports) ]
12
+ use embassy_sync:: semaphore:: { FairSemaphore , GreedySemaphore } ;
11
13
use embassy_sync:: {
12
- blocking_mutex:: raw:: CriticalSectionRawMutex ,
13
- channel:: Channel ,
14
- semaphore:: Semaphore ,
14
+ blocking_mutex:: raw:: CriticalSectionRawMutex , channel:: Channel , semaphore:: Semaphore ,
15
15
signal:: Signal ,
16
16
} ;
17
- #[ allow( unused_imports) ]
18
- use embassy_sync:: semaphore:: { GreedySemaphore , FairSemaphore } ;
19
17
use static_cell:: StaticCell ;
20
18
use zephyr:: { embassy:: Executor , sync:: atomic:: AtomicBool } ;
21
19
@@ -24,7 +22,7 @@ use crate::{BenchTimer, Command, TestResult, NUM_THREADS, THREAD_STACK_SIZE};
24
22
/// As the tests do exercise different executors at different priorities, use the critical section
25
23
/// variant.
26
24
// type ASemaphore = GreedySemaphore<CriticalSectionRawMutex>;
27
- type ASemaphore = FairSemaphore < CriticalSectionRawMutex , { NUM_THREADS + 2 } > ;
25
+ type ASemaphore = FairSemaphore < CriticalSectionRawMutex , { NUM_THREADS + 2 } > ;
28
26
29
27
/// A Signal for reporting back spawners.
30
28
type SpawnerSignal = Signal < CriticalSectionRawMutex , SendSpawner > ;
@@ -281,7 +279,6 @@ async fn main_run(this: &'static AsyncTests) {
281
279
} else {
282
280
this. spawners [ 0 ] . spawn ( low_worker ( this, command) ) . unwrap ( ) ;
283
281
}
284
-
285
282
} else {
286
283
this. spawners [ 1 ] . spawn ( high_worker ( this, command) ) . unwrap ( ) ;
287
284
this. spawners [ 1 ] . spawn ( low_worker ( this, command) ) . unwrap ( ) ;
@@ -349,5 +346,4 @@ fn executor_thread(exec: &'static StaticCell<Executor>, spawner_sig: &'static Sp
349
346
350
347
// For debugging
351
348
#[ unsafe( no_mangle) ]
352
- extern "C" fn invalid_spinlock ( _l : * mut zephyr:: raw:: k_spinlock , _thread : u32 , _id : u32 ) {
353
- }
349
+ extern "C" fn invalid_spinlock ( _l : * mut zephyr:: raw:: k_spinlock , _thread : u32 , _id : u32 ) { }
0 commit comments