Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> As for the rt_task_delete/rt_task_join question, I think we should have
>> to call rt_task_join after deleting  a thread, because that is the only
>> way to make sure that all the ressources associated to a thread are free.
> 
> The question is not how we can release resources (that's trivial:
> pthread_detach) but if we officially provide the service "join after
> delete" to the user. If we do this, its limitations and implications on
> the native interface need to be documented. So far this is fuzzy unless
> you know our implementation.

No pthread_detach does not insure you that the ressources are released.
It insures you that they will be released at a later point in time. That
is the point. The only way to ensure that the ressources have been
released, or more precisely, to wait for them to be released, is to call
phtread_join. If you did not want to wait for that, then there was no
point to create the thread joinable in the first place.

Anyway, yes, I agree, this behaviour of rt_task_join should be documented.

> 
> Jan
> 


-- 
                                            Gilles.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to