[PATCH v6] introduce macro spin_event_timeout()
timur at freescale.com
Thu Apr 30 08:48:34 EST 2009
On Mon, Apr 27, 2009 at 2:05 PM, Timur Tabi <timur at 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
> was terminated.
> This primary purpose of this macro is to poll on a hardware register until a
> status bit changes. The timeout ensures that the loop still terminates if the
> bit doesn't change as expected. This macro makes it easier for driver
> developers to perform this kind of operation properly.
Any comments on this patch? I'd like to see this macro added to 2.6.31.
Linux kernel developer at Freescale
More information about the Linuxppc-dev