projects
/
model-checker-benchmarks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changes
[model-checker-benchmarks.git]
/
concurrent-hashmap
/
hashmap.h
diff --git
a/concurrent-hashmap/hashmap.h
b/concurrent-hashmap/hashmap.h
index a66005ccbe9d66039029e3574795fc4d4aff06a0..8e6f196cb0e8c73d8a02f9dee01b152dddea7cc9 100644
(file)
--- a/
concurrent-hashmap/hashmap.h
+++ b/
concurrent-hashmap/hashmap.h
@@
-14,7
+14,8
@@
#include <stdlib.h>
#include <mutex>
#include <stdlib.h>
#include <mutex>
-#include "cdsannotate.h"
+#include "common.h"
+#include "sc_annotation.h"
#define relaxed memory_order_relaxed
#define release memory_order_release
#define relaxed memory_order_relaxed
#define release memory_order_release
@@
-164,7
+165,11
@@
class HashMap {
// lock, we ignore this operation for the SC analysis, and otherwise we
// take it into consideration
// lock, we ignore this operation for the SC analysis, and otherwise we
// take it into consideration
+ //SC_BEGIN();
Entry *firstPtr = first->load(acquire);
Entry *firstPtr = first->load(acquire);
+ //SC_KEEP();
+ //SC_END();
+
e = firstPtr;
while (e != NULL) {
if (e->hash == hash && eq(key, e->key)) {
e = firstPtr;
while (e != NULL) {
if (e->hash == hash && eq(key, e->key)) {
@@
-173,9
+178,9
@@
class HashMap {
return res;
else
break;
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
}
// Recheck under synch if key apparently not there or interference