projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nodestack: use initializer list
[model-checker.git]
/
action.h
diff --git
a/action.h
b/action.h
index c455ea780883b371d80caed2d25c95e3d16edf1b..d178976a2c8e0206128750b5eaddac1485a4b432 100644
(file)
--- a/
action.h
+++ b/
action.h
@@
-7,11
+7,13
@@
#include <list>
#include <cstddef>
#include <list>
#include <cstddef>
+#include <inttypes.h>
-#include "threads.h"
#include "mymemory.h"
#include "mymemory.h"
-#include "clockvector.h"
#include "memoryorder.h"
#include "memoryorder.h"
+#include "modeltypes.h"
+
+class ClockVector;
using std::memory_order;
using std::memory_order_relaxed;
using std::memory_order;
using std::memory_order_relaxed;
@@
-64,7
+66,7
@@
class ModelAction {
public:
ModelAction(action_type_t type, memory_order order, void *loc, uint64_t value = VALUE_NONE);
~ModelAction();
public:
ModelAction(action_type_t type, memory_order order, void *loc, uint64_t value = VALUE_NONE);
~ModelAction();
- void print(
void
) const;
+ void print() const;
thread_id_t get_tid() const { return tid; }
action_type get_type() const { return type; }
thread_id_t get_tid() const { return tid; }
action_type get_type() const { return type; }
@@
-78,6
+80,7
@@
public:
void set_node(Node *n) { node = n; }
void copy_from_new(ModelAction *newaction);
void set_node(Node *n) { node = n; }
void copy_from_new(ModelAction *newaction);
+ void set_seq_number(modelclock_t num);
void set_try_lock(bool obtainedlock);
bool is_mutex_op() const;
bool is_lock() const;
void set_try_lock(bool obtainedlock);
bool is_mutex_op() const;
bool is_lock() const;
@@
-102,8
+105,8
@@
public:
void create_cv(const ModelAction *parent = NULL);
ClockVector * get_cv() const { return cv; }
void create_cv(const ModelAction *parent = NULL);
ClockVector * get_cv() const { return cv; }
-
void
read_from(const ModelAction *act);
-
void
synchronize_with(const ModelAction *act);
+
bool
read_from(const ModelAction *act);
+
bool
synchronize_with(const ModelAction *act);
bool has_synchronized_with(const ModelAction *act) const;
bool happens_before(const ModelAction *act) const;
bool has_synchronized_with(const ModelAction *act) const;
bool happens_before(const ModelAction *act) const;