rem: lock( timers->mutex ); if ( tl->prev_tl ) tl->prev_tl->next_tl = tl->next_tl; else timers->first_tl = tl->next_tl; if ( tl->next_tl ) tl->next_tl->prev_tl = tl->prev_tl; else timers->last_tl = tl->prev_tl; unlock( timers->mutex ); tl->next_tl = 0; tl->prev_tl = 0;
add: lock( timer_list->mutex );   if ( is_in_timer_list( tl,list_id)  ) { remove_from_timer_list_dummy( hash_table , tl , list_id); }   unlock( timer_list->mutex );
context: void remove_from_timer_list( struct s_table* hash_table , struct timer_link* tl , int list_id){   struct timer* timers=&(hash_table->timers[ list_id ]);   DBG("DEBUG: remove_from_timer[%d]: %d, %p \n",list_id,tl->time_out,tl);      lock( timers->mutex );      if ( tl->prev_tl )         tl->prev_tl->next_tl = tl->next_tl;      else         timers->first_tl = tl->next_tl;      if ( tl->next_tl )         tl->next_tl->prev_tl = tl->prev_tl;      else         timers->last_tl = tl->prev_tl;      unlock( timers->mutex );      tl->next_tl = 0;      tl->prev_tl = 0;}