action: remove clockvector flag from print() method
[model-checker.git] / action.cc
index a4959aed90bf868c0ca542ea67c2e8ba75204b42..08fe10677c5d1e7e518c15fc27a4638c7f4494f4 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -7,6 +7,7 @@
 #include "action.h"
 #include "clockvector.h"
 #include "common.h"
+#include "threads.h"
 
 #define ACTION_INITIAL_CLOCK 0
 
@@ -23,17 +24,19 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, uint
        this->tid = t->get_id();
 }
 
+/** @brief ModelAction destructor */
 ModelAction::~ModelAction()
 {
-       /** We can't free the clock vector:
-        *  The reason is as follows:
-        *  Clock vectors are snapshotting state...  when we delete model actions
-        *  they are at the end of the node list and have invalid old clock vectors...
-        *  They are already free at that point...
+       /**
+        * We can't free the clock vector:
+        * Clock vectors are snapshotting state. When we delete model actions,
+        * they are at the end of the node list and have invalid old clock
+        * vectors which have already been rolled back to an unallocated state.
         */
-       
-       /*      if (cv)
-                       delete cv;*/
+
+       /*
+        if (cv)
+               delete cv; */
 }
 
 void ModelAction::copy_from_new(ModelAction *newaction)
@@ -290,13 +293,8 @@ bool ModelAction::happens_before(const ModelAction *act) const
        return act->cv->synchronized_since(this);
 }
 
-/**
- * Print nicely-formatted info about this ModelAction
- *
- * @param print_cv True if we want to print clock vector data. Might be false,
- * for instance, in situations where the clock vector might be invalid
- */
-void ModelAction::print(bool print_cv) const
+/** @brief Print nicely-formatted info about this ModelAction */
+void ModelAction::print() const
 {
        const char *type_str, *mo_str;
        switch (this->type) {
@@ -380,7 +378,7 @@ void ModelAction::print(bool print_cv) const
                else
                        printf(" Rf: ?");
        }
-       if (cv && print_cv) {
+       if (cv) {
                printf("\t");
                cv->print();
        } else