]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
multi.c: Remove static variables _gfortrani_caf_this_image and caf_num_images. devel/gfortran-caf
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 2 Sep 2018 20:10:58 +0000 (20:10 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 2 Sep 2018 20:10:58 +0000 (20:10 +0000)
2018-09-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
* caf/multi.c: Remove static variables _gfortrani_caf_this_image
and caf_num_images.
* runtime/environ.c: Add caf_num_images.
* runtime/compile_options.c: Add _gfortrani_caf_this_image.

From-SVN: r264045

libgfortran/ChangeLog.dev
libgfortran/caf/multi.c
libgfortran/runtime/compile_options.c
libgfortran/runtime/environ.c

index b051202f12f168488521bd30ab41e3d3d5a28030..1bdd4e57b2ec375f1668cd85e6befcd962e58d04 100644 (file)
@@ -1,3 +1,9 @@
+2018-09-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
+       * caf/multi.c: Remove static variables _gfortrani_caf_this_image
+       and caf_num_images.
+       * runtime/environ.c: Add caf_num_images.
+       * runtime/compile_options.c: Add _gfortrani_caf_this_image.
+
 2018-09-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        * caf/multi.c (_gfortran_caf_register): New function.
index f4a700ce88f1ecb7d17033700b7ab25f0a2fc83c..474b8f5f32c5c893236648eaac54c4176cc2b215 100644 (file)
@@ -59,8 +59,6 @@ typedef struct cond_t {
 
 /* Static variables.  */
 
-__thread int _gfortrani_caf_this_image = -1;
-int caf_num_images = -1;
 pthread_barrier_t sync_all_barrier;
 pthread_t *tidlist;
 
index ef8777e1505378bd24c286acbd073d2549dd2bd0..8b46a9c10f33838a8c6302d2af056b23e75cad58 100644 (file)
@@ -142,6 +142,10 @@ backtrace_handler (int signum)
 extern void set_options (int , int []);
 export_proto(set_options);
 
+/* Thread-local storage which image we are in.  */
+
+__thread int _gfortrani_caf_this_image = -1;
+
 void
 set_options (int num, int options[])
 {
index c65754b73ef47cf4cae26cfc0174aae844d5b54e..5fa12bdb4094ecf6ac5d82bba02a97208192cb57 100644 (file)
@@ -32,6 +32,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include <unistd.h>
 #endif
 
+int caf_num_images = -1;
 
 /* Implementation of secure_getenv() for targets where it is not
    provided. */