Re: How can I get notified that a kernel thread has been terminated ?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com
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 (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
participants (1)
-
Ken Hornstein