[PATCH 1/2 v8] powerpc: introduce macro spin_event_timeout()
Timur Tabi
timur at freescale.com
Wed May 27 04:17:20 EST 2009
Geoff Thorpe wrote:
> rc = spin_event_timeout((ret = in_be32(x) & 0x14), ...);
It's an interesting idea, but I have two problems with it:
1) This approach is that it depends on the internals of the macro. That is, you're sneaking in an assignment in the hopes that the code will behave properly. You see that the current code evaluates the condition only once, so it works. The code will look like this:
2) Unlike the wait_event_xxx macros, I believe that the actual evaluated expression is important to the caller. So 90% of the time, the caller is going to pass in "ret = (condition)", which means it makes more sense to have this as a built-in feature of the macro.
So if you're okay with v9 of the patch, please ACK it.
--
Timur Tabi
Linux kernel developer at Freescale
More information about the Linuxppc-dev
mailing list