lkml.org 
[lkml]   [2009]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -tip 3/3] define nsecs_to_jiffies()
From
Date
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!


\
 
 \ /
  Last update: 2009-11-26 11:29    [W:0.082 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site