comp.lang.ada
 help / color / mirror / Atom feed
From: "Vinzent Hoefler" <0439279208b62c95f1880bf0f8776eeb@t-domaingrabbing.de>
Subject: Re: About task-safeness
Date: Thu, 03 Feb 2011 18:59:42 +0100
Date: 2011-02-03T18:59:42+01:00	[thread overview]
Message-ID: <op.vqb9lsu5lzeukk@jellix.jlfencey.com> (raw)
In-Reply-To: ffe8a425-eade-4403-8b89-b8aa844095fb@z31g2000vbs.googlegroups.com

Maciej Sobczak wrote:

> On Feb 2, 10:14 pm, mockturtle <framefri...@gmail.com> wrote:
>
>> > Well, ARM 05, A(3/2) says:
>>
>> > |The implementation shall ensure that each language-defined subprogram is reentrant in
>> > |the sense that concurrent calls on the same subprogram perform as specified, so long
>> > |as all parameters that could be passed by reference denote nonoverlapping objects.
>>
>> > Apart from that, you probably have to trust the programmer - or some tool.
>>
>> Thank you, that is what I needed.
>
> Note that this is actually quite weak guarantee. It says that any call
> that refers to the same object need not be task-safe, even if a common
> sense would suggest otherwise. It was already discussed here, but two
> notable examples that are worth to keep in mind are:
>
> - two tasks printing something on stdout are *not* safe
>
> - two tasks "only reading" values from the same container are *not*
> safe

Of course not, because if you think a bit harder about it, the result is that
both calls use a "parameter that could be passed by reference" denoting the
same "non-overlapping object".


Vinzent.

-- 
You know, we're sitting on four million pounds of fuel, one nuclear weapon,
and a thing that has 270,000 moving parts built by the lowest bidder.
Makes you feel good, doesn't it?
   --  Rockhound, "Armageddon"



  parent reply	other threads:[~2011-02-03 17:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 20:51 About task-safeness mockturtle
2011-02-02 21:01 ` Vinzent Hoefler
2011-02-02 21:14   ` mockturtle
2011-02-02 22:16     ` Maciej Sobczak
2011-02-02 22:28       ` Shark8
2011-02-02 22:40         ` Peter C. Chapin
2011-02-03  8:33           ` Dmitry A. Kazakov
2011-02-03 17:59       ` Vinzent Hoefler [this message]
2011-02-02 22:38 ` J-P. Rosen
2011-02-03  2:44 ` Randy Brukardt
2011-02-03  8:53   ` Niklas Holsti
2011-02-03 11:07     ` Georg Bauhaus
2011-02-03 11:22       ` AdaMagica
2011-02-03 18:13         ` Jeffrey Carter
2011-02-04  0:33     ` Randy Brukardt
replies disabled

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