[vmkit-commits] [vmkit] r85754 - /vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Sun Nov 1 14:16:22 PST 2009


Author: geoffray
Date: Sun Nov  1 16:16:22 2009
New Revision: 85754

URL: http://llvm.org/viewvc/llvm-project?rev=85754&view=rev
Log:
Update lastSP when entering a rendezvous.


Modified:
    vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp

Modified: vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp?rev=85754&r1=85753&r2=85754&view=diff

==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp Sun Nov  1 16:16:22 2009
@@ -113,10 +113,15 @@
   if (!th->joinedRV) {
     another_mark();
     th->joinedRV = true;
-    if (!th->getLastSP()) {
-      changed = true;
-      th->setLastSP(FRAME_PTR());
-    }
+  }
+    
+  // lastSP may not be set in two cases:
+  // (1) The thread was interrupted while executing regular code (ie cooperative
+  //     code).
+  // (2) The thread left uncooperative code and has just cleared lastSP.
+  if (!th->getLastSP()) {
+    changed = true;
+    th->setLastSP(FRAME_PTR());
   }
 
   assert(th->getLastSP() && "Joined without giving a SP");





More information about the vmkit-commits mailing list