FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/gpf/osl/os_tim_ir.c @ 468:6389bfe95f23
os_tim_ir.c: os_StartTimer(): polish
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 26 Jun 2014 06:15:10 +0000 |
parents | aa9aec3ba437 |
children | 5031958cea52 |
comparison
equal
deleted
inserted
replaced
467:aa9aec3ba437 | 468:6389bfe95f23 |
---|---|
211 t_list_access = 0; | 211 t_list_access = 0; |
212 return OS_ERROR; | 212 return OS_ERROR; |
213 } | 213 } |
214 | 214 |
215 sts = NU_Obtain_Semaphore(&TimSemCB, NU_SUSPEND); | 215 sts = NU_Obtain_Semaphore(&TimSemCB, NU_SUSPEND); |
216 /* FIXME: not sure about this | 216 /* Disassembly reveals this bogon in the original code: |
217 if (sts != NU_SUCCESS) | 217 if (sts != NU_SUCCESS) |
218 os_MyHandle(sts); | 218 os_MyHandle(); |
219 */ | 219 */ |
220 status = timer->status; | 220 status = timer->status; |
221 if (status == 2) | 221 if (status == 2) |
222 status = os_remove_timer_from_list(timer); | 222 status = os_remove_timer_from_list(timer); |
223 timer->t_handle = TimerHandle; | 223 timer->t_handle = TimerHandle; |
225 timer->entity_handle = TaskHandle; | 225 timer->entity_handle = TaskHandle; |
226 timer->t_index = Index; | 226 timer->t_index = Index; |
227 timer->p_ticks = TIME_TO_SYSTEM_TICKS(RescheduleTime); | 227 timer->p_ticks = TIME_TO_SYSTEM_TICKS(RescheduleTime); |
228 ticks = os_add_timer_to_list(timer, TIME_TO_SYSTEM_TICKS(InitialTime)); | 228 ticks = os_add_timer_to_list(timer, TIME_TO_SYSTEM_TICKS(InitialTime)); |
229 if (ticks) | 229 if (ticks) |
230 NU_Reset_Timer(&os_timer_cb, os_Timeout, ticks, 0, NU_ENABLE_TIMER); | 230 NU_Reset_Timer(&os_timer_cb, os_Timeout, ticks, 0, |
231 NU_ENABLE_TIMER); | |
231 if (sts == NU_SUCCESS) | 232 if (sts == NU_SUCCESS) |
232 NU_Release_Semaphore(&TimSemCB); | 233 NU_Release_Semaphore(&TimSemCB); |
233 t_list_access = 0; | 234 t_list_access = 0; |
234 return OS_OK; | 235 return OS_OK; |
235 } | 236 } |