|
@@ -3334,6 +3334,7 @@ the StarPU sources in the directory @code{examples/scheduler/}.
|
|
|
|
|
|
@menu
|
|
|
* struct starpu_sched_policy_s::
|
|
|
+* starpu_worker_set_sched_condition::
|
|
|
* Source code::
|
|
|
@end menu
|
|
|
|
|
@@ -3365,6 +3366,26 @@ TODO
|
|
|
@end table
|
|
|
@end table
|
|
|
|
|
|
+
|
|
|
+@node starpu_worker_set_sched_condition
|
|
|
+@subsection @code{starpu_worker_set_sched_condition} -- Specify the condition variable associated to a worker
|
|
|
+@table @asis
|
|
|
+@item @emph{Description}:
|
|
|
+When there is no available task for a worker, StarPU blocks this worker on a
|
|
|
+condition variable. This function specifies which condition variable (and the
|
|
|
+associated mutex) should be used to block (and to wake up) a worker. Note that
|
|
|
+multiple workers may use the same condition variable. For instance, in the case
|
|
|
+of a scheduling strategy with a single task queue, the same condition variable
|
|
|
+would be used to block and wake up all workers.
|
|
|
+The initialization method of a scheduling strategy (@code{init_sched}) must
|
|
|
+call this function once per worker.
|
|
|
+
|
|
|
+@item @emph{Prototype}:
|
|
|
+@code{void starpu_worker_set_sched_condition(int workerid, pthread_cond_t *sched_cond, pthread_mutex_t *sched_mutex);}
|
|
|
+@end table
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@node Source code
|
|
|
@subsection Source code
|
|
|
|