#include "model.h"
#include "action.h"
+#include "clockvector.h"
ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, int value)
{
act->tid = t->get_id();
act->value = value;
act->seq_number = model->get_next_seq_num();
+
+ cv = NULL;
+}
+
+ModelAction::~ModelAction()
+{
+ if (cv)
+ delete cv;
}
bool ModelAction::is_read()
/* Forward declaration */
class Node;
+class ClockVector;
class ModelAction {
public:
ModelAction(action_type_t type, memory_order order, void *loc, int value);
+ ~ModelAction();
void print(void);
thread_id_t get_tid() { return tid; }
int value;
Node *node;
int seq_number;
+
+ ClockVector *cv;
};
typedef std::list<class ModelAction *> action_list_t;