<div dir="ltr"><div class="gmail_extra">Hi Nico<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
It's not intended as a pthreads port, and the features are far from complete for that. For one, there's no single mutex type for recursive and non-recursive mutexes. If someone is so inclined he can force usage of pthreads and use an external lib. Mimicking pthreads but only implementing a small part of it will only lead to problems.<br>
</blockquote><div>Ok fair enough, others have alluded to a similar view point.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">

<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
* The _LIBCPP_PTHREADS macro name is a little confusing to me. I think it<br>
means, "use the existing path that say libcxx uses for pthreads today,<br>
otherwise using the new / built in one".<br>
</blockquote>
<br>
It just means "use pthreads". It's never used in negative checks, and the second path is always conditioned on _WIN32 being defined.<br></blockquote><div>ok.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">

<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
* The inline assembler might be able to be factored out, or out more:<br>
The win32 platform and clang appear to support the intrinsic bit test<br>
functions and see their are psdk intrinsics that provide the same thing.<br>
</blockquote>
<br>
Last I checked Clang doesn't support the MSVC bts intrinsic.<br></blockquote><div>Are you sure? The Windows platform will though right?, just #if pthread, #elif _WIN32 #else #error should get the right result I think. If not. if this is the right asm code, perhaps we should get this intrinsic added to clang. I'm not saying you should do this, but I think that should be the aim (advice please clang devs). I feel strongly against inline asm in libcxx if it can at all be avoided.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<br>
Patch 2 adds ntdll.dll to the linker so not sure what's going wrong there.<br>
<br></blockquote></blockquote><div>Try as it might, I couldn't get this to work without manually adding it here. I tried all kinds of cmake stuff and nothing worked. I'm sure it's a simple two lines once you know what the two lines are. I didn't see anything in the patch, maybe I have patch 1 or something. I'll look for it again.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">

</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
Too bad Phabricator doesn't support patch chains so you have to mash everything together. Multiple Phab entries that depend on each other are also a PITA.<br></blockquote></blockquote><div> </div><div><div>Talking of Phabricator, I thought the whole point of the internet was nobody knows you are a dog. If my dog wants to write a review for me, why not? Can we remove these restrictions on having to divulge age, gender, and photo please etc.? I find them unwanted and unnecessary. It's starting to take the fun out of contributing to anything having the "system" try to take more than I'm already giving. This isn't facebook nor should it be. Thanks</div>
 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">

<br>
Thanks for looking at this.<span><font color="#888888"><br>
-Nico<br></font></span></blockquote></blockquote><div> </div><div>Thanks for working on this. </div><div>PS Can you add this to the chrono patch, otherwise it derails g++. Similar I couldn't make g++ stop warning on all the #pragma diagnostic things in win.h. If you try a g++ build you will see.</div>
<div>+    typedef chrono::duration<long long, ratio<1, 10000000> > duration;</div><div> </div><div>Thanks - GM's dog.<br><br></div></div></div></div>