[cfe-dev] [libcxx][libcxxabi] Use of thread_local in libcxxabi
Craig, Ben via cfe-dev
cfe-dev at lists.llvm.org
Tue Apr 26 07:14:15 PDT 2016
There isn't much TLS stuff in libcxx, and what is there isn't terribly
suitable for the thread_local keyword.
The biggest usage of TLS in libcxx involves TLS destructors. There are
several things that a thread needs to do on exit (
notify_all_at_thread_exit, set_value_at_thread_exit,
make_ready_at_thread_exit), and libcxx implements most of those things
in terms of TLS destructors.
Destructors for pthread_tls is also typically more widely supported than
destructors for thread_local objects.
On 4/26/2016 7:20 AM, Asiri Rathnayake via cfe-dev wrote:
> Hi Marshall,
>
> (Guess you are back in the sunny part of the world? ;))
>
> So, I noted that there is a bit of code in libcxxabi
> (cxa_exception_storage.cpp) that uses thread_local (if explicitly
> enabled). I'm wondering why we don't give this option in libcxx? It
> seems we always delegate all TLS stuff in libcxx to pthreads.
>
> Thanks!
>
> - Asiri
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160426/abc15587/attachment.html>
More information about the cfe-dev
mailing list