From 1ec752235b9629b1608babda6a9582fc9a0dd1a7 Mon Sep 17 00:00:00 2001
From: Brian Norris <banorris@uci.edu>
Date: Fri, 18 Jan 2013 16:30:26 -0800
Subject: [PATCH] schedule: allow Schedule::print() even in non-DEBUG build

For instance, printing from w/in gdb
---
 schedule.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/schedule.cc b/schedule.cc
index 444e1a8..602cdb7 100644
--- a/schedule.cc
+++ b/schedule.cc
@@ -184,7 +184,8 @@ Thread * Scheduler::next_thread(Thread *t)
 				break;
 			}
 			if (curr_thread_index == old_curr_thread) {
-				print();
+				if (DBG_ENABLED())
+					print();
 				return NULL;
 			}
 		}
@@ -196,7 +197,8 @@ Thread * Scheduler::next_thread(Thread *t)
 	}
 
 	current = t;
-	print();
+	if (DBG_ENABLED())
+		print();
 	return t;
 }
 
@@ -216,7 +218,7 @@ Thread * Scheduler::get_current_thread() const
 void Scheduler::print() const
 {
 	if (current)
-		DEBUG("Current thread: %d\n", id_to_int(current->get_id()));
+		model_print("Current thread: %d\n", id_to_int(current->get_id()));
 	else
-		DEBUG("No current thread\n");
+		model_print("No current thread\n");
 }
-- 
2.34.1