Samuel Thibault 8 gadi atpakaļ
vecāks
revīzija
e594c562cd
1 mainītis faili ar 4 papildinājumiem un 10 dzēšanām
  1. 4 10
      src/core/workers.c

+ 4 - 10
src/core/workers.c

@@ -1478,14 +1478,10 @@ static void _starpu_terminate_workers(struct _starpu_machine_config *pconfig)
 		{
 			if (set->started)
 			{
-#ifdef STARPU_SIMGRID
-				status = starpu_pthread_join(set->worker_thread, NULL);
-#else
+#ifndef STARPU_SIMGRID
 				if (!pthread_equal(pthread_self(), set->worker_thread))
-				{
-					status = starpu_pthread_join(set->worker_thread, NULL);
-				}
 #endif
+					status = starpu_pthread_join(set->worker_thread, NULL);
 				if (status)
 				{
 #ifdef STARPU_VERBOSE
@@ -1500,12 +1496,10 @@ static void _starpu_terminate_workers(struct _starpu_machine_config *pconfig)
 			if (!worker->run_by_starpu)
 				goto out;
 
-#ifdef STARPU_SIMGRID
-			status = starpu_pthread_join(worker->worker_thread, NULL);
-#else
+#ifndef STARPU_SIMGRID
 			if (!pthread_equal(pthread_self(), worker->worker_thread))
-				status = starpu_pthread_join(worker->worker_thread, NULL);
 #endif
+				status = starpu_pthread_join(worker->worker_thread, NULL);
 			if (status)
 			{
 #ifdef STARPU_VERBOSE