[M3devel] readonly access to a BOOLEAN, unprotected?

Elmar Stellnberger estellnb at elstel.org
Fri Feb 14 13:32:11 CET 2014

Hmm; some <*VOLATILE*> pragma like you have it in C would likely be 

Am 13.02.2014 22:51, schrieb Rodney M. Bates:
> Rd.m3 contains, for example:
> PROCEDURE Closed (rd: T): BOOLEAN =
>     RETURN (rd.closed);
>   END Closed;
> Most other procedures in Rd lock rd before doing anything.
> Even though it's only read access, and to a BOOLEAN, is it really true 
> that we can rely
> on this to work on all targets with neither a lock nor some atomic 
> operation?
> It seems to me like it should be OK, but I have thought that several 
> times before.
> only to be shown wrong.  Meanwhile, modern hardware keeps adding more 
> complex
> caching, making these things trickier.

More information about the M3devel mailing list