[PATCH] Replace all standard mutexes with equivalent stl mutexes.

Zachary Turner zturner at google.com
Thu Jun 19 15:55:26 PDT 2014


================
Comment at: lib/Support/Unix/Process.inc:268
@@ -268,3 +267,3 @@
   // First, acquire a global lock because these C routines are thread hostile.
-  static sys::Mutex M;
-  MutexGuard G(M);
+  static std::recursive_mutex M;
+  std::lock_guard<std::recursive_mutex> G(M);
----------------
Chandler Carruth wrote:
> This looks like a bug on Windows, might be worth moving to a managed static.
If you mean because of MSVC's lack of thread-safe function local statics, this is a unix-specific file.

http://reviews.llvm.org/D4223






More information about the llvm-commits mailing list