File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ use crate::{
1010 ForkSync ,
1111 NUM_PHIL ,
1212} ;
13- use zephyr:: kobj_define;
1413use zephyr:: sync:: Mutex ;
1514use zephyr:: sync:: Condvar ;
1615// use zephyr::time::Forever;
@@ -26,12 +25,10 @@ pub struct CondSync {
2625impl CondSync {
2726 #[ allow( dead_code) ]
2827 pub fn new ( ) -> CondSync {
29- let sys_mutex = MUTEX . init_once ( ( ) ) . unwrap ( ) ;
30- let sys_condvar = CONDVAR . init_once ( ( ) ) . unwrap ( ) ;
31-
32- let lock = Mutex :: new_from ( [ false ; NUM_PHIL ] , sys_mutex) ;
33- let cond = Condvar :: new_from ( sys_condvar) ;
34- CondSync { lock, cond }
28+ CondSync {
29+ lock : Mutex :: new ( [ false ; NUM_PHIL ] ) ,
30+ cond : Condvar :: new ( ) ,
31+ }
3532 }
3633}
3734
@@ -51,8 +48,3 @@ impl ForkSync for CondSync {
5148 self . cond . notify_all ( ) ;
5249 }
5350}
54-
55- kobj_define ! {
56- static MUTEX : StaticMutex ;
57- static CONDVAR : StaticCondvar ;
58- }
You can’t perform that action at this time.
0 commit comments