lkml.org 
[lkml]   [2004]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MSEC_TO_JIFFIES is messed up...
Jan Olderdissen wrote:
> Couple nitpicks:
>
>
>>#if HZ=1000
>
>
> #if HZ==1000
>
>
>>#define MSEC_TO_JIFFIES(msec) (msec)
>>#define JIFFIES_TO_MESC(jiffies) (jiffies)
>>#elif HZ=100
>
>
> #elif HZ==100
>
>
>>#define MSEC_TO_JIFFIES(msec) (msec * 10)
>>#define JIFFIES_TO_MESC(jiffies) (jiffies / 10)
>
>
> #define JIFFIES_TO_MSEC(jiffies) (jiffies / 10)
>
>
>>#else
>>#define MSEC_TO_JIFFIES(msec) ((HZ * (msec) + 999) / 1000)
>>#define JIFFIES_TO_MSEC(jiffies) ...
>>#endif


And let's use something other than the name of a global variable in the
macros... it hurts my brain, at least... :)

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.084 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site