[Info-vax] Volatile, was: Re: yet another sys$qiow question
Craig A. Berry
craigberry at nospam.mac.com
Thu Aug 20 10:45:50 EDT 2015
On 8/20/15 8:54 AM, JF Mezei wrote:
> So, after reading this, I am still puzzled...
>
> in DEC-C, how does one declare a variable as "volatile" ?
As with any C compiler, using the "volatile" keyword, obviously:
$ help cc language_topics type_qualifiers volatile
CC
Language_topics
Type_Qualifiers
volatile
The volatile data-type qualifier prevents an object from being
stored in a machine register, forcing it to be allocated in
memory.
This data-type qualifier is useful for declaring data that is
to be
accessed asynchronously. A device driver application often uses
volatile data storage. Like const, you can specify the volatile
data-type qualifier with any of the storage-class specifiers or
modifiers with the exception of the register storage class.
More information about the Info-vax
mailing list