From: Brian Norris Date: Sat, 10 Mar 2012 01:10:35 +0000 (-0800) Subject: libthreads: remove unused codepath X-Git-Tag: pldi2013~610 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4f834086d3c8599e47151cf69e13008ee35e9bf3;p=model-checker.git libthreads: remove unused codepath --- diff --git a/libthreads.c b/libthreads.c index 05440c0..ca4477f 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); }