comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Waiver question
Date: 1997/05/04
Date: 1997-05-04T00:00:00+00:00	[thread overview]
Message-ID: <dewar.862718682@merv> (raw)
In-Reply-To: 1997May2.164921.1@eisner


Larry said

<<A casual programmer would presume that if variable A is only modified
by task AA and variable B is only modified by task BB then they are
task-safe.  This is not true if the variables share a longword on
Alpha.  Having variables default to not sharing a longword goes a
long way toward eliminating this exposure.
>>

Well of course if you have two separate variables, you have to make sure
they can be indepednetly accessed by tasks, and if the compiler cannot
verify that this might not occur, then of cours they cannot occupy the
same longword.

The more uncomfortable case is one like this:

   type x is array (1 .. 64) of character;

now, it is really uncomfortable to by default allocate one longword
for each character for this declaration, and in practice it is
extremely unlikely that two tasks would access different characters
of this string.

Note that in Ada 83, such access would be erroneous in any case. In Ada 95,
this kind of access is valid, but the consequence of this change is rather
unpleasant for the (old style) Alpha.





  parent reply	other threads:[~1997-05-04  0:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-18  0:00 Waiver question Ken Garlington
1997-04-19  0:00 ` Tom Moran
1997-04-20  0:00 ` Robert Dewar
1997-04-21  0:00   ` Ken Garlington
1997-04-22  0:00     ` Ken Garlington
1997-04-23  0:00       ` Corey Minyard
1997-04-24  0:00         ` Richard Kenner
1997-04-28  0:00         ` Larry Kilgallen
1997-04-28  0:00           ` Corey Minyard
1997-04-29  0:00             ` Kaz Kylheku
1997-04-29  0:00             ` Robert Dewar
1997-04-29  0:00             ` Laurent Guerby
1997-04-30  0:00               ` Corey Minyard
1997-04-29  0:00           ` Robert Dewar
1997-04-29  0:00           ` Richard Kenner
1997-04-30  0:00             ` Robert A Duff
1997-05-01  0:00               ` Kaz Kylheku
1997-05-02  0:00                 ` Robert A Duff
1997-05-02  0:00                   ` Larry Kilgallen
1997-05-02  0:00                     ` Robert Dewar
1997-05-02  0:00                     ` Robert A Duff
1997-05-02  0:00                       ` Larry Kilgallen
1997-05-03  0:00                         ` Robert A Duff
1997-05-03  0:00                           ` Larry Kilgallen
1997-05-04  0:00                             ` Robert Dewar
1997-05-04  0:00                         ` Robert Dewar [this message]
1997-05-06  0:00                     ` John M. Mills
1997-04-30  0:00             ` Robert Dewar
1997-05-01  0:00               ` Larry Kilgallen
1997-05-07  0:00                 ` Bad .diff files in gnat-3.09 in Linux Benoit Jauvin-Girard
1997-05-09  0:00                   ` Albert K. Lee
1997-04-23  0:00     ` Waiver question Tarjei Jensen
1997-04-20  0:00 ` Steve Doiel
1997-04-20  0:00 ` Dean Runzel
1997-04-22  0:00   ` Ken Garlington
1997-04-21  0:00 ` Robert I. Eachus
1997-04-21  0:00   ` Robert Dewar
1997-04-22  0:00     ` Robert I. Eachus
1997-04-23  0:00       ` Robert Dewar
1997-04-22  0:00   ` Ken Garlington
1997-04-23  0:00     ` Robert S. White
1997-04-24  0:00     ` Robert Dewar
1997-04-24  0:00       ` Steve Vestal
1997-04-25  0:00         ` Ken Garlington
1997-04-25  0:00         ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox