The compiler isnt obliged to actually generate the assignment in order
otherwise, so given
writew(1, foo+2);
writew(2, foo);
it might have the urge to reverse them - perhaps to optimise in using
postincrement modes
volatile says "stuff happens here beyond the compilers direct knowledge of
events".
Simple example
i=0;
while(i<100000) i++;
can be optimised to i=100000 if i is not volatile
Alan
-
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/