Re: Preventing IOKit kext unload
Re: Preventing IOKit kext unload
- Subject: Re: Preventing IOKit kext unload
- From: Daniel Markarian <email@hidden>
- Date: Fri, 13 Aug 2010 09:47:45 -0700
Hey Bogdan,
http://lists.apple.com/archives/darwin-kernel/2010/Jan/msg00028.html
Dan
Le 2010-08-13 à 04:55, Bogdan Harjoc a écrit :
> 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 (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
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