Re: Kext Load on demand and daemon communication
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Oct 16, 2007, at 10:53 AM, Eric Long wrote: In order to listen to messages from the kext, the daemon creates a notification port, connects to the kext, and waits for available data. _______________________________________________ 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 I am looking to understand how load-on-demand drivers interact with daemons. I'm not an experienced driver writer, so I apologize in advance for missing the obvious. (-: I have a driver that sends messages to a daemon that is always running. The daemon has other purposes besides responding to messages from this kext. Since the daemon must connect to the kext to listen for messages from it, the kext must be loaded, so it seems there is no load on demand benefit, it just stays loaded. This seems like a Catch-22 to me. I don't want the kext to load unless the OS determines that it is needed, but if it is loaded, I need my daemon to listen to it. I can't listen to it without loading it. Can I listen for its loading, then listen for messages? What's the secret to making this work? When IOKit matches your device, your kext may call KUNCExecute() to launch the daemon if it's not already running. NOTE: KUNC is unsupported but available. Otherwise the daemon must remain running, to listen for service matching notifications, and unfortunately launchd does not provide this much-needed feature. -- Shaun Wexler MacFOH http://www.macfoh.com "No problem is so formidable that you can't walk away from it." - Charles Schulz smime.p7s
participants (1)
-
Shaun Wexler