@@ -59,18 +59,18 @@ static mp_obj_t thread_semaphore_acquire(size_t n_args, const mp_obj_t *pos_args
5959 bool res ;
6060
6161 uint16_t
62- bool threading_semphamore_acquire ( thread_semphamore_t * sem , int32_t wait_ms );
63- void threading_semphamore_release ( thread_semphamore_t * sem );
64- void threading_semphamore_init ( thread_event_t * mutex );
65- void threading_semphamore_delete ( thread_event_t * mutex );
62+ bool threading_semaphore_acquire ( thread_semaphore_t * sem , int32_t wait_ms );
63+ void threading_semaphore_release ( thread_semaphore_t * sem );
64+ void threading_semaphore_init ( thread_semaphore_t * sem );
65+ void threading_semaphore_delete ( thread_semaphore_t * sem );
6666
67- uint16_t count = threading_semphamore_get_count (& self -> sem );
67+ uint16_t count = threading_semaphore_get_count (& self -> sem );
6868
6969 if (!blocking ) {
7070 if (count >= self -> start_value ) {
7171 res = false;
7272 } else {
73- res = threading_semphamore_acquire (& self -> sem , 0 );
73+ res = threading_semaphore_acquire (& self -> sem , 0 );
7474 }
7575 } else {
7676 float timeout_f ;
@@ -87,7 +87,7 @@ static mp_obj_t thread_semaphore_acquire(size_t n_args, const mp_obj_t *pos_args
8787 self -> waiting += 1 ;
8888 }
8989
90- res = threading_semphamore_acquire (& self -> sem , timeout );
90+ res = threading_semaphore_acquire (& self -> sem , timeout );
9191
9292 if (res == true) {
9393 if (self -> waiting > 0 ) {
@@ -140,7 +140,7 @@ static mp_obj_t thread_semaphore_release(size_t n_args, const mp_obj_t *pos_args
140140 if (self -> value > 0 ) {
141141 self -> value -= 1 ;
142142 }
143- threading_semphamore_release (& self -> sem );
143+ threading_semaphore_release (& self -> sem );
144144 }
145145 return mp_const_none ;
146146}
@@ -165,10 +165,10 @@ static mp_obj_t thread_semaphore__del__(mp_obj_t self_in)
165165 mp_obj_thread_semaphore_t * self = MP_OBJ_TO_PTR (self_in );
166166
167167 for (uint16_t i = self -> value ;i < self -> start_value ;i ++ ) {
168- threading_semphamore_release (& self -> sem );
168+ threading_semaphore_release (& self -> sem );
169169 }
170170
171- threading_semphamore_delete (& self -> sem );
171+ threading_semaphore_delete (& self -> sem );
172172 return mp_const_none ;
173173}
174174
@@ -204,7 +204,7 @@ static mp_obj_t threading_semaphore_make_new(const mp_obj_type_t *type, size_t n
204204 return mp_const_none ;
205205 }
206206
207- threading_semphamore_init (& self -> sem , (uint16_t )start_value )
207+ threading_semaphore_init (& self -> sem , (uint16_t )start_value )
208208 self -> start_value = (uint16_t )start_value ;
209209
210210 return MP_OBJ_FROM_PTR (self );
@@ -267,7 +267,7 @@ static mp_obj_t multiprocessing_semaphore_make_new(const mp_obj_type_t *type, si
267267 return mp_const_none ;
268268 }
269269
270- threading_semphamore_init (& self -> sem , (uint16_t )start_value );
270+ threading_semaphore_init (& self -> sem , (uint16_t )start_value );
271271 self -> start_value = (uint16_t )start_value ;
272272
273273 return MP_OBJ_FROM_PTR (self );
0 commit comments