(j3.2006) (SC22WG5.3733) [ukfortran] Atomic stuff
Thu Dec 4 04:10:21 EST 2008
On Dec 4 2008, Van Snyder wrote:
>An ATOMIC attribute for a variable doesn't affect its representation: it
>only affects how it is accessed or defined, within the scoping unit or
>construct wherein it is specified. It requires both atomic references
>and atomic updates. That's all. ...
Regrettably, that is NOT true!
There are virtually no systems that support atomic access to unaligned
objects, and many compilers that allow ordinary objects to be unaligned.
There used to be many systems where atomic accesses had to be to a
particular size, which was not necessarily the size of any of Fortran's
default types, and there may still be some.
If you make ATOMIC simply an attribute, and allow it to be different in
different scopes, all such systems would have to implement atomic accesses
using locking, or risk the race condition. Given that benchmarketing rules,
what do YOU think they will do?
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the J3