lkml.org 
[lkml]   [2005]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Dynamic tick for x86 version 050602-2
* Pavel Machek <pavel@ucw.cz> [050610 02:15]:
> Hi!
>
> > > > +#define NS_TICK_LEN ((1 * 1000000000)/HZ)
> > > > +#define DYN_TICK_MIN_SKIP 2
> > > > +
> > > > +#ifdef CONFIG_NO_IDLE_HZ
> > > > +
> > > > +extern unsigned long dyn_tick_reprogram_timer(void);
> > > > +
> > > > +#else
> > > > +
> > > > +#define arch_has_safe_halt() 0
> > > > +#define dyn_tick_reprogram_timer() {}
> > >
> > > do {} while (0)
> > >
> > > , else you are preparing trap for someone.
> >
> > Can you please explain what the difference between these two are?
> > Some compiler version specific thing?
>
> It took me quite some remembering. Problem is that with your macros,
> someone can write
>
> dyn_tick_reprogram_timer()
> printk();
>
> [notice missing ; at first line], and still get it compile. If you
> replace {} with do {} while (0), he'll get compile error as he should.

Thanks for clarifying, I'll change it.

Tony
-
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-06-10 17:20    [from the cache]
©2003-2011 Jasper Spaans