changes
authorbdemsky <bdemsky>
Wed, 20 Oct 2010 23:15:30 +0000 (23:15 +0000)
committerbdemsky <bdemsky>
Wed, 20 Oct 2010 23:15:30 +0000 (23:15 +0000)
Robust/src/IR/Flat/RuntimeConflictResolver.java
Robust/src/Runtime/oooJava/hashStructure.c
Robust/src/Runtime/oooJava/hashStructure.h
Robust/src/Runtime/oooJava/rcr_runtime.h

index b142a5db2fd8c4d6711dc40a983bf384dbc76b38..83b216b9be64c8ea344bcdc2adb1b33185b11490 100644 (file)
@@ -729,11 +729,12 @@ public class RuntimeConflictResolver {
       objConfRead|=effect.hasReadConflict;
       objConfWrite|=effect.hasWriteConflict;
     }
-  
+    currCase.append("     int tmpvar;");
+
     if (objConfRead) {
       currCase.append("    if(");
       checkWaitingQueue(currCase, taint,  node);
-      currCase.append("||");
+      currCase.append("||!");
     }
 
     int index=-1;
@@ -749,17 +750,17 @@ public class RuntimeConflictResolver {
       assert heaprootNum != -1;
       int allocSiteID = connectedHRHash.get(taint).getWaitingQueueBucketNum(node);
       int traverserID = doneTaints.get(taint);
-      currCase.append("    rcr_WRITEBINCASE(allHashStructures["+heaprootNum+"],"+prefix+", (SESEcommon *) record, "+index+")");
+      currCase.append("    (tmpvar=rcr_WRITEBINCASE(allHashStructures["+heaprootNum+"],"+prefix+", (SESEcommon *) record, "+index+"))");
     } else if (primConfRead||objConfRead) {
       int heaprootNum = connectedHRHash.get(taint).id;
       assert heaprootNum != -1;
       int allocSiteID = connectedHRHash.get(taint).getWaitingQueueBucketNum(node);
       int traverserID = doneTaints.get(taint);
-      currCase.append("    rcr_READBINCASE(allHashStructures["+heaprootNum+"],"+prefix+", (SESEcommon *) record, "+index+")");
+      currCase.append("    (tmpvar=rcr_READBINCASE(allHashStructures["+heaprootNum+"],"+prefix+", (SESEcommon *) record, "+index+"))");
     }
 
     if(objConfRead) {
-      currCase.append(") {\n");
+      currCase.append("&READYMASK) {\n");
       putIntoWaitingQueue(currCase, taint, node, prefix);        
       currCase.append("    break;\n");
       currCase.append("    }\n");
index fee2594383b740cf8ca5f85aa98d360a94d95980..02970aab6a0002d8d691deef89a250a2eb846d08 100644 (file)
@@ -46,6 +46,8 @@ inline int rcr_generateKey(void * ptr){
   return (((struct ___Object___ *) ptr)->oid)&RH_MASK;
 }
 
+//consider SPEC flag
+
 int rcr_WRITEBINCASE(HashStructure *T, void *ptr, SESEcommon *task, int index) {
   //chain of bins exists => tail is valid
   //if there is something in front of us, then we are not ready
@@ -88,9 +90,9 @@ int rcr_WRITEBINCASE(HashStructure *T, void *ptr, SESEcommon *task, int index) {
       if (!(bit & td->bitindexwr)) {
        td->bitindexwr|=bit;
        td->bitindexrd|=bit;
-       return (bintail->status==READY)?READY:SPECNOTREADY;
+       return (bintail->status==READY)?SPECREADY:SPECNOTREADY;
       } else
-       return READY;
+       return SPECREADY;
     }
   } else {
     TraverserData * td = &((ReadBinItem_rcr *)bintail)->array[((ReadBinItem_rcr *)bintail)->index - 1];
index 5df558ffd8dc39069007046725f07406da05a15b..6932bd0016f21283473c75fb812ff55f6b2bdd32 100644 (file)
 #define BINMASK 1\r
 #define PARENTBIN 1\r
 \r
+#define SPECREADY 3\r
 #define SPECNOTREADY 2\r
 #define READY 1\r
 #define NOTREADY 0\r
+#define READYMASK 1\r
 \r
 #define TRUE 1\r
 #define FALSE 0\r
index afca69dc8874981811d87c31a6603aa690199c47..e7c188d6b8cc02c27ca345fb5c6ba8ce4461db0c 100644 (file)
@@ -12,5 +12,6 @@ struct rcrRecord {
   int index;
   int flag;
   int array[RCRSIZE];
+  struct rcrRecord *next;
 };
 #endif