volatile in struct
Leon Pollak
leonp at plris.com
Wed Feb 18 17:20:12 UTC 2004
On Wednesday 18 February 2004 16:20, Sergei Organov wrote:
> Juergen Zeller <juergen.zeller at argovision.de> writes:
> [...]
>
> > I think I know the meaning of volatile and this is what you discussed.
>
> Really? There just been lengthy discussion in 'comp.programming.threads'
> and 'comp.lang.c++.moderated' newsgroups about what volatile actually means
> in C/C++ between rather experienced programmers. I had no intention to
> repeat all that here.
My 2c...:-)
I did not read the mentioned news groups discussions but according to the
names I should assume that the discussion was around the possible
multi-tasking/threading problems and C++ aspects.
About the volatile itself, I think, this is rather simple to understand if one
can look at the assembler code generated by compilers.
My analysis showed, that in most cases the compiler adds the variable address
recalculation (if needed) and rereading/writing from/to the recalculated
address.
I do not mention here all possible problems which can arise in the case of
multitasking environment, when another task may intervene in the set of
assembler commands from above...
BR
--
Leon M.Pollak
leonp at plris dot com
More information about the users
mailing list