Re: howto avoid optimizing a read?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 30 May 1999 15:38:41 +0100 (BST)


> Whats the easiest way to avoid having the read optimized away? I am
> fairly fluent in C, but compiler optimizations are bit too much black
> magic for me.

Look up the volatile keyword in a C manual. It exists for exactly these
sort of occasions.

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