[PATCH] D48743: Make pthread's __libcpp_get_tls declaration consistent

Pirama Arumuga Nainar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 14:32:56 PDT 2018


pirama created this revision.
pirama added reviewers: EricWF, srhines, danalbert.
Herald added subscribers: ldionne, christof.

Add the _LIBCPP_TLS_DESTRUCTOR_CC attribute to the __at_exit parameter
for the pthread definition of __libcpp_get_tls.  This makes it
consistent with the rest (the non-pthread declaration in
include/__threading_support, and calls in include/thread and
srcsrc/support/win32/thread_win32.cpp).

This has NFC because _LIBCPP_TLS_DESTRUCTOR_CC is empty when pthread is
available.


Repository:
  rCXX libc++

https://reviews.llvm.org/D48743

Files:
  include/__threading_support


Index: include/__threading_support
===================================================================
--- include/__threading_support
+++ include/__threading_support
@@ -376,7 +376,8 @@
 }
 
 // Thread local storage
-int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
+int __libcpp_tls_create(__libcpp_tls_key *__key,
+                        void (_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void *))
 {
   return pthread_key_create(__key, __at_exit);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48743.153398.patch
Type: text/x-patch
Size: 476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180628/c2b62c83/attachment-0001.bin>


More information about the cfe-commits mailing list