On Fri, Apr 01, 2005 at 10:16:44AM -0800, Kelly Murphy wrote: > I know we'd find something like that really handy for some of the > embedded stuff we're doing. > > There's the case where we'd like to have the files of a subsystem to > be optimized but we want a handful of functions that directly access > hardware be unoptimized. (We found that the optimization did some > write reordering that the hardware didn't like. ;) )
Are you using "volatile" correctly? There are situations where "volatile" alone does not suffice and you need more locking, but the Linux and BSD kernel folks manage to optimize their device driver code.