| To: | Andrew Morton <akpm@xxxxxxxx> |
|---|---|
| Subject: | Re: MSEC_TO_JIFFIES is messed up... |
| From: | Greg KH <greg@xxxxxxxxx> |
| Date: | Wed, 12 May 2004 13:32:51 -0700 |
| Cc: | Ingo Molnar <mingo@xxxxxxx>, davidel@xxxxxxxxxxxxxxx, jgarzik@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20040512132050.6eae6905.akpm@xxxxxxxx> |
| References: | <20040512020700.6f6aa61f.akpm@xxxxxxxx> <20040512181903.GG13421@xxxxxxxxx> <40A26FFA.4030701@xxxxxxxxx> <20040512193349.GA14936@xxxxxxx> <Pine.LNX.4.58.0405121247011.11950@xxxxxxxxxxxxxxxxxxxxxxx> <20040512200305.GA16078@xxxxxxx> <20040512132050.6eae6905.akpm@xxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.6i |
On Wed, May 12, 2004 at 01:20:50PM -0700, Andrew Morton wrote: > How about we do: > > #if HZ=1000 > #define MSEC_TO_JIFFIES(msec) (msec) > #define JIFFIES_TO_MESC(jiffies) (jiffies) > #elif HZ=100 > #define MSEC_TO_JIFFIES(msec) (msec * 10) > #define JIFFIES_TO_MESC(jiffies) (jiffies / 10) > #else > #define MSEC_TO_JIFFIES(msec) ((HZ * (msec) + 999) / 1000) > #define JIFFIES_TO_MSEC(jiffies) ... > #endif > > in some kernel-wide header then kill off all the private implementations? Looks good to me. thanks, greg k-h |
| Previous by Date: | Re: MSEC_TO_JIFFIES is messed up..., Andrew Morton |
|---|---|
| Next by Date: | Re: MSEC_TO_JIFFIES is messed up..., Andrew Morton |
| Previous by Thread: | Re: MSEC_TO_JIFFIES is messed up..., Andrew Morton |
| Next by Thread: | Re: MSEC_TO_JIFFIES is messed up..., William Lee Irwin III |
| Indexes: | [Date] [Thread] [Top] [All Lists] |