X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker-benchmarks.git;a=blobdiff_plain;f=concurrent-hashmap%2Fhashmap.h;h=68dd8154a146a35eac078aebed3da4cfddef909f;hp=0d249251ec99dcaabbd10d301df8873a5f3a9cc1;hb=993e7e5146f39ff0ed459ac0a8bc30e7a0253156;hpb=3cb559e8fea6c3839ed20d6a10a636d728cf8695 diff --git a/concurrent-hashmap/hashmap.h b/concurrent-hashmap/hashmap.h index 0d24925..68dd815 100644 --- a/concurrent-hashmap/hashmap.h +++ b/concurrent-hashmap/hashmap.h @@ -5,17 +5,10 @@ #include #include "stdio.h" //#include -#ifdef STANDALONE -#include -#define MODEL_ASSERT assert -#else -#include -#endif #include #include -#include "common.h" -#include "sc_annotation.h" +//#include "sc_annotation.h" #define relaxed memory_order_relaxed #define release memory_order_release @@ -149,7 +142,7 @@ class HashMap { } Value* get(Key *key) { - MODEL_ASSERT (key); + //MODEL_ASSERT (key); int hash = hashKey(key); // Try first without locking... @@ -165,9 +158,9 @@ 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_END(); + //SC_END(); e = firstPtr; while (e != NULL) { @@ -209,7 +202,7 @@ class HashMap { Value* put(Key *key, Value *value) { // Don't allow NULL key or value - MODEL_ASSERT (key && value); + //MODEL_ASSERT (key && value); int hash = hashKey(key); Segment *seg = segments[hash & SEGMENT_MASK]; @@ -248,7 +241,7 @@ class HashMap { } Value* remove(Key *key, Value *value) { - MODEL_ASSERT (key); + //MODEL_ASSERT (key); int hash = hashKey(key); Segment *seg = segments[hash & SEGMENT_MASK]; atomic *tab;