* Set this action's read-from promise
* @param promise The promise to read from
*/
-void ModelAction::set_read_from_promise(const Promise *promise)
+void ModelAction::set_read_from_promise(Promise *promise)
{
ASSERT(is_read());
reads_from_promise = promise;
modelclock_t get_seq_number() const { return seq_number; }
uint64_t get_value() const { return value; }
const ModelAction * get_reads_from() const { return reads_from; }
- const Promise * get_reads_from_promise() const { return reads_from_promise; }
+ Promise * get_reads_from_promise() const { return reads_from_promise; }
Node * get_node() const;
void set_node(Node *n) { node = n; }
void set_read_from(const ModelAction *act);
- void set_read_from_promise(const Promise *promise);
+ void set_read_from_promise(Promise *promise);
/** Store the most recent fence-release from the same thread
* @param fence The fence-release that occured prior to this */
const ModelAction *reads_from;
/** The promise that this action reads from. Only valid for reads */
- const Promise *reads_from_promise;
+ Promise *reads_from_promise;
/** The last fence release from the same thread */
const ModelAction *last_fence_release;
break;
}
case READ_FROM_PROMISE: {
- const Promise *promise = curr->get_node()->get_read_from_promise();
+ Promise *promise = curr->get_node()->get_read_from_promise();
value = promise->get_value();
curr->set_read_from_promise(promise);
mo_graph->startChanges();
* where this->action is a 'read'.
* @return The current element in read_from_promises
*/
-const Promise * Node::get_read_from_promise() const
+Promise * Node::get_read_from_promise() const
{
if (read_from_promise_idx < 0 || read_from_promise_idx >= ((int)read_from_promises.size()))
return NULL;
int get_read_from_past_size() const;
void add_read_from_promise(const ModelAction *reader);
- const Promise * get_read_from_promise() const;
+ Promise * get_read_from_promise() const;
bool add_future_value(struct future_value fv);
struct future_value get_future_value() const;