X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=promise.h;h=90ec1d2050bc650b714eebe8f64f5aabde0de7e0;hb=c0c175fd2688c46595d5aadf029026e147ec80c2;hp=5ea7dc58d0470a29a537985c6322f8792be1f856;hpb=8c9713418515a44e0a96cadabca0feececf962b3;p=model-checker.git diff --git a/promise.h b/promise.h index 5ea7dc5..90ec1d2 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; @@ -36,6 +36,8 @@ class Promise { int get_num_available_threads() const { return num_available_threads; } bool is_compatible(const ModelAction *act) const; bool is_compatible_exclusive(const ModelAction *act) const; + bool same_value(const ModelAction *write) const; + bool same_location(const ModelAction *act) const; modelclock_t get_expiration() const { return fv.expiration; } uint64_t get_value() const { return fv.value; } @@ -50,14 +52,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; };