From d4361e592c3a19d3a4ec24cea410118eac798b79 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 23 Apr 2012 20:39:01 -0700 Subject: [PATCH] schedule: only print when DEBUG is enabled --- model.cc | 2 +- schedule.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/model.cc b/model.cc index 85ad11a..fc0f13d 100644 --- a/model.cc +++ b/model.cc @@ -214,7 +214,7 @@ void ModelChecker::print_trace(void) scheduler->print(); - printf("\nTrace:\n\n"); + printf("Trace:\n\n"); for (it = action_trace->begin(); it != action_trace->end(); it++) { DBG(); diff --git a/schedule.cc b/schedule.cc index c9a1ce1..d6ec038 100644 --- a/schedule.cc +++ b/schedule.cc @@ -45,12 +45,12 @@ Thread * Scheduler::get_current_thread(void) void Scheduler::print() { if (current) - printf("Current thread: %d\n", current->get_id()); + DEBUG("Current thread: %d\n", current->get_id()); else - printf("No current thread\n"); - printf("Num. threads in ready list: %ld\n", readyList.size()); + DEBUG("No current thread\n"); + DEBUG("Num. threads in ready list: %ld\n", readyList.size()); std::list::iterator it; for (it = readyList.begin(); it != readyList.end(); it++) - printf("In ready list: thread %d\n", (*it)->get_id()); + DEBUG("In ready list: thread %d\n", (*it)->get_id()); } -- 2.34.1