in arch/i386/kernel/io_apic.c:
>static int __init timer_irq_works(void)
>{
> unsigned int t1 = jiffies;
>
> sti();
> /* Let ten ticks pass... */
> mdelay((10 * 1000) / HZ);
>
> /*
> * Expect a few ticks at least, to be sure some possible
> * glue logic does not lock up after one or two first
> * ticks in a non-ExtINT mode. Also the local APIC
> * might have cached one ExtINT interrupt. Finally, at
> * least one tick may be lost due to delays.
> */
> if (jiffies - t1 > 4)
> return 1;
>
> return 0;
>}
If jiffies were not volatile, this initializing assignment and the
test at the end could be optimized away, leaving an unconditional
"return 0". A lock is of no help.
-- /Jonathan Lundell. - 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/