projects
/
c11tester.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
promise: add Promise::get_index function
[c11tester.git]
/
promise.cc
diff --git
a/promise.cc
b/promise.cc
index 26a1095f4440a4b65d80dd67917da2f423ab28fe..29e261f04086dca1891d12934bb75596af03000a 100644
(file)
--- a/
promise.cc
+++ b/
promise.cc
@@
-166,3
+166,9
@@
bool Promise::same_location(const ModelAction *act) const
{
return get_reader(0)->same_var(act);
}
+
+/** @brief Get this Promise's index within the execution's promise array */
+int Promise::get_index() const
+{
+ return model->get_promise_number(this);
+}