comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: is there a version of unix written in Ada
Date: Sat, 3 Oct 2020 13:44:47 +0300	[thread overview]
Message-ID: <htr310Fh6phU1@mid.individual.net> (raw)
In-Reply-To: <rl9c0f$uf2$1@gioia.aioe.org>

On 2020-10-03 11:16, Dmitry A. Kazakov wrote:
> On 03/10/2020 09:44, Niklas Holsti wrote:
>> On 2020-10-03 9:42, Dmitry A. Kazakov wrote:
>>> On 03/10/2020 05:09, Randy Brukardt wrote:
>>>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
>>>> news:rl6its$10h7$1@gioia.aioe.org...
>>>
>>>>>> [If O3 was nested in O2, then the second call to O2 could be 
>>>>>> internal.
>>>>>> But in that case, the first path would be impossible as O1 could 
>>>>>> not see O3
>>>>>> to call it.]
>>>>>>
>>>>>> Remember that the decision as to whether a call is internal or 
>>>>>> external
>>>>>> is
>>>>>> purely syntactic: if a protected object is given explicitly in the 
>>>>>> call,
>>>>>> one
>>>>>> needs to trigger the mutual exclusion mechanisms again. The only 
>>>>>> time one
>>>>>> doesn't need to do that is when the call does not include the object
>>>>>> (that
>>>>>> is, directly from the body of an operation).
>>>>>
>>>>> Even when the object in the call is statically known to be same?
>>>>
>>>> Yes. An external call *always* gets the lock again. I believe that 
>>>> was made
>>>> the rule to make it obvious as to what will happen based on the form of
>>>> call.
>>>
>>> I mean this:
>>>
>>>     protected body O is
>>>        procedure P1 is
>>>        begin
>>>           ...
>>>        end P1;
>>>        procedure P2 is
>>>        begin
>>>           P1;   -- OK
>>>           O.P1; -- Deadlock or Program_Error
>>
>>
>> That is an internal call, so no deadlock nor error.
>>
>> See RM 9.5(4.e), which is this exact case.
>>
>>
>>>        end P2;
>>>     end O;
> 
> I.e. it is *not* based on the syntax of the call.


At least not on /that/ syntactical difference.


> Anyway the rather disappointing result is that protected procedures may 
> deadlock (or Program_Error) in a legal program.


Legal program can run into all sorts of problems, starting with 
use-before-elaboration.


> So my initial disinclination to jump from one protected object to 
> another is a reasonable advise.


Quite conservative advice, though.


> Or at least the order in which protected 
> objects are navigated must be same.


I would say that it is advisable to arrange the POs (or PO types) in a 
layered architecture and make inter-PO calls only from a higher-layer PO 
to a lower-layer PO.

  reply	other threads:[~2020-10-03 10:44 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 22:21 is there a version of unix written in Ada Randy Brukardt
2020-10-02  6:55 ` Dmitry A. Kazakov
2020-10-03  3:09   ` Randy Brukardt
2020-10-03  6:42     ` Dmitry A. Kazakov
2020-10-03  7:44       ` Niklas Holsti
2020-10-03  8:16         ` Dmitry A. Kazakov
2020-10-03 10:44           ` Niklas Holsti [this message]
     [not found] <e3c51e65-b71e-4623-bd58-c94cdbcc3ba6o@googlegroups.com>
2020-07-25  7:37 ` mockturtle
2020-07-26 19:45   ` Stéphane Rivière
2020-07-26 22:15     ` Jeffrey R. Carter
2020-07-27  7:40       ` Stéphane Rivière
2020-07-28 13:08       ` DrPi
2020-07-28 16:48         ` Simon Wright
2020-07-28 17:00           ` Fabien Chouteau
2020-07-29  9:21             ` DrPi
2020-07-29  9:28               ` Fabien Chouteau
2020-07-29 15:02                 ` DrPi
2020-07-29 15:11                   ` Fabien Chouteau
2020-07-29 20:41                     ` DrPi
2020-07-29  9:20           ` DrPi
2020-07-29 16:53             ` Simon Wright
2020-07-29 20:42               ` DrPi
2020-07-25  8:47 ` Niklas Holsti
2020-07-25  9:36   ` Stéphane Rivière
2020-07-25 10:41 ` Luke A. Guest
2020-07-25 14:43 ` Jesper Quorning
2020-07-25 19:20 ` Andreas ZEURCHER
2020-07-27  7:40   ` Stéphane Rivière
2020-07-27 15:00     ` nobody in particular
2020-07-27 14:58   ` nobody in particular
2020-07-27 20:28 ` Shark8
2020-07-30  0:57 ` gdotone
2020-07-31 14:01   ` Shark8
2020-09-23 17:39   ` Olivier Henley
2020-09-25 15:06     ` DrPi
2020-09-25 17:31       ` Andreas ZEURCHER
2020-09-26  8:50         ` DrPi
2020-09-27 18:55           ` Luke A. Guest
2020-09-27 19:07             ` Luke A. Guest
2020-09-27 18:53         ` Luke A. Guest
2020-09-27 14:25     ` Shark8
2020-09-27 15:01       ` Dmitry A. Kazakov
2020-09-27 20:59         ` DrPi
2020-09-28  7:41           ` Dmitry A. Kazakov
2020-09-28 13:48             ` Olivier Henley
2020-09-28 14:48               ` Dmitry A. Kazakov
2020-09-28 16:28                 ` Olivier Henley
2020-09-28 20:30                   ` Dmitry A. Kazakov
2020-09-28 21:06                     ` Shark8
2020-09-28 17:47                 ` Paul Rubin
2020-09-28 20:27                   ` Dmitry A. Kazakov
2020-09-29 23:54                     ` Paul Rubin
2020-09-30  8:18                       ` Dmitry A. Kazakov
2020-09-30 17:27                         ` Paul Rubin
2020-09-30 19:42                           ` Dmitry A. Kazakov
2020-09-30 20:33                             ` Paul Rubin
2020-09-30 21:03                               ` Dmitry A. Kazakov
2020-09-30 22:42                                 ` Randy Brukardt
2020-10-01  9:28                                   ` Dmitry A. Kazakov
2020-10-01  9:59                                     ` J-P. Rosen
2020-10-01 10:21                                       ` Dmitry A. Kazakov
2020-10-01 11:38                                         ` Niklas Holsti
2020-10-01 11:52                                           ` Niklas Holsti
2020-10-01 12:51                                           ` Dmitry A. Kazakov
2020-10-01 14:18                                             ` J-P. Rosen
2020-10-01 15:44                                               ` Dmitry A. Kazakov
2020-10-01 22:10                                                 ` Randy Brukardt
2020-10-02  5:36                                                 ` J-P. Rosen
2020-10-02  6:56                                                   ` Dmitry A. Kazakov
2020-10-02  7:42                                                     ` J-P. Rosen
2020-10-03  3:14                                                       ` Randy Brukardt
2020-10-01 15:38                                             ` Niklas Holsti
2020-10-01 16:06                                               ` Dmitry A. Kazakov
2020-10-01 17:01                                                 ` Niklas Holsti
2020-10-01 17:37                                                   ` Dmitry A. Kazakov
2020-10-01 22:13                                                 ` Randy Brukardt
2020-10-01 11:48                                         ` J-P. Rosen
2020-10-01 12:54                                           ` Dmitry A. Kazakov
2020-10-01  7:57                                 ` Paul Rubin
2020-10-01  9:26                                   ` Dmitry A. Kazakov
2020-10-01  9:46                                     ` Paul Rubin
2020-10-01 10:35                                       ` Dmitry A. Kazakov
2020-10-01 19:02                                       ` DrPi
2020-10-01 23:12                                         ` Paul Rubin
2020-10-01 21:54                                       ` Randy Brukardt
2020-10-01 23:14                                         ` Paul Rubin
2020-10-01 21:36                             ` Brian Drummond
2020-10-02  6:56                               ` Dmitry A. Kazakov
2020-10-02 18:34                                 ` Brian Drummond
2020-10-02 21:24                                   ` Paul Rubin
2020-10-06 23:54                                     ` Brian Drummond
2020-10-03  6:54                                   ` Dmitry A. Kazakov
2020-10-05 14:03                               ` Shark8
2020-10-07 11:56                               ` Olivier Henley
2020-10-09 12:35                               ` Olivier Henley
2020-10-09 14:41                                 ` Brian Drummond
2020-09-28 18:40                 ` Vincent Marciante
2020-09-28 20:28                   ` Dmitry A. Kazakov
2020-09-28 17:04               ` DrPi
2020-09-28 17:30                 ` Olivier Henley
2020-09-28 18:05                   ` Olivier Henley
2020-09-28 19:36               ` Shark8
2020-09-03 10:32 ` c+
2020-09-12  4:30 ` sumde121
2020-09-19 14:09 ` erchetan33
replies disabled

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