Re: [pok-devel] Pb avec le lancement de thread arinc |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/pok-devel Archives
]
Sorry about the mail in french, I hadn't realized we had english speakers
So, I'll summarize my problem again in case someone couldn't read the first mail
When pok creates an arinc process using pok_thread_create, the thread is created in the RUNNING state.
The ARINC653 states that process shall be created in the DORMANT state and that calls to START or DELAYED_START shall put them in the waiting state.
the call to SET_PARTITION_MODE(normal) is the one that recalculates deadlines and wake-up time for all those threads, thus allowing the initialization code to run for as long as it wants while still having a predictable behaviour once the partition enters normal mode.
I tried changing the way CREATE_PROCESS works to put the thread in DORMANT state immediately, but this breaks most of the examples because Ocarina does not create any START call in the generated, and thus the threads are never started.
So here is what we could do to try to be arinc compliant
* pok can do what it wants with pok_thread_create. I don't think that pok calls need to be ARINC complient, and the wrapper in libpok/arinc can use pok_thread_suspend to be compliant
so code generated directly for pok is not an issue, only arinc code is.
* changing ocarina to generate a START with every CREATE_PROCESS is probably easy, I am looking at it right now, but I couldn't find the (cvs/svn/git/whatever) repository for ocarina and working from snapshots is extremely tedious. Is there a public repository somewhere ? I couldn't find any reference to it on the Telecom-Paris website...
My current plan is try to make things spec-compliant which means :
* implementing the START and START_DELAYED commands on the pok side,
* making SET_PARTITION_MODE recalculate scheduler parameters
* changing CREATE_PROCESS to return DORMANT threads
* changing ocarina to always generate a START with all CREATE_PROCESS.
i'll see how far I go and how it turns out.
Regards
Jérémy Rosen
fight key loggers : write some perl using vim