3 * @brief Promise class --- tracks future obligations for execution
4 * related to weakly ordered writes.
17 Promise(ModelAction *act, uint64_t value, modelclock_t expiration) :
18 value(value), expiration(expiration), read(act), write(NULL)
20 increment_threads(act->get_tid());
22 modelclock_t get_expiration() const {return expiration;}
23 ModelAction * get_action() const { return read; }
24 bool increment_threads(thread_id_t tid);
26 bool has_sync_thread(thread_id_t tid) {
27 unsigned int id=id_to_int(tid);
28 if (id>=synced_thread.size()) {
31 return synced_thread[id];
34 uint64_t get_value() const { return value; }
35 void set_write(const ModelAction *act) { write = act; }
36 const ModelAction * get_write() { return write; }
40 std::vector<bool> synced_thread;
42 const modelclock_t expiration;
43 ModelAction * const read;
44 const ModelAction * write;