model: add 'const'
[model-checker.git] / model.cc
index 2c0ec9bad9488ebafdc83351761bc24500f84016..7c9b4c07296bf05e57280c4eb4f33198f62dbe38 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -214,8 +214,9 @@ Node * ModelChecker::get_curr_node() const
  * when exploring a new execution ordering), in which case we defer to the
  * scheduler.
  *
- * @param curr The current ModelAction. This action might guide the choice of
- * next thread.
+ * @param curr Optional: The current ModelAction. Only used if non-NULL and it
+ * might guide the choice of next thread (i.e., THREAD_CREATE should be
+ * followed by THREAD_START, or ATOMIC_RMWR followed by ATOMIC_{RMW,RMWC})
  * @return The next chosen thread to run, if any exist. Or else if no threads
  * remain to be executed, return NULL.
  */
@@ -544,7 +545,7 @@ bool ModelChecker::next_execution()
        return true;
 }
 
-ModelAction * ModelChecker::get_last_conflict(ModelAction *act)
+ModelAction * ModelChecker::get_last_conflict(ModelAction *act) const
 {
        switch (act->get_type()) {
        case ATOMIC_FENCE:
@@ -2806,5 +2807,6 @@ void ModelChecker::run()
                };
        } while (next_execution());
 
+       model_print("******* Model-checking complete: *******\n");
        print_stats();
 }