travisg/lk — pull request #11 by zeusk (2013-01-03 12:45:01+00:00)
Title: [kernel] Delay clearing of priority bit

In most cases, There is a single thread at a priority level which most likely will re-join runqueue, So clear the bit only if we really have to. Additionally this causes compiler to optimise this part further (CSE) as list macro returns NULL only if list was empty and wraps around, another read of list head and tail is avoided.

The only downfall is that if the last/sole thread in the list blocks, we will waste a few cycles here.