History

workqueue: Clarify that schedule_on_each_cpu is synchronous

The documentation for schedule_on_each_cpu() states that it calls a function on each online CPU from keventd. This can easily be interpreted as an asyncronous call because the description does not mention that flush_work is called. Clarify that it is synchronous. tj: rephrased a bit

Tejun Heo committed 16 years ago

Commit 31ddd871 parent 10ccd841 file · +6 −4Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+6−4
@@ -2676,13 +2676,15 @@ int schedule_delayed_work_on(int cpu, · 2675 unmodified lines
26762676 EXPORT_SYMBOL(schedule_delayed_work_on);
26772677
26782678 /**
2679− * schedule_on_each_cpu - call a function on each online CPU from keventd
2679+ * schedule_on_each_cpu - execute a function synchronously on each online CPU
26802680 * @func: the function to call
26812681 *
2682− * Returns zero on success.
2683− * Returns -ve errno on failure.
2684− *
2682+ * schedule_on_each_cpu() executes @func on each online CPU using the
2683+ * system workqueue and blocks until all CPUs have completed.
26852684 * schedule_on_each_cpu() is very slow.
2685+ *
2686+ * RETURNS:
2687+ * 0 on success, -errno on failure.
26862688 */
26872689 int schedule_on_each_cpu(work_func_t func)
26882690 {