comp.lang.ada
 help / color / mirror / Atom feed
From: Sebastian Hanigk <hanigk@in.tum.de>
Subject: Re: [Ravenscar] run tasks on events
Date: Fri, 30 May 2008 10:57:03 +0200
Date: 2008-05-30T10:57:03+02:00	[thread overview]
Message-ID: <g1ofgv$qgg$1@news.lrz-muenchen.de> (raw)
In-Reply-To: 483fabe3$0$23819$4f793bc4@news.tdc.fi

Niklas Holsti <niklas.holsti@tidorum.invalid> writes:

> Anh Vo wrote:
>> It is not true. Protected entry, implemented in Transient
>> Signals for example, can suspend/release multiple tasks.
>
> True in unrestricted Ada (an entry queue can hold many tasks), false
> under the Ravenscar profile (maximum one task waiting on an entry). If
> you use protected objects to trigger tasks, you need one object per
> task.

Argh. Seems I was too early in my reply to Anh Vo ...

Shouldn't there be a constraint error?

> Note that under the Ravenscar profile, one generally needs one
> protected object per (sporadic) task, anyway, to trigger that task
> when required. This protected object can easily be extended with a
> boolean control variable such that the entry triggers the task only in
> the appropriate modes or phases.

I hadn't included the Profile pragma in all my source files, so I'm
assuming that the successful test earlier on was due to not complying
with the Ravenscar profile. Having put the pragma directives into the
source code, now only one of the waiting tasks resumes/suspends.

> On the other hand, personally I'm a bit skeptical about triggering
> certain tasks only in certain modes. I suspect that most systems could
> as well keep the same set of active tasks, and just make the tasks do
> different things in different modes, using plain old "if then else" in
> the task body.

Well, I found the signaling/scheduling concept very elegant; now it
seems my best bet would be a check inside each task's loop if the
respective conditions evaluate to True, otherwise simply delay until the
next period.


Thank you for your help!

Sebastian



  reply	other threads:[~2008-05-30  8:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 19:14 [Ravenscar] run tasks on events Sebastian Hanigk
2008-05-28 23:47 ` jimmaureenrogers
2008-05-29 10:35   ` Sebastian Hanigk
2008-05-29  3:16 ` ahab
2008-05-29 10:31   ` Sebastian Hanigk
2008-05-29 18:56     ` Anh Vo
2008-05-30  6:56       ` Sebastian Hanigk
2008-05-30  7:26 ` [Ravenscar] " Niklas Holsti
2008-05-30  8:57   ` Sebastian Hanigk [this message]
2008-05-30 10:47     ` Niklas Holsti
2008-05-30 11:17       ` Sebastian Hanigk
2008-05-30 15:24         ` Alex R. Mosteo
2008-05-30 15:35           ` Ed Falis
2008-05-30 18:02             ` Sebastian Hanigk
2008-05-30 18:11               ` Ed Falis
2008-05-30 11:59       ` stefan-lucks
2008-05-30 12:17 ` jimmaureenrogers
2008-05-30 18:59   ` Sebastian Hanigk
2008-06-02 10:32     ` Alex R. Mosteo
replies disabled

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