[PATCH] D52251: [builtins] Add __emutls_unregister_key function

Yi Kong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 15:00:15 PDT 2018


kongyi updated this revision to Diff 166188.
kongyi marked 2 inline comments as done.

Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D52251

Files:
  lib/builtins/emutls.c


Index: lib/builtins/emutls.c
===================================================================
--- lib/builtins/emutls.c
+++ lib/builtins/emutls.c
@@ -390,3 +390,11 @@
         array->data[index] = emutls_allocate_object(control);
     return array->data[index];
 }
+
+#ifdef __BIONIC__
+/* Called by Bionic on dlclose to delete the emutls pthread key. */
+__attribute__((visibility("hidden")))
+void __emutls_unregister_key(void) {
+    pthread_key_delete(emutls_pthread_key);
+}
+#endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52251.166188.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180919/52460348/attachment.bin>


More information about the llvm-commits mailing list