Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pragma Shared (was Ada is almost ....)

26 views
Skip to first unread message

Robert Dewar

unread,
Feb 17, 1996, 3:00:00 AM2/17/96
to

John McCabe says

"I had another look at this today (even later than my last email to
you) and I'm now convinced that the description in RM83 is based
towards the compiler ensuring that it places some sort of mutual
exclusion construct on these objects."

Well you may be convinced, but you are mistaken!

The idea is definitely NOT to generate some mutual exclusion junk. As with
pragma Atomic in Ada 95, the idea is to restrict acceptance of types in
these pragmas to those for which natural code generation ensures atomic
access at the bus level (e.g. a 32 bit integer would be accepted on a 386,
but not on a 286).

pragma Atomic is QUITE different from pragma Volatile. pragma Atomic in
Ada is essentially identical to pragma Shared in Ada 83. pragma Volatile
in Ada is essentially identical to volatile in C, and is a feature that
is not available in Aa 83.

in general John, I strongly advise that you familiarize yourself with
Ada 95, otherwise this conversation mostly retreads discussions that
have been extensively carried out during the Ada 95 design, and in many
cases the concerns you raise are obsolete, and no longer relevant from
a language design point of view (although of course there will be some
people still interested in Ada 83 workarounds).


0 new messages