LWN.net Logo

The trouble with volatile

The trouble with volatile

Posted May 11, 2007 6:16 UTC (Fri) by jzbiciak (✭ supporter ✭, #5246)
Parent article: The trouble with volatile

Hiding 'volatile' in the various accessor macros, etc. is entirely different than bare 'volatile' in the code. The statement that "volatile is said to be basically-always-wrong in-kernel" applies to the second case in my opinion.

The platform and compiler specific trickery is safely hidden away, and the rest of the kernel "does the right thing" no matter where it runs.

This document will keep you busy for awhile. Heavy stuff.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds