# HG changeset patch # User Michael Spacefalcon # Date 1403766821 0 # Node ID c8b5a8e84ef774ec93ebc37ece8d75d0cd8361eb # Parent 81b941dd415dcf5780262185090ad6db63edf5ae os_tim_ir.c: os_CreateTimer(): minor fixes diff -r 81b941dd415d -r c8b5a8e84ef7 gsm-fw/gpf/osl/os_tim_ir.c --- a/gsm-fw/gpf/osl/os_tim_ir.c Thu Jun 26 06:41:54 2014 +0000 +++ b/gsm-fw/gpf/osl/os_tim_ir.c Thu Jun 26 07:13:41 2014 +0000 @@ -286,19 +286,17 @@ return OS_OK; } -/* FIXME: TaskHandle and MemPoolHandle are unused?! */ GLOBAL LONG os_CreateTimer(OS_HANDLE TaskHandle, void (*TimeoutProc) (OS_HANDLE, OS_HANDLE, USHORT), OS_HANDLE *TimerHandle, OS_HANDLE MemPoolHandle) + /* TaskHandle and MemPoolHandle arguments are unused */ { STATUS sts; - OS_HANDLE orig_next_t_handle; T_OS_TIMER_ENTRY *timer_e; t_list_access = 1; sts = NU_Obtain_Semaphore(&TimSemCB, NU_SUSPEND); - orig_next_t_handle = next_t_handle; - if (next_t_handle == 0) { /* INVALID_HANDLE */ + if (next_t_handle == 0) { /* no free timers left */ if (sts == NU_SUCCESS) NU_Release_Semaphore(&TimSemCB); t_list_access = 0; @@ -308,7 +306,7 @@ timer_e = &TimerTable[next_t_handle]; timer_e->entry.status = 1; timer_e->entry.TimeoutProc = TimeoutProc; - *TimerHandle = orig_next_t_handle; + *TimerHandle = next_t_handle; next_t_handle = timer_e->next_t_handle; used_timers++; if (max_used_timers < used_timers)