Fixed possible overflow in thread_yield()