0

Linuxカーネルで下半分をコーディングするワークキューを学んでいます。割り込みハンドラが 2 回実行された場合 (つまりschedule_work2 回呼び出された場合)、ワーク キュー ハンドラは 1 回または 2 回呼び出されるのでしょうか。

4

1 に答える 1

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);
}
于 2010-08-03T04:07:13.850 に答える