Re: Patch: linux-2.5.29 __downgrade_write() for CONFIG_RWSEM_GENERIC_SPINLOCK

Roman Zippel (zippel@linux-m68k.org)
Mon, 29 Jul 2002 14:46:09 +0200 (CEST)


Hi,

On Mon, 29 Jul 2002, David Howells wrote:

> Brrr... I don't like that. If I'm going to pass in a second argument, then I
> want it to be what Christoph's version because it's more readable and more
> obvious what it's doing (and, since the value is constant, the optimiser can
> obviously get rid of it easily).

If the intention was to help the gcc optimizing the code, that was not
readable from the old version. It also wasn't that clear that wakewrite
and sem->activity basically have the same information (only if one reads
the code carefully one sees that "wakewrite" actually means "only if
there's no activity, wake a writer").

bye, Roman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/