[PATCH] D11781: Refactored pthread usage in libcxx
Fulvio Esposito via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 19 02:39:48 PDT 2015
espositofulvio added inline comments.
================
Comment at: include/__mutex_base:36
@@ -35,3 +37,3 @@
#else
- mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;}
#endif
----------------
EricWF wrote:
> Why was the cast insignificant?
The cast was significant, but it's not needed anymore. PTHREAD_MUTEX_INITIALIZER can be only used in initialization expression, not regular assignment and that's why there was the cast. But now I'm assigning an already-initialized mutex:
_LIBCPP_CONSTEXPR pthread_mutex_t __os_mutex_init = PTHREAD_MUTEX_INITIALIZER;
thus the cast is not needed anymore.
Repository:
rL LLVM
http://reviews.llvm.org/D11781
More information about the cfe-commits
mailing list