fixup more id vs. thread_id_t
authorBrian Norris <banorris@uci.edu>
Thu, 4 Oct 2012 00:12:59 +0000 (17:12 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 4 Oct 2012 00:14:00 +0000 (17:14 -0700)
schedule.cc
threads.cc

index b1b41c3..88200a8 100644 (file)
@@ -36,7 +36,7 @@ void Scheduler::set_enabled(Thread *t, bool enabled_status) {
  */
 void Scheduler::add_thread(Thread *t)
 {
  */
 void Scheduler::add_thread(Thread *t)
 {
-       DEBUG("thread %d\n", t->get_id());
+       DEBUG("thread %d\n", id_to_int(t->get_id()));
        set_enabled(t, true);
 }
 
        set_enabled(t, true);
 }
 
@@ -119,7 +119,7 @@ Thread * Scheduler::get_current_thread() const
 void Scheduler::print() const
 {
        if (current)
 void Scheduler::print() const
 {
        if (current)
-               DEBUG("Current thread: %d\n", current->get_id());
+               DEBUG("Current thread: %d\n", id_to_int(current->get_id()));
        else
                DEBUG("No current thread\n");
 }
        else
                DEBUG("No current thread\n");
 }
index 09efcae..ca4b28b 100644 (file)
@@ -105,7 +105,7 @@ int Thread::swap(ucontext_t *ctxt, Thread *t)
 void Thread::complete()
 {
        if (!is_complete()) {
 void Thread::complete()
 {
        if (!is_complete()) {
-               DEBUG("completed thread %d\n", get_id());
+               DEBUG("completed thread %d\n", id_to_int(get_id()));
                state = THREAD_COMPLETED;
                if (stack)
                        stack_free(stack);
                state = THREAD_COMPLETED;
                if (stack)
                        stack_free(stack);