我正在学习在linux内核中编写下半部分代码的工作队列。我想知道:如果中断处理程序被执行两次(因此调用schedule_work两次),工作队列处理程序是被调用一次还是两次?
发布于 2010-08-03 12:07:14
看起来你的答案在函数的注释中。
/**
* schedule_work - put work task in global workqueue
* @work: job to be done
*
* Returns zero if @work was already on the kernel-global workqueue and
* non-zero otherwise.
*
* This puts a job in the kernel-global workqueue if it was not already
* queued and leaves it in the same position on the kernel-global
* workqueue otherwise.
*/
int schedule_work(struct work_struct *work)
{
return queue_work(keventd_wq, work);
}https://stackoverflow.com/questions/3388386
复制相似问题