@@ -33,8 +33,6 @@ use zephyr::{
33
33
work:: { WorkQueue , WorkQueueBuilder } ,
34
34
} ;
35
35
36
- mod basesem;
37
-
38
36
/// How many threads to run in the tests.
39
37
const NUM_THREADS : usize = 6 ;
40
38
@@ -61,7 +59,6 @@ extern "C" fn rust_main() {
61
59
}
62
60
63
61
tester. run ( Command :: Empty ) ;
64
- tester. run ( Command :: BaseSemPingPong ( NUM_THREADS , 10_000 ) ) ;
65
62
tester. run ( Command :: SimpleSem ( 10_000 ) ) ;
66
63
tester. run ( Command :: SimpleSemAsync ( 10_000 ) ) ;
67
64
tester. run ( Command :: SimpleSemYield ( 10_000 ) ) ;
@@ -121,10 +118,6 @@ struct ThreadTests {
121
118
/// The test also all return their result to the main. The threads Send, the main running
122
119
/// receives.
123
120
results : ChanPair < Result > ,
124
-
125
- /// For the base sem test, just use these, which are just shared by reference.
126
- forward : basesem:: Semaphore ,
127
- reverse : basesem:: Semaphore ,
128
121
}
129
122
130
123
impl ThreadTests {
@@ -155,8 +148,6 @@ impl ThreadTests {
155
148
low_command : low_send,
156
149
high_command : high_send,
157
150
workq,
158
- forward : basesem:: Semaphore :: new ( 0 , 1 ) ,
159
- reverse : basesem:: Semaphore :: new ( 0 , 1 ) ,
160
151
} ;
161
152
162
153
let mut thread_commands = Vec :: new ( ) ;
@@ -449,11 +440,6 @@ impl ThreadTests {
449
440
continue ;
450
441
}
451
442
}
452
-
453
- Command :: BaseSemPingPong ( _nthread, count) => {
454
- this. base_worker ( count) ;
455
- total = count;
456
- }
457
443
}
458
444
459
445
this. results
@@ -639,23 +625,6 @@ impl ThreadTests {
639
625
let _ = this;
640
626
}
641
627
642
- fn base_worker ( & self , count : usize ) {
643
- for _ in 0 ..count {
644
- self . forward . take ( Forever ) . unwrap ( ) ;
645
- self . reverse . give ( ) ;
646
- }
647
- }
648
-
649
- // In the low runner, does the ping-pong with each.
650
- fn base_replier ( & self , nthread : usize , count : usize ) {
651
- for _ in 0 ..count {
652
- for _ in 0 ..nthread {
653
- self . forward . give ( ) ;
654
- self . reverse . take ( Forever ) . unwrap ( ) ;
655
- }
656
- }
657
- }
658
-
659
628
/// And the low priority worker.
660
629
fn low_runner ( this : Arc < Self > , command : Receiver < Command > ) {
661
630
let _ = this;
@@ -685,9 +654,6 @@ impl ThreadTests {
685
654
}
686
655
Command :: SemPingPongAsync ( _) => ( ) ,
687
656
Command :: SemOnePingPongAsync ( _, _) => ( ) ,
688
- Command :: BaseSemPingPong ( nthread, count) => {
689
- this. base_replier ( nthread, count) ;
690
- }
691
657
}
692
658
// printkln!("low command: {:?}", cmd);
693
659
@@ -720,7 +686,6 @@ impl ThreadTests {
720
686
}
721
687
Command :: SemPingPongAsync ( _) => ( ) ,
722
688
Command :: SemOnePingPongAsync ( _, _) => ( ) ,
723
- Command :: BaseSemPingPong ( _, _) => ( ) ,
724
689
}
725
690
// printkln!("high command: {:?}", cmd);
726
691
@@ -779,7 +744,6 @@ enum Command {
779
744
SemOnePingPong ( usize ) ,
780
745
/// Same as SemOnePingPong, but async. The first parameter is the number of async tasks.
781
746
SemOnePingPongAsync ( usize , usize ) ,
782
- BaseSemPingPong ( usize , usize ) ,
783
747
}
784
748
785
749
enum Result {
0 commit comments