I can remove the np.  I thought it might be useful since osx threads are not globally unique, but i think it's fine to remove it.<br><br>I think I've addressed pretty much everything, so I'll try to submit this later today if there's no further comments <br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 3, 2017 at 4:34 AM Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added a comment.<br class="gmail_msg">
<br class="gmail_msg">
Thank you, it looks much better. Let me know what you think about the name.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: llvm/include/llvm/Support/Threading.h:133<br class="gmail_msg">
+<br class="gmail_msg">
+  uint64_t get_threadid_np();<br class="gmail_msg">
+<br class="gmail_msg">
----------------<br class="gmail_msg">
I'd remove the `_np` suffix. It is present on the pthread functions to differentiate them from other `pthread_***` functions, which are expected to behave the same on all conforming implementations. Since the purpose of this function is to provide a *portable* wrapper around different versions of those functions, having the suffix here seems wrong.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: llvm/lib/Support/Unix/Threading.inc:100<br class="gmail_msg">
+#else<br class="gmail_msg">
+  return uint64_t(pthread_self());<br class="gmail_msg">
+#endif<br class="gmail_msg">
----------------<br class="gmail_msg">
I am wondering whether this is a useful fallback. pthread_t is used in completely different contexts than OS-level thread handles, so it may be better to just return 0 or something here. I don't feel strongly about it though.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D30526" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D30526</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>