cyclegraph: bugfix - pop edges properly
authorBrian Norris <banorris@uci.edu>
Tue, 5 Feb 2013 22:26:24 +0000 (14:26 -0800)
committerBrian Norris <banorris@uci.edu>
Wed, 6 Feb 2013 21:45:20 +0000 (13:45 -0800)
Now that CycleNode's have back-edges, we need to properly remove *both*
the forward and back edges when doing roll-back.

cyclegraph.cc
cyclegraph.h

index eaddc8e1714629f8834a5b11c891f8009b2e1237..e834cb672b5a360077c9cb877ea164a986880acb 100644 (file)
@@ -348,7 +348,7 @@ void CycleGraph::commitChanges()
 void CycleGraph::rollbackChanges()
 {
        for (unsigned int i = 0; i < rollbackvector.size(); i++)
-               rollbackvector[i]->popEdge();
+               rollbackvector[i]->removeEdge();
 
        for (unsigned int i = 0; i < rmwrollbackvector.size(); i++)
                rmwrollbackvector[i]->clearRMW();
index 749abf8ca847d9969016356101b153c4d0688a84..fcb1d30960843413814b07796c015866100cabf7 100644 (file)
@@ -102,11 +102,6 @@ class CycleNode {
        void clearRMW() { hasRMW = NULL; }
        const ModelAction * getAction() const { return action; }
        const Promise * getPromise() const { return promise; }
-
-       void popEdge() {
-               edges.pop_back();
-       }
-
        bool is_promise() const { return !action; }
        void resolvePromise(const ModelAction *writer);