Messages in this thread | | | Subject | Re: [PATCH -tip 3/3] define nsecs_to_jiffies() | From | Peter Zijlstra <> | Date | Thu, 26 Nov 2009 11:27:06 +0100 |
| |
On Thu, 2009-11-26 at 14:49 +0900, Hidetoshi Seto wrote: > Use of msecs_to_jiffies() for nsecs_to_cputime() have some problems: > > - The type of msecs_to_jiffies()'s argument is unsigned int, so > it cannot convert msecs greater than UINT_MAX = about 49.7 days. > - msecs_to_jiffies() returns MAX_JIFFY_OFFSET if MSB of argument > is set, assuming that input was negative value. So it cannot > convert msecs greater than INT_MAX = about 24.8 days too. > > This patch defines a new function nsecs_to_jiffies() that can deal > greater values, and that can deal all incoming values as unsigned.
This looks good too,
Thanks Hidetoshi-san!
| |