On Apr 27, 2009, at 2:05 PM, Timur Tabi wrote:
The macro spin_event_timeout() takes a condition and timeout value
(in microseconds) as parameters. It spins until either the
condition is true
or the timeout expires. It returns the result of the condition when
the loop
was terminated.
Kumar Gala wrote:
I wouldn't call it spin_event_timeout as its a bit too generic of a name
for something that is arch specific.
The concept is not arch-specific -- ideally, other architectures could
add their own implementations (or it could be made
non-architecture-specific in the future).
Kumar Gala wrote:
I wouldn't call it spin_event_timeout as its a bit too generic of a
name for something that is arch specific.
Well, I'm hoping it won't be arch-specific forever. I'd like to see
other architectures implement something like tb_ticks_per_usec. I'm
only tackling PowerPC for
Sean MacLennan wrote:
Would cpu_relax be a good thing to put here?
Something like:
while (!(rc = (condition)) (tb_ticks_since(__start) = __loops)) \
if (delay) \
udelay(delay); \
else \
cpu_relax(); \
I had that at one point, but then I
On Mon, Apr 27, 2009 at 2:05 PM, Timur Tabi ti...@freescale.com wrote:
The macro spin_event_timeout() takes a condition and timeout value
(in microseconds) as parameters. It spins until either the condition is true
or the timeout expires. It returns the result of the condition when the loop
The macro spin_event_timeout() takes a condition and timeout value
(in microseconds) as parameters. It spins until either the condition is true
or the timeout expires. It returns the result of the condition when the loop
was terminated.
This primary purpose of this macro is to poll on a