Prechádzať zdrojové kódy

Make starpu_wakeup_worker also wake the simgrid wait queues

Samuel Thibault 9 rokov pred
rodič
commit
df4ee93244
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      src/core/workers.c

+ 3 - 3
src/core/workers.c

@@ -1913,6 +1913,9 @@ int starpu_wakeup_worker(int workerid, starpu_pthread_cond_t *cond, starpu_pthre
 {
 	int success = 0;
 	STARPU_PTHREAD_MUTEX_LOCK(mutex);
+#ifdef STARPU_SIMGRID
+	starpu_pthread_queue_broadcast(&_starpu_simgrid_task_queue[workerid]);
+#endif
 	if (config.workers[workerid].status == STATUS_SLEEPING)
 	{
 		config.workers[workerid].status = STATUS_WAKING_UP;
@@ -1929,9 +1932,6 @@ int starpu_wake_worker(int workerid)
 	starpu_pthread_cond_t *sched_cond;
 	starpu_worker_get_sched_condition(workerid, &sched_mutex, &sched_cond);
 
-#ifdef STARPU_SIMGRID
-	starpu_pthread_queue_broadcast(&_starpu_simgrid_task_queue[workerid]);
-#endif
 	return starpu_wakeup_worker(workerid, sched_cond, sched_mutex);
 }