在持有spin_lock_irqsave的同时杀死一个tasklet

时间:2017-09-26 13:45:53

标签: kernel spinlock tasklet

我使用以下API来杀死一个tasklet:

tasklet_kill();

在杀死tasklet时,我使用spin_lock_irqsave禁用了本地中断。为什么内核会抛出以下消息(警告?):

Attempt to kill tasklet from interrupt

在举行spin_lock时不建议使用tasklet_kill()吗?

1 个答案:

答案 0 :(得分:0)

如果你看一下func本身,你会发现它有一个yield的调用,它可以放弃cpu。但禁止禁用中断和/或保持旋转锁定禁止使用。