site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=ZbAkFz56frp3NvDQopBRcfZBvOKNiF5e9IRhiFHdtdk=; b=cYDhMBrNE7T515ho1ZpZT//d9uSCg0aQmRCvyUPvTzBZEfXNJD+8HOOJoDLFdTo9T3 Ek8whUQk4CkYB4jYNV1AXk37zIZBaF5iLJhvNmXLu8rE5Xb/ijtCFiv/QZHcWFhyTJxK orRCaEcsMItM+H9Ld7WxkNJVBDcGiszTu84VM= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Km1BSv3N0vbCVGjV3RGgmHbRwcYmSlUuXCsgaB6JLi6V0tM93hLNzx/GUfp07ATXiP itduqgDR0AEjiz+11XmYo7DCCIrezll5rFUaI3bM3oQJVH44jDpEKmwUq9wbaJtbvjZ/ giZd2eeWpwC7YaBGwIrOrvZMV/kmG3MKXUSpY= Hello, I have recently had to move from a generic kext to an IOKit one, in order to get the lifecycle functionality that IOKit offers. Since my kext exposes a control device, I used to return an error in the kext stop function if unregistering the control device failed (i.e. a daemon was connected to it). But none of the IOService callbacks that kexts usually override (stop, detach, free, ...) allow returning an error. And calling provider->retain() in device->start() doesn't prevent device->stop() from being called. Neither does device->adjustBusy(+1). What I am currently doing is I override device->terminate() and I return false if the kext is busy. But since no IOKit documentation recommends this, I assume it's not the proper way do prevent unload. My question is, how does one prevent cleanup when the kext is still busy ? (particularly when there are non-IOKit resources in use) Thank you. _______________________________________________ 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