rem: while ( timers[ id ].first_tl && timers[ id ].first_tl->time_out <= ticks ) { tl = remove_from_timer_list_from_head( hash_table, id ); timers[id].timeout_handler( tl->payload ); }
add: { tl = check_and_split_time_list( hash_table, id , ticks ); while (tl) { tmp_tl = tl->next_tl; tl->next_tl = tl->prev_tl =0 ; timers[id].timeout_handler( tl->payload ); tl = tmp_tl; } }
context: void timer_routine(unsigned int ticks , void * attr){   struct s_table      *hash_table = (struct s_table *)attr;   struct timer*         timers= hash_table->timers;   struct timer_link* tl;   int                           id;   DBG("%d\n", ticks);   for( id=0 ; id<NR_OF_TIMER_LISTS ; id++ )         while ( timers[ id ].first_tl && timers[ id ].first_tl->time_out <= ticks )         {            tl = remove_from_timer_list_from_head( hash_table, id );            timers[id].timeout_handler( tl->payload );         }}