[vmkit-commits] [vmkit] r77591 - /vmkit/trunk/lib/Mvm/Compiler/JIT.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Thu Jul 30 04:44:06 PDT 2009


Author: geoffray
Date: Thu Jul 30 06:43:49 2009
New Revision: 77591

URL: http://llvm.org/viewvc/llvm-project?rev=77591&view=rev
Log:
Also be in uncooperative code when locking on the JIT lock.


Modified:
    vmkit/trunk/lib/Mvm/Compiler/JIT.cpp

Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=77591&r1=77590&r2=77591&view=diff

==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Thu Jul 30 06:43:49 2009
@@ -301,7 +301,12 @@
 // We protect the creation of IR with the executionEngine lock because
 // codegen'ing a function may also create IR objects.
 void MvmModule::protectIR() {
-  if (executionEngine) executionEngine->lock.acquire();
+  if (executionEngine) {
+    mvm::Thread* th = mvm::Thread::get();
+    th->enterUncooperativeCode();
+    executionEngine->lock.acquire();
+    th->leaveUncooperativeCode();
+  }
 }
 
 void MvmModule::unprotectIR() {





More information about the vmkit-commits mailing list