开发者

Multiple queueing and working queues

开发者 https://www.devze.com 2023-01-10 01:46 出处:网络
I\'m learning the Work queues to开发者_StackOverflow社区 code bottom halves in the linux kernel.

I'm learning the Work queues to开发者_StackOverflow社区 code bottom halves in the linux kernel. I wonder: if the interrupt handler is executed two times (thus calling schedule_work two times), does the work queue handler be called once or twice?


Looks like your answer is in the comment for the function.

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

精彩评论

暂无评论...
验证码 换一张
取 消