#include "action.h"
#include "common.h"
#include "model.h"
-#include "threads.h"
+#include "threads-model.h"
/**
* @brief Node constructor
future_values(),
future_index(-1),
relseq_break_writes(),
- relseq_break_index(0)
+ relseq_break_index(0),
+ misc_index(0),
+ misc_max(0)
{
if (act) {
act->set_node(this);
if (prevfi) {
*fi=*prevfi;
}
- if (parent->enabled_array[i]==THREAD_ENABLED) {
+ if (parent->is_enabled(int_to_id(i))) {
fi->enabled_count++;
}
if (i==currtid) {
}
//Do window processing
if (prevfairness != NULL) {
- if (prevfairness -> parent->enabled_array[i] == THREAD_ENABLED)
+ if (prevfairness -> parent->is_enabled(int_to_id(i)))
fi->enabled_count--;
if (i==prevtid) {
fi->turns--;
return true;
}
+
+void Node::set_misc_max(int i) {
+ misc_max=i;
+}
+
+int Node::get_misc() {
+ return misc_index;
+}
+
+bool Node::increment_misc() {
+ return (misc_index<misc_max)&&((++misc_index)<misc_max);
+}
+
+bool Node::misc_empty() {
+ return (misc_index+1)>=misc_max;
+}
+
+
/**
* Adds a value from a weakly ordered future write to backtrack to.
* @param value is the value to backtrack to.