[ECOS] Seeking Thread join / waitpid equivalent.
Fri Aug 27 03:44:00 GMT 2004
On Thu, 26 Aug 2004, Billy wrote:
> On Fri, Aug 27, 2004 at 12:02:00PM +1200, John Carter wrote:
> I think the cyg_thread destruction question above is different from the
> thread.join question below.
Yes and no. What the guy was trying to do via a thread destructor
would have been much more simply achieved via a thread.join in a
> thread_entry_function(cyg_addrword_t data)
> struct myThreadType *thread = (struct myThreadType*)data;
> thread_join(struct myThreadType *thread)
So if you are doing something like..
unless the thread doing the join is of lower priority than the
exiting thread there exists a narrow gap between the post and the end
of cyg_thread_exit during which cyg_thread_delete can fail.
ie. Fundamentally _any_ userland fix to this problem is not going to
The only hack I can think of is to use something like your thread
join, do the delete, test the result, if it failed sleep for a period,
repeat with exponential fall off on the sleep period.
Ugly ugly ugly.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : email@example.com
The universe is absolutely plastered with the dashed lines exactly one
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss