aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorAyush Mittal <ayush.m@samsung.com>2019-12-31 10:34:34 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2019-12-31 11:34:34 +0100
commit2c8297996a7ab3496c5d2f798cdbe4cab749468e (patch)
tree6e76a6283137e3cd880e1fb35e09e279d7d1adec /libgomp
parente3969868d63b2930a0714ca3cb466831fd4be634 (diff)
downloadgcc-2c8297996a7ab3496c5d2f798cdbe4cab749468e.zip
gcc-2c8297996a7ab3496c5d2f798cdbe4cab749468e.tar.gz
gcc-2c8297996a7ab3496c5d2f798cdbe4cab749468e.tar.bz2
re PR libgomp/93065 (libgomp: destructor missing to delete goacc_cleanup_key)
PR libgomp/93065 * oacc-init.c (goacc_runtime_deinitialize): New function. From-SVN: r279803
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/oacc-init.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 9eb3e2c..a18868b 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-31 Ayush Mittal <ayush.m@samsung.com>
+
+ PR libgomp/93065
+ * oacc-init.c (goacc_runtime_deinitialize): New function.
+
2019-12-28 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/93074
diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c
index 487a2cc..6aa5fd2 100644
--- a/libgomp/oacc-init.c
+++ b/libgomp/oacc-init.c
@@ -858,6 +858,15 @@ goacc_runtime_initialize (void)
goacc_host_init ();
}
+static void __attribute__((destructor))
+goacc_runtime_deinitialize (void)
+{
+#if !(defined HAVE_TLS || defined USE_EMUTLS)
+ pthread_key_delete (goacc_tls_key);
+#endif
+ pthread_key_delete (goacc_cleanup_key);
+}
+
/* Compiler helper functions */
attribute_hidden void