[PATCH 1/2 v8] powerpc: introduce macro spin_event_timeout()
Timur Tabi
timur at freescale.com
Tue May 26 13:27:17 EST 2009
On Mon, May 25, 2009 at 12:46 PM, Jon Smirl <jonsmirl at gmail.com> wrote:
> I just tried using this. The !rc has the effect of making the error
> return be zero instead the normal not zero.
You're confused. It's not a "return code", it's a return value. I
guess I should have called the parameter "ret" instead of "rc", but I
didn't expect people to get confused.
'rc' is the value of the expression when the loop terminates. That's
what makes the most sense, because the developer will want to know
what that value is. If you're expression happens to rely on negative
logic (e.g. wait until a bit is cleared), then of course it's going to
appear "backwards" when you test it.
--
Timur Tabi
Linux kernel developer at Freescale
More information about the Linuxppc-dev
mailing list