libthreads: remove unused codepath
authorBrian Norris <banorris@uci.edu>
Sat, 10 Mar 2012 01:10:35 +0000 (17:10 -0800)
committerBrian Norris <banorris@uci.edu>
Sat, 10 Mar 2012 01:10:35 +0000 (17:10 -0800)
libthreads.c

index 05440c04be7f0459ec269eb9b222bff1688f5c57..ca4477f66740b2b384612b720eda074b5e04e777 100644 (file)
@@ -57,14 +57,11 @@ static int thread_yield()
        struct thread *old, *next;
 
        DBG();
-       if (current) {
-               old = current;
-               schedule_add_thread(old);
-       } else {
-               old = main_thread;
-       }
+       old = current;
+       schedule_add_thread(old);
        schedule_choose_next(&next);
        current = next;
+       DEBUG("(%d, %d)\n", old->index, next->index);
        return thread_swap(old, next);
 }