kernel/kernel/softirq.c
/*
 * tasklet_kill_immediate is called to remove a tasklet which can already be
 * scheduled for execution on @cpu.
 *
 * Unlike tasklet_kill, this function removes the tasklet
 * _immediately_, even if the tasklet is in TASKLET_STATE_SCHED state.
 *
 * When this function is called, @cpu must be in the CPU_DEAD state.
 */
tasklet_kill_immediate is called to remove a tasklet which can already be
scheduled for execution on @cpu.

Unlike tasklet_kill, this function removes the tasklet
_immediately_, even if the tasklet is in TASKLET_STATE_SCHED state.

When this function is called, @cpu must be in the CPU_DEAD state.
tasklet_kill_immediate is called to remove a tasklet which can already be scheduled for execution on @cpu . Unlike tasklet_kill this function removes the tasklet _immediately_ even if the tasklet is in TASKLET_STATE_SCHED state . When this function is called @cpu must be in the CPU_DEAD state .
void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu)
{
	struct tasklet_struct **i;
	BUG_ON(cpu_online(cpu));
	BUG_ON(test_bit(TASKLET_STATE_RUN, &t->state));
	if (!test_bit(TASKLET_STATE_SCHED, &t->state))
		return;
	for (i = &per_cpu(tasklet_vec, cpu).head; *i; i = &(*i)->next) {
		if (*i == t) {
			*i = t->next;
			if (*i == NULL)
				per_cpu(tasklet_vec, cpu).tail = i;
			return;
		}
	}
	BUG();
}
void tasklet_kill_immediate ( struct tasklet_struct * t , unsigned int cpu ) { struct tasklet_struct * * i ; BUG_ON ( cpu_online ( cpu ) ) ; BUG_ON ( test_bit ( TASKLET_STATE_RUN , & t -> state ) ) ; if ( ! test_bit ( TASKLET_STATE_SCHED , & t -> state ) ) return ; for ( i = & per_cpu ( tasklet_vec , cpu ) . head ; * i ; i = & ( * i ) -> next ) { if ( * i == t ) { * i = t -> next ; if ( * i == NULL ) per_cpu ( tasklet_vec , cpu ) . tail = i ; return ; } } BUG ( ) ; }
tasklet_kill_immediate is called to remove a tasklet which can already be
 scheduled for execution on @cpu.
tasklet_kill_immediate is called to remove a tasklet which can already be scheduled for execution on @cpu .
/* CPU is dead, so no lock needed. */ /* If this was the tail element, move the tail ptr */