comp.lang.ada
 help / color / mirror / Atom feed
From: Alex Mentis <asmentis@gmail.com>
Subject: Re: Timing code blocks
Date: Mon, 8 Mar 2010 04:16:06 -0800 (PST)
Date: 2010-03-08T04:16:06-08:00	[thread overview]
Message-ID: <9ede11e6-8bfa-4295-b6d5-24af30304f2a@x22g2000yqx.googlegroups.com> (raw)
In-Reply-To: 4b92fb17$0$6716$9b4e6d93@newsspool2.arcor-online.net

On Mar 6, 8:02 pm, Georg Bauhaus <rm-host.bauh...@maps.futureapps.de>
wrote:
> On 3/6/10 1:06 PM, Simon Wright wrote:
>
> > Georg Bauhaus<rm-host.bauh...@maps.futureapps.de>  writes:
>
> >> On 3/6/10 12:35 AM, Simon Wright wrote:
> >>> Alex Mentis<asmen...@gmail.com>   writes:
>
> >>>> Confirmed: the bug is still present in GNAT GPL 2009.
>
> >>> Not on Mac OS X (Snow Leopard), it isn't.
>
> >> Seeing the different behavior, what should be the best update
> >> for
> >>http://en.wikibooks.org/wiki/Ada_Programming/Tips#Quirks
>
> > That looks _quite_ explicit ("Using GNAT on Windows, ..."). It would be
> > nice to have a reference to the (Bugzilla?) report!
>
> Interesting in itself, and by coincidence, while reading
> Pat Rogers's new contribution to the Shootout, I noticed
> some lines that read
>
>    delay 0.0;  -- yield
>
> http://shootout.alioth.debian.org/u64q/program.php?test=chameneosredu...

Forward from AdaCore, FYI:

> We are able to reproduce the problem.

The problem is now understood and corrected in the development version
of GNAT.
It will most probably be corrected in GNAT GPL 2010.

What is happening here is that there is a missing call to
System.OS_Primitives.Initialize, when you use Ada.Real_Time but not
Ada.Calendar or any of the real time features of Ada, such as a delay
statement.

The fix consists in calling System.OS_Primitives.Initialize during
elaboration of Ada.Real_Time.

On POSIX platforms, because System.OS_Primitives.Initialize is a null
procedure, this missing call did not really matter.

Thank you for this report,

--  Vincent Celier




  reply	other threads:[~2010-03-08 12:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05  6:34 Timing code blocks deadlyhead
2010-03-05  7:55 ` Dmitry A. Kazakov
2010-03-05  8:16   ` deadlyhead
2010-03-05  8:49     ` Dmitry A. Kazakov
2010-03-05 12:41       ` Alex Mentis
2010-03-05 21:15         ` Jeffrey R. Carter
2010-03-05 23:35         ` Simon Wright
2010-03-06  9:50           ` Georg Bauhaus
2010-03-06 12:06             ` Simon Wright
2010-03-07  1:02               ` Georg Bauhaus
2010-03-08 12:16                 ` Alex Mentis [this message]
2010-03-06 12:12           ` Alex Mentis
2010-03-05  8:33   ` Ludovic Brenta
2010-03-05  9:04     ` Dmitry A. Kazakov
2010-03-05 15:27       ` Reporting bugs (was: Timing code blocks) Ludovic Brenta
2010-03-06  7:13         ` Stephen Leake
2010-03-05 23:35   ` Timing code blocks Simon Wright
2010-03-05  8:21 ` Niklas Holsti
2010-03-05 20:17   ` Simon Wright
replies disabled

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