Ver código fonte

do not wake workers when macro STARPU_NON_BLOCKING_DRIVERS is not set

Pierre-André Wacrenier 12 anos atrás
pai
commit
5a626f84cc

+ 3 - 1
src/sched_policies/eager_central_policy.c

@@ -74,6 +74,8 @@ static int push_task_eager_policy(struct starpu_task *task)
 	starpu_push_task_end(task);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&data->policy_mutex);
 
+#ifndef STARPU_NON_BLOCKING_DRIVERS
+
 	/*if there are no tasks block */
 	/* wake people waiting for a task */
 	unsigned worker = 0;
@@ -93,7 +95,7 @@ static int push_task_eager_policy(struct starpu_task *task)
 		if (starpu_wakeup_worker(worker, sched_cond, sched_mutex))
 		    break; // wake up a single worker
 	}
-
+#endif
 	return ret_val;
 }
 

+ 2 - 0
src/sched_policies/eager_central_priority_policy.c

@@ -119,6 +119,7 @@ static int _starpu_priority_push_task(struct starpu_task *task)
 	starpu_push_task_end(task);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&data->policy_mutex);
 
+#ifndef STARPU_NON_BLOCKING_DRIVERS
 	/*if there are no tasks block */
 	/* wake people waiting for a task */
 	unsigned worker = 0;
@@ -139,6 +140,7 @@ static int _starpu_priority_push_task(struct starpu_task *task)
 		    break; // wake up a single worker
 	}
 
+#endif
 	return 0;
 }