One problem I ran into considering 'char *volatile' was this one: the
compiler is supposed to disable certain optimizations involving
registerization and such, but isn't it still allowed to do constant
folding? That would eliminate the pointer from the intermediate code
altogether, and so the volatile qualifier would be quickly forgotten.
No fixo breako.
Nothing's taking the pointer's address, so the compiler _will_ be able
to prove that (in a sensible universe) no other thread, interrupt,
kernel code or Angered Rain God will be able to find our pointer--much
less change it.
Jeroen
-
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/