2010-08-02 2 views
0

Linux 커널의 하단 절반을 코딩하기 위해 작업 대기열을 배우고 있습니다. 궁금합니다 : 인터럽트 처리기가 두 번 실행되므로 (따라서 schedule_work을 두 번 호출합니다) 작업 대기열 처리기를 한 번 또는 두 번 호출합니까?여러 대기열 및 작업 대기열

답변

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