Re: [pok-devel] AADL and process priority

[ Thread Index | Date Index | More lists.tuxfamily.org/pok-devel Archives ]


Le Thu, Mar 08, 2012 at 02:46:27PM +0100, Matias Hastaran :
> Hi,
> 
> Just one little question, how can i set a process priority value in AADL ?
> ARINC MIN_PRIORITY_VALUE is set to 1 (in libpok/include/arinc653/process.h), but in some examples the process priority is 0...

The priority is mapped only when it is defined in the AADL model.
So, if you specify the priority in the thread component, it should be
ok. Then, the thread component would look like this :

thread mythread
.....
properties
	Priority => 5;
end mythread;

thread implementation mythread.i
....
end mythread.i;

Then, the generated code will look like this:
  RETURN_CODE_TYPE ret;
  tattr.ENTRY_POINT = thr1_job;
  tattr.BASE_PRIORITY = 5;
  tattr.DEADLINE = 500;
  tattr.PERIOD = 1000;
  tattr.STACK_SIZE = 4000;
  tattr.TIME_CAPACITY = 1;
  CREATE_PROCESS (&(tattr), &(arinc_threads[1]), &(ret));

Hope that helps :-)



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/