spin_unlock_irqrestore(&mdp_spin_lock, flag);if(need_wait)wait_for_completion_killable(&mfd->dma->comp);#ifdefined (CONFIG_MACH_KYLEPLUS_CTC)/* wait until Vsync finishes the current job */if(first_vsync) {if(!wait_for_completion_killable_timeout (&vsync_cntrl.vsync_comp, HZ/10))...
其他变体包括使用TASK_KILLABLE作为指定任务状态的_killable,如果被中断则返回-ERESTARTSYS,否则如果完成被实现则返回0。还有一个_timeout变体: longwait_for_completion_killable(structcompletion *done) longwait_for_completion_killable_timeout(structcompletion *done,unsignedlongtimeout) _io变体wait_for_completion_i...
* wait_for_completion_killable_timeout: - waits for completion of a task (w/(to,killable)) * @x: holds the state of this particular completion * @timeout: timeout value in jiffies * * This waits for either a completion of a specific task to be * signaled or for a specified timeou...
(2) wait_for_completion_timeout表示等待事件的发生,并且提供超时设置,如果超过了这一设置,则取消等待,可防止无限等待;如果在超时之前完成则返回剩余时间,否则返回0。 (3) wait_for_completion_killable表示可以由kill信号中断。 其他函数均是这三者的变种。 三、唤醒进程 进程唤醒,可以通过以下函数实现: extern voi...
在使用wait_for_completion()的_timeout()或_killable()/_interruptible()变体时,应特别小心,因为必须确保在所有相关活动(complete()或reinit_completion())发生之前不会发生内存释放,即使这些等待函数由于超时或信号触发而提前返回。 通过调用init_completion()来初始化动态分配的完成对象: ...
wait_for_completion_killable_timeout wait_for_completion_killable_timeout: - waits for completion of a task (w/(to,killable))*@x: holds the state of this particular completion*@timeout: timeout value in jiffies* This waits for either a completion of a specific task to be源...
returnwait_for_common(x, timeout, TASK_INTERRUPTIBLE); } int__sched wait_for_completion_killable(structcompletion *x) { <span style="white-space:pre"> </span>longt = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_KILLABLE); <span style="white-space:pre"> </span>if(t == -ERESTARTS...
struct completion *x, unsigned long timeout); extern long wait_for_completion_killable_timeout( struct completion *x, unsigned long timeout); extern bool try_wait_for_completion(struct completion *x); extern bool completion_done(struct completion *x); 4 changes: 2 additions & 2 deletions 4...
struct completion *x, unsigned long timeout); extern unsigned long wait_for_completion_killable_timeout( struct completion *x, unsigned long timeout); extern long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout); extern long wait_for_completion_killable_time...