projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: remove public check_promises() interface
[model-checker.git]
/
promise.h
diff --git
a/promise.h
b/promise.h
index 0adc3de1aabb47d9d8df7a007d59eb09f391a257..e8c233c61d8240d4820fc39ad7d735d0ffeff355 100644
(file)
--- a/
promise.h
+++ b/
promise.h
@@
-8,10
+8,10
@@
#define __PROMISE_H__
#include <inttypes.h>
#define __PROMISE_H__
#include <inttypes.h>
-#include <vector>
#include "modeltypes.h"
#include "mymemory.h"
#include "modeltypes.h"
#include "mymemory.h"
+#include "stl-model.h"
class ModelAction;
class ModelAction;
@@
-43,6
+43,8
@@
class Promise {
uint64_t get_value() const { return fv.value; }
struct future_value get_fv() const { return fv; }
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; }
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 */
private:
/** @brief Thread ID(s) for thread(s) that potentially can satisfy this
* promise */
-
std::vector< bool, SnapshotAlloc<bool>
> available_thread;
+
SnapVector<bool
> available_thread;
int num_available_threads;
const future_value fv;
/** @brief The action(s) which read the promised future value */
int num_available_threads;
const future_value fv;
/** @brief The action(s) which read the promised future value */
-
std::vector< ModelAction *, SnapshotAlloc<ModelAction *>
> readers;
+
SnapVector<ModelAction *
> readers;
const ModelAction *write;
};
const ModelAction *write;
};