> Alan did have one valid point though. Determining how long to loop > for is architecture-specific. Using jiffies is bad, because even one > jiffy is too long. Adding a udelay() inside the loop means that it > only checks he condition every microsecond. So the real solution is > to use keep looping until a certain amount of time has passed. This > means using an architecture-specific timebase register.
Are there really cases where spinning for 1 jiffy is too long of a timeout? It might make sense for the parameter passed in to be in terms of microseconds but I have a hard time coming up with a case where having the real timeout be 40 msecs or whatever 1 jiffy ends up being is a real problem -- after all, this helper is intended for the case where we expect the condition to become true much sooner than the worst case. - R. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev