Re: How can I get notified that a kernel thread has been terminated ?
Re: How can I get notified that a kernel thread has been terminated ?
- Subject: Re: How can I get notified that a kernel thread has been terminated ?
- From: Ken Hornstein <email@hidden>
- Date: Thu, 04 Aug 2011 14:32:21 -0400
>My question is :
> - How can I get notified when the thread has terminated? Is it at all
>possible?
I don't believe there is a generic mechanism. Normally people in this
situation use one of the standard synchronization mechanisms to wait
for the thread to exit before finishing the unload of the kext (also -
have you tried debugging your kernel panic with gdb? That should at
least give you a better idea what is going on). So you'd have your
worker thread tell the kext-unload thread that it's finished as the last
thing it does.
> - I have read about thread_terminate() but it looks like this function in
>not available for kexts (KERNEL_PRIVATE only)
I see thread_terminate() is exported in the 6.0 version of
com.apple.kernel.libkern, at least on Snow Leopard. Not sure if you can
depend on it being around in Lion.
--Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden