|
@@ -90,6 +90,16 @@ static int _starpu_priority_push_task(struct starpu_task *task)
|
|
|
STARPU_PTHREAD_MUTEX_LOCK(&data->policy_mutex);
|
|
|
_starpu_worker_relax_off();
|
|
|
_starpu_prio_deque_push_back_task(taskq, task);
|
|
|
+
|
|
|
+ if (_starpu_get_nsched_ctxs() > 1)
|
|
|
+ {
|
|
|
+ _starpu_worker_relax_on();
|
|
|
+ _starpu_sched_ctx_lock_write(sched_ctx_id);
|
|
|
+ _starpu_worker_relax_off();
|
|
|
+ starpu_sched_ctx_list_task_counters_increment_all_ctx_locked(task, sched_ctx_id);
|
|
|
+ _starpu_sched_ctx_unlock_write(sched_ctx_id);
|
|
|
+ }
|
|
|
+
|
|
|
starpu_push_task_end(task);
|
|
|
|
|
|
/*if there are no tasks block */
|
|
@@ -140,16 +150,6 @@ static int _starpu_priority_push_task(struct starpu_task *task)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
- if (_starpu_get_nsched_ctxs() > 1)
|
|
|
- {
|
|
|
- _starpu_worker_relax_on();
|
|
|
- _starpu_sched_ctx_lock_write(sched_ctx_id);
|
|
|
- _starpu_worker_relax_off();
|
|
|
- starpu_sched_ctx_list_task_counters_increment_all_ctx_locked(task, sched_ctx_id);
|
|
|
- _starpu_sched_ctx_unlock_write(sched_ctx_id);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|