浏览代码

src/util/openmp_runtime_support: make available variables which are needed in drivers/mp_common

Nathalie Furmento 6 年之前
父节点
当前提交
9c01362e36
共有 2 个文件被更改,包括 6 次插入3 次删除
  1. 2 2
      src/util/openmp_runtime_support.c
  2. 4 1
      src/util/openmp_runtime_support.h

+ 2 - 2
src/util/openmp_runtime_support.c

@@ -38,8 +38,8 @@
 #define _STARPU_INITIAL_THREAD_STACKSIZE 2097152
 
 static struct starpu_omp_global _global_state;
-static starpu_pthread_key_t omp_thread_key;
-static starpu_pthread_key_t omp_task_key;
+starpu_pthread_key_t omp_thread_key;
+starpu_pthread_key_t omp_task_key;
 
 struct starpu_omp_global *_starpu_omp_global_state = NULL;
 double _starpu_omp_clock_ref = 0.0; /* clock reference for starpu_omp_get_wtick */

+ 4 - 1
src/util/openmp_runtime_support.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2014,2015,2017                           CNRS
+ * Copyright (C) 2014,2015,2017,2019                      CNRS
  * Copyright (C) 2014-2018                                Inria
  * Copyright (C) 2015,2016                                Université de Bordeaux
  *
@@ -36,6 +36,9 @@
 #endif
 #include <ucontext.h>
 
+extern starpu_pthread_key_t omp_thread_key;
+extern starpu_pthread_key_t omp_task_key;
+
 /*
  * Arbitrary limit on the number of nested parallel sections
  */