[Info-vax] LLVM, volatile and async VMS I/O and system calls

chris chris-nospam at tridac.net
Fri Sep 24 18:16:27 EDT 2021


On 09/22/21 20:58, Bob Gezelter wrote:
> On Wednesday, September 22, 2021 at 2:11:40 PM UTC-4, Simon Clubley wrote:
orld.
>>
>> There's a reason why volatile is used so liberally in embedded bare-metal
>> programming. :-)
>>
>> Simon.

Primarily because embedded spends a lot of time accessing hardware
registers directly, for example:

volatile unsigned char *ttyport = (volatile unsigned char*) TTY_PORT

which assigns a numerc value to the pointer and tells the compiler
not to optimise it away, nor change the value.

Something application level code should rarely, if ever, see...

Chris




More information about the Info-vax mailing list