瀏覽代碼

Simplify code

Samuel Thibault 8 年之前
父節點
當前提交
e594c562cd
共有 1 個文件被更改,包括 4 次插入10 次删除
  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