comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: Periodic tasks - organization
Date: Sun, 20 Jul 2008 10:46:45 +0100
Date: 2008-07-20T10:46:45+01:00	[thread overview]
Message-ID: <m2ljzwyjju.fsf@mac.com> (raw)
In-Reply-To: 1jt6gtl169krz.1g52yb1id2u85$.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Fri, 18 Jul 2008 08:31:29 -0700 (PDT), Anh Vo wrote:
>
>> On Jul 17, 12:31�pm, Simon Wright <simon.j.wri...@mac.com> wrote:
>
>>> But there are limits on what is permissible within a protected
>>> procedure, are there not?
>
> [...]
>
>> My design is completely different from yours. Indeed, an explicit
>> task is not needed. See Gem #15, Timers, for details.
>> http://www.adacore.com/2007/10/29/ada-gem-15/
>
> Hmm, but it is exactly the design presented by Simon. The problem with
> it is that the action fired upon a timer event is called from a
> protected procedure.
>
> This is IMO not what Maciej wanted, because as Simon has pointed out
> protected procedures are very limited in what they allowed do and in
> how they do it.

And further, they are called at interrupt priority (I haven't read up
enough to understand D-15 14/2, but see 25/2: 'executed directly by the
real-time clock interrupt mechanism'), so there are going to be
interesting issues related to shared variable access.

If you aren't running on an RTOS, why are you bothering with the added
complexity? and if you are, won't the standard Ada mechanisms (delay
until, etc) do the trick? (they do for us with VxWorks). I don't quite
buy the notion that RTOS => use timers (at least, not without supporting
them as a variation on the general notion of event, so that some events
can be scheduled to happen in the furure). Some thoughts on this here --
http://coldframe.sourceforge.net/coldframe/event-modelling.html



      parent reply	other threads:[~2008-07-20  9:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-13 21:47 Periodic tasks - organization Maciej Sobczak
2008-07-13 23:35 ` tmoran
2008-07-14  3:52 ` george.priv
2008-07-14  9:08 ` Alex R. Mosteo
2008-07-14 15:31   ` Anh Vo
2008-07-16 21:38     ` Simon Wright
2008-07-16 22:47       ` Anh Vo
2008-07-17 19:31         ` Simon Wright
2008-07-18 15:31           ` Anh Vo
2008-07-18 16:22             ` Dmitry A. Kazakov
2008-07-19  1:37               ` Anh Vo
2008-07-19 10:22                 ` Dmitry A. Kazakov
2008-07-20  9:46               ` Simon Wright [this message]
replies disabled

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