================
Comment at: src/mutex.cpp:224-233
@@ -218,9 +223,11 @@
 void
 __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))
 {
+#ifndef _LIBCPP_HAS_NO_THREADS
     pthread_mutex_lock(&mut);
     while (flag == 1)
         pthread_cond_wait(&cv, &mut);
+#endif // !_LIBCPP_HAS_NO_THREADS
     if (flag == 0)
     {
 #ifndef _LIBCPP_NO_EXCEPTIONS
----------------
Wouldn't it be a lot cleaner to just separate the two implementation entirely 
instead of interweaving them like this?

http://reviews.llvm.org/D3969



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to