|
@@ -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
|