site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Dec 9, 2009, at 12:42 PM, Duane Murphy wrote:
How would one do the equivalent of join() for a thread in the kernel?
Typically, you don't.
I think I have a situation where the underlying thread is exiting, possibly aborting, so that my built in thread exit indicators do not get called. This causes some threads to hang waiting for the thread to exit.
Threads don't normally abort; if your toplevel thread routine is responsible for tracking your threads' existence then control will pass back through it when a thread is terminating.
Or maybe the right question is what is the appropriate way to wait on a thread that may abort or already be aborted?
You don't; you should not terminate threads that you know (may) have waiters. In general, you should not be creating and destroying kernel threads in your workflow. = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com