aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-07-11 19:23:37 (GMT)
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-07-11 19:23:37 (GMT)
commita74813a825e49267faa0b2ba45e9cd4bd6ccf4f4 (patch)
tree3a85e1af15e56dc674f18caee8621c60d3705469
parent4089f56e6c7438eb98cb86c249cf0c01e22219c5 (diff)
parent89b2029895df0a3f3587eeba0a519091c3f7a1b5 (diff)
downloadtoolchain_gcc-a74813a825e49267faa0b2ba45e9cd4bd6ccf4f4.zip
toolchain_gcc-a74813a825e49267faa0b2ba45e9cd4bd6ccf4f4.tar.gz
toolchain_gcc-a74813a825e49267faa0b2ba45e9cd4bd6ccf4f4.tar.bz2
Merge "Add __emutls_unregister_key function"
-rw-r--r--gcc-4.9/libgcc/emutls.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc-4.9/libgcc/emutls.c b/gcc-4.9/libgcc/emutls.c
index 525db28..93c3c07 100644
--- a/gcc-4.9/libgcc/emutls.c
+++ b/gcc-4.9/libgcc/emutls.c
@@ -121,12 +121,15 @@ emutls_init (void)
emutls_key_created = 1;
}
-__attribute__((destructor))
-static void
-unregister_emutls_key (void)
+__attribute__((visibility("hidden")))
+void
+__emutls_unregister_key (void)
{
if (emutls_key_created)
- __gthread_key_delete (emutls_key);
+ {
+ emutls_key_created = 0;
+ __gthread_key_delete (emutls_key);
+ }
}
#endif