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: Sun, 3 May 2020 14:50:29 +0300
Date: 2020-05-03T14:50:29+03:00	[thread overview]
Message-ID: <hh7pg5Fb9buU1@mid.individual.net> (raw)
In-Reply-To: <lyzhapfgdr.fsf@pushface.org>

On 2020-05-03 13:43, Simon Wright wrote:
> I have several sensor tasks (in general, 2 at the moment) which will of
> course be created and start execution during elaboration.

Depends on the value specified for pragma Partition_Elaboration_Policy. 
If it is Sequential, the tasks start only after (most of) elaboration is 
completed -- RM H.6.

> I'd like to ensure that they don't actually start reading and reporting
> input data until the system is in a state to receive them.

How/when does the system reach that state? At end of elaboration, or at 
some much later time? Should other tasks execute before that state is 
reached?

> With the Ravenscar profile it's not obvious how to do this (only one
> entry per PO, only one task allowed to queue).

You can of course create a special protected object for each sensor task 
that has an entry "wait until system in good state" and a procedure 
"declare system in good state" to open that entry.

Or you could do the same with Suspension_Objects from 
Ada.Synchronous_Task_Control (but Gnat implements them as protected 
objects anyway, I think).

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

  reply	other threads:[~2020-05-03 11:50 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 [this message]
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
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