on 02/07/2013 20:59 Ed Maste said the following:
> On 2 July 2013 12:48, Andriy Gapon <a...@freebsd.org> wrote:
>> I am not sure if the originally reported problem was also caused by
>> should_yield() or if it was something else.  But in either case I think that 
>> we
>> should fix should_yield.  Perhaps (ticks - curthread->td_swvoltick) should be
>> cast to unsigned before comparison?
> 
> What about just initializing td_swvoltick to ticks at td creation?

I like this idea.  Still I think that distance between two wrapping numbers
should be calculated properly even if that mostly would not matter in practice.

distance = (signed)( i1 - i2 )

-- 
Andriy Gapon
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to