migrating task code from rtai
Hi,
I have got a rtai task created as follow, it creates and deletes itself :
void *callbacktask(void *)
{
rt_task_init(...)
while (!stopped)
{
....
}rt_task_delete(...)
}
what are the replacement functions I could use in xenomai to do the same thing avoiding breaking lot of code?
Note: I can not use RTAI skins in this xeno system . Best Regards
Steph
Quoted 15 lines · Stéphane ANCELOT
Hi,
I have got a rtai task created as follow, it creates and deletes itself :void *callbacktask(void *)
{
rt_task_init(...)while (!stopped)
{ .... }
Quoted 8 lines
rt_task_delete(...)}
what are the replacement functions I could use in xenomai to do the same thing avoiding breaking lot of code?
Note: I can not use RTAI skins in this xeno system .
If you want to use the Xenomai native API, then you should use rt_task_shadow and rt_task_delete.
If you want to use the posix API, then you should use pthread_setschedparam (though pthread_create, called to create the task would probably have already made it real-time) and pthread_exit.
Note that Xenomai comes with a documentation which you can even read on-line.
Here for trunk:
http://www.xenomai.org/documentation/trunk/html/api/index.html
And here for version 2.4:
http://www.xenomai.org/documentation/branches/v2.4.x/html/api/index.html
Signature · 1 line
Gilles Chanteperdrix.