comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Is a Boolean type inherently atomic ?
Date: Fri, 12 May 2023 18:56:54 +0200	[thread overview]
Message-ID: <u3lr4m$1opm3$1@dont-email.me> (raw)
In-Reply-To: <u3lcs5$1f7e7$1@dont-email.me>

Le 12/05/2023 à 14:53, Jeffrey R.Carter a écrit :
> On 2023-05-12 14:17, Rod Kay wrote:
>>     Surely only the least significant bit of the least significant 
>> byte is relevant and so the value cannot be garbled by one task 
>> writing and another reading at the same time ?
> 
> Boolean types with other representations using multiple bits are 
> possible, so your assumption doesn't hold.
> 
True, especially considering the special exception for boolean types in 
13.4(8)

Anyway, if you intend to access a variable from multiple tasks, it 
doesn't cost much to add an aspect Atomic to the declaration, at least 
to inform the reader!

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
https://www.adalog.fr https://www.adacontrol.fr

  reply	other threads:[~2023-05-12 16:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 12:17 Is a Boolean type inherently atomic ? Rod Kay
2023-05-12 12:53 ` Jeffrey R.Carter
2023-05-12 16:56   ` J-P. Rosen [this message]
2023-05-12 17:38 ` Niklas Holsti
2023-05-12 18:02 ` AdaMagica
2023-05-13  0:28 ` Rod Kay
replies disabled

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