[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 (
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.
> - Asiri
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
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...
More information about the cfe-dev