From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6bccf7d57f63267,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!b79g2000hse.googlegroups.com!not-for-mail From: Gerd Newsgroups: comp.lang.ada Subject: Tasking problem (delay) Date: Wed, 15 Aug 2007 10:04:50 -0700 Organization: http://groups.google.com Message-ID: <1187197490.377548.41000@b79g2000hse.googlegroups.com> NNTP-Posting-Host: 82.210.237.30 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1187197490 28271 127.0.0.1 (15 Aug 2007 17:04:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 15 Aug 2007 17:04:50 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 mu10iwss01:8080 (IWSS), 1.0 proxy.kmweg.de:3128 (squid/2.5.STABLE10-CVS) Complaints-To: groups-abuse@google.com Injection-Info: b79g2000hse.googlegroups.com; posting-host=82.210.237.30; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1450 Date: 2007-08-15T10:04:50-07:00 List-Id: Hi all, I have a problem with some code. Maybe I misunderstood the LRM. Can someone explain and maybe show a solution? First I have to say, I work with GNAT on Windows, but what I try is to simulate the behavior of an embedded processor (which is currently programmed in C). I have three tasks (much reduced from real world task), one for startup, one for receiving data and one for processing it: WD_Delay: Duaration := 1000.0; -- so do not trigger on start task startup is end startup; task receiver is end receiver; task worker is entry Data(...); end worker; task body startup is begin ... WD_Delay := 1.0; ... end startup; task body receiver is begin loop ... -- receive data worker.Data (...); end loop; end receiver; task body worker is begin loop select accept Data (...) or delay WD_Timeout; trigger_WD; end select; end loop; end worker; So what I expected was, that after the init-task set the new delay, the worker would trigger the watchdog in short intervalls. But it seems, that the delay still waits for the initial delay time. Whats wrong? Thanks, Gerd