X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=concurrent-hashmap%2Fhashmap.h;h=8e6f196cb0e8c73d8a02f9dee01b152dddea7cc9;hb=f59f59385d850ff79016d33891fc09522ff509f3;hp=936f284635a1b71946b1fe867c964852aace5e04;hpb=faf43225ff0d1a0091f5e489714de0c26d24d02f;p=model-checker-benchmarks.git diff --git a/concurrent-hashmap/hashmap.h b/concurrent-hashmap/hashmap.h index 936f284..8e6f196 100644 --- a/concurrent-hashmap/hashmap.h +++ b/concurrent-hashmap/hashmap.h @@ -14,6 +14,7 @@ #include #include +#include "common.h" #include "sc_annotation.h" #define relaxed memory_order_relaxed @@ -164,10 +165,10 @@ class HashMap { // lock, we ignore this operation for the SC analysis, and otherwise we // take it into consideration - SC_BEGIN(); + //SC_BEGIN(); Entry *firstPtr = first->load(acquire); - SC_KEEP(); - SC_END(); + //SC_KEEP(); + //SC_END(); e = firstPtr; while (e != NULL) { @@ -177,9 +178,9 @@ class HashMap { return res; else break; - // Loading the next entry - e = e->next.load(acquire); } + // Loading the next entry + e = e->next.load(acquire); } // Recheck under synch if key apparently not there or interference