Artur Skawina wrote:
>
> Andrew Morton wrote:
> >
> > For uniprocessors this:
> >
> > const int cpu = smp_processor_id();
> > if (dev->xmit_lock_owner != cpu) {
> >
> > generates faster code than this:
> >
> > int cpu = smp_processor_id();
> > if (dev->xmit_lock_owner != cpu) {
> ...
>
> gcc version?
pgcc-2.91.66 19990314 (egcs-1.1.2 release)
Also the current development version. I haven't checked 2.7.2.whatever
but the compiler has behaved this way for a long time.
> [for cases i tried in the past it always made no difference,
> a quick test w/ gcc2.95 shows no difference.]
For simple testcases the compiler works it out correctly. For more
complex code it needs this help.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:11 EST