Browse Source

omp: refactor MASTER constructs

Samuel Pitoiset 9 years ago
parent
commit
8edebb824c
1 changed files with 1 additions and 9 deletions
  1. 1 9
      src/util/openmp_runtime_support.c

+ 1 - 9
src/util/openmp_runtime_support.c

@@ -1282,16 +1282,8 @@ void starpu_omp_barrier(void)
 
 void starpu_omp_master(void (*f)(void *arg), void *arg)
 {
-	struct starpu_omp_task *task = STARPU_PTHREAD_GETSPECIFIC(omp_task_key);
-	struct starpu_omp_thread *thread = STARPU_PTHREAD_GETSPECIFIC(omp_thread_key);
-	/* Assume master is performed in by the implicit tasks of a region */
-	STARPU_ASSERT(task->is_implicit);
-	struct starpu_omp_region *region = task->owner_region;
-
-	if (thread == region->master_thread)
-	{
+	if (starpu_omp_master_inline())
 		f(arg);
-	}
 }
 
 /* variant of omp_master for inlined code