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

Roman Zippel (
Mon, 29 Jul 2002 13:42:38 +0200 (CEST)


On Mon, 29 Jul 2002, David Howells wrote:

> It doesn't appear to make any difference which way it is done. The i386 code
> from both looks the same.

Then I vote for the simpler version. :)
BTW even if gcc had problems optimizing that, I'd rather make it explicit,
that the two variables contain the same information:

activity = sem->activity = 0;
if (!list_empty(&sem->wait_list))
sem = __rwsem_do_wake(sem, activity);

IMO that's more readable and will still work if gcc had to flush the
cached information before using it.

bye, Roman

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at