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 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/