【问题标题】:Multiple queueing and working queues多个排队和工作队列
【发布时间】:2010-08-02 13:50:33
【问题描述】:

我正在学习工作队列以在 linux 内核中编写下半部分代码。 我想知道:如果中断处理程序被执行两次(因此调用schedule_work 两次),工作队列处理程序是被调用一次还是两次?

【问题讨论】:

    标签: linux-kernel interrupt-handling


    【解决方案1】:

    您的答案似乎在函数的评论中。

    /**
     * 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);
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-31
      • 2018-06-20
      • 1970-01-01
      • 2013-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多