* Pavel Machek <[email protected]> [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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]