Re: IOKit kext Dependencies
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 - --- At Tue, 21 Oct 2008 11:07:23 -0700, Garth Cummings wrote:
Hi Duane,
From: Duane Murphy <duanemurphy@mac.com> Date: Mon, 20 Oct 2008 15:56:17 -0700
Is there a way of expressing dependencies on classes other than the classes that a kext is a subclass of?
The kext dependency and loading machinery only knows about kexts; it knows nothing about individual classes. That's handled by the kernel linker.
If both classes are in the same kext, they will be available at the same time. If not, you can use the OSBundleLibraries mechanism to get the dependency to load first. See the sample code IOKitWithLibrary <http:// developer.apple.com/sample.code/IOKitWithLibrary> for an example.
If you actually need to wait for an instance of the class to be created, waitForService should do the trick.
Thanks Garth, It sounds like that will work. I have two drivers in the same kext. One driver is a manager, the other is more like a driver. The driver needs to connect to the manager. The manager connects to IOResources. I was hoping there was a way of expressing that the manager must be in place for the driver to work. It sounds like waitForService will do part of it, and possibly a notification if waitForService times out. The driver can continue some operations if the manager is not available. Thanks, ...Duane -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.9.0 (Build 397) Charset: ISO-8859-1 wsBVAwUBSP5GFUrg9acQ4r2CAQgUtQf+P/sRHDRgKiXblrLYxNWxuH5XZYhXOYjm JBI2iVXLA3LwIbw/gIx+g2QLwDwAPVcPFcPlEbEXFwifNAdTA8/Z1Cw0xpsCLxcg 0T1VEBwfKReR0Gp5jKyHJZI3yPXAzBMETkhdUmcNKKrF7oUG0OsgJ2+piozKPlYK Wi4aDiQxpyFaKFjmeqhuPmGBnpVV/p3szvp4zDftz4ujszDAJnXyopLFYDI3NHka icOEdnZbtjD+Fkqpki0KShTkRCi2fHZo0sAsRbVlnFM9VsCFi6R+dei0QxHTGJas 0GKM+GT0//2Flx5Hz0rXRf5j+mcXm7XWoZYy/IWtmoIYl/KybfNQ1A== =hSkB -----END PGP SIGNATURE----- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Duane Murphy