(1) make type of memPool more precise...
authorbdemsky <bdemsky>
Tue, 9 Nov 2010 03:59:35 +0000 (03:59 +0000)
committerbdemsky <bdemsky>
Tue, 9 Nov 2010 03:59:35 +0000 (03:59 +0000)
(2) bug fix in BuildCode

Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/memPool.h

index 6b1e0d066e37d3bdcb46e11ca8aa629673112571..158d7b789fd2772a1c5e13baeccf3ac570b019af 100644 (file)
@@ -4748,7 +4748,7 @@ public class BuildCode {
     if (state.RCR && inset.size() > 0) {
       /* Make sure the running SESE is finished */
       output.println("   if (unlikely(runningSESE->rcrstatus!=0)) {");
-      output.println("     if(!CAS(&runningSESE->rcrstatus,1,0)) {");
+      output.println("     if(CAS(&runningSESE->rcrstatus,1,0)==2) {");
       output.println("       while(runningSESE->rcrstatus) {");
       output.println("         BARRIER();");
       output.println("         sched_yield();");
index a4b600b76b269ea3be16005a12817754f239a4ba..49612497a7db104f3ed0807b43eba5227dd4e8f9 100644 (file)
@@ -38,7 +38,7 @@ static INTPTR pageSize;
 
 
 typedef struct MemPoolItem_t {
-  void* next;
+  struct MemPoolItem_t* next;
 } MemPoolItem;