X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=promise.h;h=e8c233c61d8240d4820fc39ad7d735d0ffeff355;hb=07b041c2dd6958bb3a52ffcba07e8e642130548c;hp=0adc3de1aabb47d9d8df7a007d59eb09f391a257;hpb=875ebf8e11b4bdd702604785837b6b91b748900d;p=model-checker.git diff --git a/promise.h b/promise.h index 0adc3de..e8c233c 100644 --- a/promise.h +++ b/promise.h @@ -8,10 +8,10 @@ #define __PROMISE_H__ #include -#include #include "modeltypes.h" #include "mymemory.h" +#include "stl-model.h" class ModelAction; @@ -43,6 +43,8 @@ class Promise { uint64_t get_value() const { return fv.value; } struct future_value get_fv() const { return fv; } + int get_index() const; + void print() const; bool equals(const Promise *x) const { return this == x; } @@ -52,14 +54,14 @@ class Promise { private: /** @brief Thread ID(s) for thread(s) that potentially can satisfy this * promise */ - std::vector< bool, SnapshotAlloc > available_thread; + SnapVector available_thread; int num_available_threads; const future_value fv; /** @brief The action(s) which read the promised future value */ - std::vector< ModelAction *, SnapshotAlloc > readers; + SnapVector readers; const ModelAction *write; };