projects
/
c11tester.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug
[c11tester.git]
/
cyclegraph.cc
diff --git
a/cyclegraph.cc
b/cyclegraph.cc
index 966a5035a9fd484074b2a6802bff58cc119e58ae..e56c91285d36dd4d78374fafe9fd313ee46be0d6 100644
(file)
--- a/
cyclegraph.cc
+++ b/
cyclegraph.cc
@@
-138,13
+138,13
@@
void CycleGraph::addRMWEdge(const ModelAction *from, const ModelAction *rmw)
}
void CycleGraph::addEdges(SnapList<ModelAction *> * edgeset, const ModelAction *to) {
}
void CycleGraph::addEdges(SnapList<ModelAction *> * edgeset, const ModelAction *to) {
- for(
SnapList<ModelAction*>::iterator it = edgeset->begin();it!=edgeset->end()
;) {
- ModelAction *act =
*it
;
+ for(
sllnode<ModelAction*> * it = edgeset->begin();it!=NULL
;) {
+ ModelAction *act =
it->getVal()
;
CycleNode *node = getNode(act);
CycleNode *node = getNode(act);
-
SnapList<ModelAction*>::iterator
it2 = it;
- it2
++
;
- for(;it2!=
edgeset->end()
; ) {
- ModelAction *act2 =
*it2
;
+
sllnode<ModelAction*> *
it2 = it;
+ it2
=it2->getNext()
;
+ for(;it2!=
NULL
; ) {
+ ModelAction *act2 =
it2->getVal()
;
CycleNode *node2 = getNode(act2);
if (checkReachable(node, node2)) {
it = edgeset->erase(it);
CycleNode *node2 = getNode(act2);
if (checkReachable(node, node2)) {
it = edgeset->erase(it);
@@
-153,16
+153,16
@@
void CycleGraph::addEdges(SnapList<ModelAction *> * edgeset, const ModelAction *
it2 = edgeset->erase(it2);
goto endinnerloop;
}
it2 = edgeset->erase(it2);
goto endinnerloop;
}
- it2
++
;
+ it2
=it2->getNext()
;
endinnerloop:
;
}
endinnerloop:
;
}
- it
++
;
+ it
=it->getNext()
;
endouterloop:
;
}
endouterloop:
;
}
- for(
SnapList<ModelAction*>::iterator it = edgeset->begin();it!=edgeset->end();it++
) {
- ModelAction *from =
*it
;
+ for(
sllnode<ModelAction*> *it = edgeset->begin();it!=NULL;it=it->getNext()
) {
+ ModelAction *from =
it->getVal()
;
addEdge(from, to, from->get_tid() == to->get_tid());
}
}
addEdge(from, to, from->get_tid() == to->get_tid());
}
}