Stopping and starting tasks in Ravenscar

I presume the answer is “no” due to the domain targeting of the profile but just to check, would there be a way to get the equivalent behaviour in Ada.Asynchronous_Task_Control so that one can Hold and Continue tasks, under the Ravenscar profile?

Note, this is not about killing tasks with abort or ATC or some manual implementation of that (i.e. setting up a timer and aborting upon expiration) which are all not defined by the profile (or more accurately are implementation defined).

I guess, one could drop the priority of the task to some background one and reset that after some timer expires but dynamic priorities aren’t supported either. I appreciate, some sort of polling solution using a protected entry or suspension object which the task calls/blocks-on periodically could be applied but then naturally this is nowhere near the immediacy semantics of Holding and Continueing (and what happens if the task gets stuck and never polls etc etc).

So, I’m just wondering if there are any options at all here?

Thanks

Not really an answer, but I wanted to see if Jorvik allowed for what you are asking, but it does not seem to allow it An Introduction to Jorvik, the New Tasking Profile… | The AdaCore Blog

Though, maybe, with the relaxation of protected objects and waiting tasks, you may have some extra room to do what you were proposing…

Best regards,
Fer

1 Like