3 * @brief Promise class --- tracks future obligations for execution
4 * related to weakly ordered writes.
11 #include "threads-model.h"
14 #include "modeltypes.h"
18 modelclock_t expiration;
24 Promise(ModelAction *act, struct future_value fv) :
26 expiration(fv.expiration),
30 eliminate_thread(act->get_tid());
32 modelclock_t get_expiration() const { return expiration; }
33 ModelAction * get_action() const { return read; }
34 bool eliminate_thread(thread_id_t tid);
35 bool thread_is_eliminated(thread_id_t tid) const;
36 bool has_failed() const;
37 uint64_t get_value() const { return value; }
38 void set_write(const ModelAction *act) { write = act; }
39 const ModelAction * get_write() { return write; }
43 std::vector< bool, SnapshotAlloc<bool> > eliminated_thread;
45 const modelclock_t expiration;
46 ModelAction * const read;
47 const ModelAction *write;