How can I get notified that a kernel thread has been terminated ?
How can I get notified that a kernel thread has been terminated ?
- Subject: How can I get notified that a kernel thread has been terminated ?
- From: Nicolas Connoud <email@hidden>
- Date: Thu, 04 Aug 2011 19:44:27 +0200
Hello,
I am having trouble with kernel threads and despite trying
quite a few things, I am unable to avoid a kernel panic when unloading
my kext.
On being loaded, my kext creates a new thread to do some
asynchronous operations (it is mainly a while loop checking for the
state of a global variable). When the kext gets unloaded, I change the
state of that variable and the while loop exits. However, I suspect that
the thread does not quite finish at that point and when my kext_stop
function returns, I get a kernel panic.
My question is :
- How can I get notified when the thread has terminated? Is it at all possible?
- I have read about thread_terminate() but it looks like this function in not available for kexts (KERNEL_PRIVATE only)
Thanks in advance for your help,
N.
_______________________________________________
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