diff options
author | Ayush Mittal <ayush.m@samsung.com> | 2019-12-31 10:34:34 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-12-31 11:34:34 +0100 |
commit | 2c8297996a7ab3496c5d2f798cdbe4cab749468e (patch) | |
tree | 6e76a6283137e3cd880e1fb35e09e279d7d1adec /libgomp/oacc-init.c | |
parent | e3969868d63b2930a0714ca3cb466831fd4be634 (diff) | |
download | gcc-2c8297996a7ab3496c5d2f798cdbe4cab749468e.tar.gz |
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/oacc-init.c')
-rw-r--r-- | libgomp/oacc-init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c index 487a2cca61f..6aa5fd297d6 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 |