aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2018-09-02 20:10:58 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2018-09-02 20:10:58 +0000
commit6857bd99f3922f57dd94aaf675c0cb5f0dcfd24b (patch)
tree7cdf3a1e38e2ccfa63060af300a6097d2efb3cf7 /libgfortran/runtime
parent8d3339526af25cd65f0d99ba6d2a05b37b61e1d0 (diff)
downloadgcc-devel/gfortran-caf.zip
gcc-devel/gfortran-caf.tar.gz
gcc-devel/gfortran-caf.tar.bz2
multi.c: Remove static variables _gfortrani_caf_this_image and caf_num_images.devel/gfortran-caf
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
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/compile_options.c4
-rw-r--r--libgfortran/runtime/environ.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c
index ef8777e..8b46a9c 100644
--- a/libgfortran/runtime/compile_options.c
+++ b/libgfortran/runtime/compile_options.c
@@ -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[])
{
diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c
index c65754b..5fa12bd 100644
--- a/libgfortran/runtime/environ.c
+++ b/libgfortran/runtime/environ.c
@@ -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. */