参照元†
返り値†
- int
- 仕事をキューに追加した場合は 1、
キューに追加しなかった場合は 0(既にキューに追加されているなど)
/**
* 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);
- keventd_wq は static 変数、workqueue_struct 型、init_workqueues() で作成。
- システムのワークキューに仕事を追加する。
}
EXPORT_SYMBOL(schedule_work);
コメント†