<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>There isn't much TLS stuff in libcxx, and what is there isn't
terribly suitable for the thread_local keyword.</p>
<p>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.</p>
<p>Destructors for pthread_tls is also typically more widely
supported than destructors for thread_local objects.<br>
</p>
<div class="moz-cite-prefix">On 4/26/2016 7:20 AM, Asiri Rathnayake
via cfe-dev wrote:<br>
</div>
<blockquote
cite="mid:CAGhzUqLqeFPeS5kkVFkBMWRBkh5tf=osg4PexBrAoNGSkHZPZg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Marshall,
<div><br>
</div>
<div>(Guess you are back in the sunny part of the world? ;))</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>- Asiri</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
</pre>
</body>
</html>