Sorry for the last mail..
Here is what I've done.
void *thread2(void *cookie)
{
/* ... */
}
Task create_thread(pthread_t* t, const char* name, void *(*)(void *) funct,
void* arg)
{
/* ... */
pthread_create(t, ..., funct, arg);
/* ... */
pthread_set_name_np(t, name);
/* ... */
}
int *thread(void *cookie)
{
pthread_t tid1;
pthread_t tid2;
create_thread(&tid1, "name1", thread2, NULL);
create_thread(&tid2, "name2", thread2, NULL);
/* ... */
pthread_cancel(&tid1);
pthread_cancel(&tid2);
/* ... */
}
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai