bcraig added inline comments. ================ Comment at: src/algorithm.cpp:51 @@ -50,3 +50,3 @@ #ifndef _LIBCPP_HAS_NO_THREADS -static pthread_mutex_t __rs_mut = PTHREAD_MUTEX_INITIALIZER; +static mutex __rs_mut; #endif ---------------- rmaprath wrote: > mclow.lists wrote: > > What happened to the initializer here? > I'm expecting the constructor of `mutex` to be run here at load time (before > `main`). Note that this a libc++ mutex rather than a pthreads mutex (which > does not required a constructor call like this). Would that be too much of an > overhead? std::mutex's default ctor is constexpr. As long as the compiler supports constexpr, this initialization shouldn't require runtime code.
http://reviews.llvm.org/D19412 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits