comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ravenscar - release multiple tasks when an event occurs
Date: Tue, 5 May 2020 20:02:04 +0300
Date: 2020-05-05T20:02:04+03:00	[thread overview]
Message-ID: <hhdkgdFihcnU1@mid.individual.net> (raw)
In-Reply-To: <lyeeryfjl3.fsf@pushface.org>

On 2020-05-05 19:11, Simon Wright wrote:
> "J-P. Rosen" <rosen@adalog.fr> writes:
> 
>> Two cases:
> 
>> 2) you want to easily add new tasks as the system evolves, or perhaps
>> the number of tasks is read from a configuration file that describes the
>> interfaces. You can do the same thing, but have a linked list of locks,
>> and some kind of registration process (which you are likely to need anyway).
> 
> This is more like it: the C version of the code creates the task when it
> finds the hardware it needs to deal with, which of course isn't possible
> in Ravenscar (or Jorvik).
> 
> Fairly extravagant for an embedded system to have tasks you're never
> going to use, of course!

If an unused task is suspended, it consumes no or very little 
processing. It does reserve stack memory.

If you cannot allow stack memory for all possible tasks (for all 
possible hardware combinations), you can have a pool of tasks, with as 
many tasks as you can support, and allocate tasks dynamically to the 
hardware units that are present. Of course, each task must then have 
enough stack to handle any hardware it is assigned, so you may have to 
use stack memory more conservatively than otherwise.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .

  reply	other threads:[~2020-05-05 17:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 10:43 Ravenscar - release multiple tasks when an event occurs Simon Wright
2020-05-03 11:50 ` Niklas Holsti
2020-05-05 16:02   ` Simon Wright
2020-05-05 16:16     ` Niklas Holsti
2020-05-03 14:45 ` Jere
2020-05-05 16:05   ` Simon Wright
2020-05-03 15:09 ` J-P. Rosen
2020-05-05 16:11   ` Simon Wright
2020-05-05 17:02     ` Niklas Holsti [this message]
2020-05-03 15:13 ` Jeffrey R. Carter
2020-05-05 16:12   ` Simon Wright
2020-05-05 16:22 ` 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