comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Help with anormal pausing of program
Date: Thu, 12 Jun 2003 07:26:34 GMT
Date: 2003-06-12T07:26:34+00:00	[thread overview]
Message-ID: <KWVFa.114766$d51.187039@sccrnsc01> (raw)
In-Reply-To: MPG.19523cac3b448dfc98971d@News.CIS.DFN.DE

>I see that we are talking about two different problems? The MSKB article
>talks about leaps forward, but your test program shows leaps back. In
>reality, more that leaps, it seems that some value is mangled because
  -- Some buggy chipsets have a counter that appears to run backwards
  -- under heavy load (see Q274323), and Windows corrects this by
  -- adding 2**24 (5-15 sec). Yuck! We need to try to detect this
So Gnat 3.14p had a clock that could jump forward several seconds.
The fix is to watch for a suspicious jump, check it against the
Windows system clock, and correct if needed.  For that you need
the system clock and the performance counter values at some base
synchronization point.  Gnat 3.15p failed to recalculate the base
when it did a resynchronization, so, IIRC, time would go into the
future, and a short "delay" would become a long one, waiting for
the future time.
  It's late, and I'm tired, so I don't guarantee this is right,
but it appears my fix for Gnat 3.15p was to add the line
      Base_Monotonic_Clock := Base_Clock;
at line 165 of s-osprim.adb, just before the line
   end Get_Base_Time;
and then to compile with
gcc -c -gnatg -O2 s-osprim.adb
Because of heavy inlining, you'll find other parts of the Gnat
run-time that also need recompiling the same way.



  reply	other threads:[~2003-06-12  7:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-10 23:37 Help with anormal pausing of program Jano
2003-06-11 14:31 ` Dmitriy Anisimkov
2003-06-11 18:42   ` Jano
2003-06-11 19:54     ` Pascal Obry
2003-06-12  2:21     ` Anisimkov
2003-06-12  6:31       ` Jano
2003-06-12  7:26         ` tmoran [this message]
2003-06-12  7:47           ` Jano
2003-06-12  9:43           ` Georg Bauhaus
2003-06-12 17:09             ` tmoran
2003-06-12 22:19               ` Georg Bauhaus
2003-06-13 18:13               ` Jano
2003-06-14  4:59                 ` tmoran
2003-06-12  7:47         ` Jano
2003-06-12 12:59           ` Dmitriy Anisimkov
2003-06-12  8:32         ` Preben Randhol
2003-06-12  7:06       ` Vinzent Hoefler
2003-06-13 13:35         ` Dmitriy Anisimkov
2003-06-11 20:16   ` tmoran
2003-06-11 21:11     ` Jano
2003-06-11 22:36       ` tmoran
2003-06-12  6:38         ` Jano
2003-06-12 18:08   ` Wiljan Derks
replies disabled

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