首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >多个排队和工作队列

多个排队和工作队列
EN

Stack Overflow用户
提问于 2010-08-02 21:50:34
回答 1查看 2K关注 0票数 0

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-08-03 12:07:14

看起来你的答案在函数的注释中。

代码语言:javascript
复制
/**
 * 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);
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3388386

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档