From 4f834086d3c8599e47151cf69e13008ee35e9bf3 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 9 Mar 2012 17:10:35 -0800 Subject: [PATCH] libthreads: remove unused codepath --- libthreads.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libthreads.c b/libthreads.c index 05440c04..ca4477f6 100644 --- a/libthreads.c +++ b/libthreads.c @@ -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); } -- 2.34.1