hasRMW = node;
return false;
}
+
+/**
+ * Convert a Promise CycleNode into a concrete-valued CycleNode. Should only be
+ * used when there's no existing ModelAction CycleNode for this write.
+ *
+ * @param writer The ModelAction which wrote the future value represented by
+ * this CycleNode
+ */
+void CycleNode::resolvePromise(const ModelAction *writer)
+{
+ ASSERT(is_promise());
+ ASSERT(promise->is_compatible(writer));
+ action = writer;
+ promise = NULL;
+ ASSERT(!is_promise());
+}
CycleNode * getRMW() const;
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);
SNAPSHOTALLOC
private: