[PATCH] D28220: provide Win32 native threading
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 4 19:27:27 PST 2017
compnerd marked 6 inline comments as done.
compnerd added inline comments.
================
Comment at: include/__threading_support:527
+static inline _LIBCPP_ALWAYS_INLINE unsigned int WINAPI
+__libcpp_thread_trampoline(void *__data)
+{
----------------
rnk wrote:
> halyavin wrote:
> > Trampolines will never be inlined. Should we put them in support *.cpp instead? The downside is new public symbols which can't be changed without breaking backward compatibility. The upside is that we will have only one copy of each trampoline. What do you think?
> Considering that libc++ already has a __thread_proxy trampoline, let's just give it the right CC and get rid of this trampoline.
I think I prefer @rnk's solution here. Lets try to use the `__thread_proxy` to hide the thunk.
================
Comment at: include/__threading_support:532
+ _VSTD::free(__data);
+ return reinterpret_cast<unsigned int>(data.__func(data.__arg));
+}
----------------
halyavin wrote:
> Should we even try to pass thread exit code, given that sizeof(unsigned int) < sizeof(void*) on 64-bit system? std::thread doesn't support thread exit code anyway.
Im not sure what the cleanest way to address this is.
Repository:
rL LLVM
https://reviews.llvm.org/D28220
More information about the cfe-commits
mailing list