Re: [PATCH v4] introduce macro spin_event_timeout()
From: Alan Cox
Date: Wed Mar 11 2009 - 12:58:52 EST
> Are you talking about the udelay() inside the loop? If so, I agree
> that this is bad and have removed it in the PowerPC-specific version:
The behaviour you want there is system specific - 10uS is a minimum
politeness value for x86 PCI bus for example.
> rdtsc instruction. In this case, we're not adding arbitrary delays
> into the loop, and we're not using jiffies, but we are
> architecture-dependent.
and not useful
A macro of this form really needs to be able to look like
spin_until_timeout(readb(foo) & 0x80, 30 * HZ) {
udelay(10);
/* Maybe do other stuff */
}
to be more generally useful
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/