[ECOS] Waitin Thread to finish
Fabrice Gautier
Fabrice_Gautier@sdesigns.com
Thu Aug 3 11:08:00 GMT 2000
Hi,
There is no function in the C API to wait for a thread to finish.
What is the way to do so?
I'm trying by polling the thread state, with a C API function like this:
externC cyg_uint32 cyg_thread_get_state(cyg_handle_t thread)
{
return ((Cyg_Thread *)thread)->get_state();
}
But I will have a problem in many case:
- If the thread is not only exited but deleted, I will have a NULL pointer
somewhere. (but where?)
- If another thread, with the same handle, is created before I get a chance
to get the thread, I won't have seen the thread end.
Thanks
A+
--
Fabrice Gautier
fabrice_gautier@sdesigns.com
More information about the Ecos-discuss
mailing list