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);
}
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);
}
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits