🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1118

Re: Interpretation of volatile - two questions

#1118
From: Doug Gwyn
Date: Thu, 22 Mar 1990 17:51
16 lines
1530 bytes
In article <DAVEG.90Mar21203033@near.cs.caltech.edu> daveg@near.cs.caltech.edu (Dave Gillespie) writes:
>... a compiler on such a machine could surround a
>volatile object with enough padding to keep it isolated.

There are two problems with this.  The minor one is that it wasn't the
intention of X3J11 (as I understand it) for type qualifiers to affect
representations, which is what an impact on padding would amount to.
The more important one is that examples like the one we were using are
typical of access to device registers, for which spurious padding
would simply mean inability to access some of the register contents.
I've encountered examples of Unibus devices and PDP-11 CPU memory
access combinations where one had to be extraordinarily careful, due
to such things as a WRITE cycle having a different effect from a
READ-MODIFY-WRITE.  There is a limit to how much of this sort of thing
can reasonably be reflected in C language rules, which is one of the
reasons that the meaning of volatile access is implementation defined.
Technical Details
Message-ID: <12400@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mailrus!ames!haven!adm!smoke!gwyn
References: <2604A628.8521@paris.ics.uci.edu> <1990Mar19.165931.22758@utzoo.uucp> <DAVEG.90Mar21203033@near.cs.caltech.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mailrus!ames!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Interpretation of volatile - two questions
Message-ID: <12400@smoke.BRL.MIL>
Date: 22 Mar 90 17:51:05 GMT
References: <2604A628.8521@paris.ics.uci.edu> <1990Mar19.165931.22758@utzoo.uucp> <DAVEG.90Mar21203033@near.cs.caltech.edu>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 16