modeltypes: move small typedefs to own header
[c11tester.git] / nodestack.cc
index f5cb6f0e2f4bcf1b8ee350485825f2afec0d28fb..a73765320dac47e97428390fe37bc3b06ba10483 100644 (file)
@@ -4,6 +4,7 @@
 #include "action.h"
 #include "common.h"
 #include "model.h"
+#include "threads.h"
 
 /**
  * @brief Node constructor
@@ -273,6 +274,11 @@ bool Node::is_enabled(thread_id_t tid)
        return thread_id < num_threads && enabled_array[thread_id];
 }
 
+bool Node::has_priority(thread_id_t tid)
+{
+       return fairness[id_to_int(tid)].priority;
+}
+
 /**
  * Add an action to the may_read_from set.
  * @param act is the action to add
@@ -418,7 +424,7 @@ void NodeStack::pop_restofstack(int numAhead)
 {
        /* Diverging from previous execution; clear out remainder of list */
        unsigned int it=iter+numAhead;
-       for(unsigned i=it;i<node_list.size();i++)
+       for(unsigned int i=it;i<node_list.size();i++)
                delete node_list[i];
        node_list.resize(it);
 }