This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Waitin Thread to finish
- To: "Ecos-List (E-mail)" <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] Waitin Thread to finish
- From: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Date: Thu, 3 Aug 2000 11:06:38 -0700
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