comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Forcing GNAT to use 32-bit load/store instructions on ARM?
Date: Wed, 02 Jul 2014 01:38:09 +0300
Date: 2014-07-02T01:38:09+03:00	[thread overview]
Message-ID: <c1gribF9j9oU1@mid.individual.net> (raw)
In-Reply-To: <lov8m0$433$1@dont-email.me>

On 14-07-02 00:20 , Simon Clubley wrote:
> On 2014-07-01, Niklas Holsti <niklas.holsti@tidorum.invalid> wrote:
>> On 14-07-01 23:40 , Simon Clubley wrote:
>>> On 2014-07-01, daniel.dmk@googlemail.com <daniel.dmk@googlemail.com> wrote:
>>>> So could there be a problem with GNAT's Atomic on ARM?
>>>>
>>>
>>> Yes, big time.
>>
>> No. The Atomic guarantee only applies to read/write of the whole record.
>> My earlier post in this thread was in error.
>>
> 
> That's interesting, and depressing, as it reduces the usefulness of
> Atomic hugely.
> 
> When c.l.a talked a few weeks ago about syntax for the atomic update
> of multiple bitfields at the same time, I had thought the general
> view was that Atomic on a record resulted in register updates in units
> of the record size when updating a single bitfield, but that's clearly
> not the case as you have just pointed out.

As I remember, the new syntax ideas in that discussion were meant to
update some bitfields in an atomic record as part of a read, modify,
write sequence, accessing the whole record without using a temporary
variable to hold the value. So Ada's rule for Atomic was included and
assumed in that discussion. I am ashamed for forgetting it... maybe
there have been too many midnight-football-viewing sessions lately :-)

> I think this whole area of the atomic updating of multiple bitfields is
> something which needs work in Ada especially now the above revelation
> means Ada is even weaker in this specific area than I thought it was.

I don't think the weakness is serious. Using a temporary variable to
ensure whole-record access is a pretty clean work-around, IMO. But the
new aggregate-like syntax suggested in the earlier discussion could be
used for other things, too, so I am still in favour of it.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .

  reply	other threads:[~2014-07-01 22:38 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 22:11 Forcing GNAT to use 32-bit load/store instructions on ARM? daniel.dmk
2014-06-30 23:41 ` Jeffrey Carter
2014-07-01 12:06   ` Simon Clubley
2014-07-01 15:44     ` Niklas Holsti
2014-07-01 17:26       ` Simon Clubley
2014-07-01 17:18     ` Simon Wright
2014-07-01 19:43       ` Simon Wright
2014-07-01 17:28     ` Jeffrey Carter
2014-07-01  0:55 ` anon
2014-07-01  4:30 ` Niklas Holsti
2014-07-01  8:11 ` Dmitry A. Kazakov
2014-07-01 12:09   ` Simon Clubley
2014-07-01 12:20     ` Dmitry A. Kazakov
2014-07-01 17:00       ` Simon Clubley
2014-07-01 19:36         ` Dmitry A. Kazakov
2014-07-01 20:08           ` Simon Clubley
2014-07-02 22:24             ` Randy Brukardt
2014-07-06 20:40               ` MatthiasR
2014-07-07  0:25                 ` Simon Clubley
2014-07-07 22:38                 ` Randy Brukardt
2014-07-08  6:51                   ` Simon Wright
2014-07-10 11:47                     ` Simon Wright
2014-07-10 13:06                       ` Simon Clubley
2014-07-11 18:05                         ` Simon Wright
2014-07-11 20:22                           ` Simon Clubley
2014-07-08  8:50                   ` Brian Drummond
2014-07-08 12:12                   ` Simon Clubley
2014-07-08 13:26                     ` G.B.
2014-07-08 17:13                       ` Simon Clubley
2014-07-08 15:36                     ` Adam Beneschan
2014-07-08 15:40                       ` Adam Beneschan
2014-07-08 20:34                     ` Randy Brukardt
2014-07-09  7:31                       ` Dmitry A. Kazakov
2014-07-10  0:11                         ` Simon Clubley
2014-07-20 11:35                   ` MatthiasR
2014-07-20 15:49                     ` Simon Clubley
2014-07-26 11:05                       ` MatthiasR
2014-08-10 11:20                         ` MatthiasR
2014-07-01 12:03 ` Simon Clubley
2014-07-01 19:52   ` daniel.dmk
2014-07-01 20:40     ` Simon Clubley
2014-07-01 20:55       ` Simon Clubley
2014-07-01 21:01       ` Niklas Holsti
2014-07-01 21:20         ` Simon Clubley
2014-07-01 22:38           ` Niklas Holsti [this message]
2014-07-02 16:49             ` Simon Clubley
2014-07-01 21:55         ` daniel.dmk
2014-07-02  7:30     ` Simon Wright
2014-07-02 18:52       ` daniel.dmk
2014-07-04 23:51       ` Niklas Holsti
2014-07-05  0:18         ` Niklas Holsti
replies disabled

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