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

Thanks for that, just wondering, do you know what would be the “best” way for someone to discover which features of the Real-Time Annex a runtime supports (or any Annex for that matter, I guess).

I guess, one could also look at running the application on top of an OS though probably the same question would come up there as well. :thinking:

I am not 100% sure that I understood your question. But in the case of GNAT, the restrictions that apply to the runtimes are documented as part of the compiler. You can read them here Pragma Profile (GNAT Reference Manual)

Best regards,
Fer

Ok, I see, I was more looking for the No_Dependence list which is clearly listed on the profile description.

Thanks very much.

The Ravenscar and Jorvik profiles are documented in ARM D.13.

2 Likes

Thank you, that’s a nice summary of the restrictions.