X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=promise.cc;h=fdd45791f40657556f344c96b579ade87bc90736;hb=00b14c0561d3838aeb798d3c22f4136f8c4d136b;hp=2bd6637352195a41029b96f220d88b1bff809403;hpb=7823790c1d16dc687bf4bb3d6e3c6de5eb9f6366;p=model-checker.git diff --git a/promise.cc b/promise.cc index 2bd6637..fdd4579 100644 --- a/promise.cc +++ b/promise.cc @@ -76,3 +76,12 @@ bool Promise::has_failed() const { return num_available_threads == 0; } + +/** + * @param write A store which could satisfy this Promise + * @return True if the store can satisfy this Promise; false otherwise + */ +bool Promise::is_compatible(const ModelAction *write) const +{ + return thread_is_available(write->get_tid()); +}