Re: [pok-devel] arinc 653 GET_PROCESS_ID, GET_MY_ID, GET_PROCESS_STATUS functions

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


Le Fri, May 04, 2012 at 01:56:28PM +0200, Matias Hastaran :
 - add of the GET_PROCESS_ID function
> - add of the GET_MY_ID function
> - add of the GET_PROCESS_STATUS function 
> - a little modification in CREATE_PROCESS function
> - Add of 3 new syscalls
> - For the ARINC deadline value, I fetch the thread end_time value and for the stack the POK_USER_STACK_SIZE value (it seems to me it's the only value wich is used for the stack size).
> - I've modified the pok_sched_get_current kernel function for arinc complience (I think it's only used for arinc).
> - I've changed the priority value on arinc's exemples model.aadl (else the exemples didn't work with a new create process version)
> 
> If someone want to recheck the path before I make the commit, I'm open for all critics.

Nice patch !

Also, why in pok_thread_get_state and pok_thread_get_deadline you do not
have something to check that the requested id belongs to the running
partition (as in get_status also).

In addition, I have one remark : why do you introduce three syscalls :
pok_thread_get_state, pok_thread_get_status and pok_thread_get_deadline.
However, you can just introduce one syscall that would provide all the
info for the other. As far as I understand, the purpose of this commit
is to get information in the partition about some thread. So, we can
just add one syscall :
pok_thread_get_infos (thread_id, pok_thread_infos_t) with the
pok_thread_infos_t containing the informations required the all the
other syscall.

So, after all, within the partition, for each function, you just issue
the same call but take the data from the returned structure as you need.
Such an approach avoids code duplication, ensure that security/safety
mechanisms are enforced (because we do not duplicate the code and it is
easy to view where it applies).

Also, as you seem now confident with POK code, I suggest you commit
directly on the trunk repository. Of course, if you can fix the code
according to the comments, that would be nice and if you want some code
review, you are kindly welcome :-)

Thanks for your mail,

Best regards,



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