FreeBSD/sys/netinet/ip_mroute.c
/*
 * Unschedule the periodic timer that processes bw_meter entry of type "<="
 * by removing the entry from the proper hash bucket.
 */
Unschedule the periodic timer that processes bw_meter entry of type "<="
by removing the entry from the proper hash bucket.
Unschedule the periodic timer that processes bw_meter entry of type " < = " by removing the entry from the proper hash bucket .
static void
unschedule_bw_meter(struct bw_meter *x)
{
    int time_hash;
    struct bw_meter *prev, *tmp;
    MFC_LOCK_ASSERT();
    if (!(x->bm_flags & BW_METER_LEQ))
	return;		
    time_hash = x->bm_time_hash;
    if (time_hash >= BW_METER_BUCKETS)
	return;		
    for (prev = NULL, tmp = V_bw_meter_timers[time_hash];
	     tmp != NULL; prev = tmp, tmp = tmp->bm_time_next)
	if (tmp == x)
	    break;
    if (tmp == NULL)
	panic("unschedule_bw_meter: bw_meter entry not found");
    if (prev != NULL)
	prev->bm_time_next = x->bm_time_next;
    else
	V_bw_meter_timers[time_hash] = x->bm_time_next;
    x->bm_time_next = NULL;
    x->bm_time_hash = BW_METER_BUCKETS;
}
static void unschedule_bw_meter ( struct bw_meter * x ) { int time_hash ; struct bw_meter * prev , * tmp ; MFC_LOCK_ASSERT ( ) ; if ( ! ( x -> bm_flags & BW_METER_LEQ ) ) return ; time_hash = x -> bm_time_hash ; if ( time_hash >= BW_METER_BUCKETS ) return ; for ( prev = NULL , tmp = V_bw_meter_timers [ time_hash ] ; tmp != NULL ; prev = tmp , tmp = tmp -> bm_time_next ) if ( tmp == x ) break ; if ( tmp == NULL ) panic ( " " ) ; if ( prev != NULL ) prev -> bm_time_next = x -> bm_time_next ; else V_bw_meter_timers [ time_hash ] = x -> bm_time_next ; x -> bm_time_next = NULL ; x -> bm_time_hash = BW_METER_BUCKETS ; }
Unschedule the periodic timer that processes bw_meter entry of type "<="
 by removing the entry from the proper hash bucket.
Unschedule the periodic timer that processes bw_meter entry of type " < = " by removing the entry from the proper hash bucket .
/* XXX: we schedule timers only for "<=" entries */ /*
     * Compute the timeout hash value and delete the entry
     */ /* Entry was not scheduled */