Thread (15 messages) 15 messages, 4 authors, 2009-05-26

Re: [PATCH 1/2 v8] powerpc: introduce macro spin_event_timeout()

From: Timur Tabi <hidden>
Date: 2009-05-26 03:27:19

On Mon, May 25, 2009 at 12:46 PM, Jon Smirl [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help