Re: How to know the existance of the instance of IOUserClient
Re: How to know the existance of the instance of IOUserClient
- Subject: Re: How to know the existance of the instance of IOUserClient
- From: Michael Smith <email@hidden>
- Date: Sun, 27 Sep 2009 11:53:09 -0700
On Sep 27, 2009, at 2:46 AM, searockcliff wrote: I have a driver which uses IOUserClient.
When the drriver is being used by the client application, kextunload will fail and reports that there are client instances.
How could I know the existance of the instace of IOUserClient in driver, so I can refuse to unload in terminate() function? As kextunload knows that.
::terminate will normally fail if the driver is open. Your userclient should call ::open/::close on your driver to indicate that it's in use.
If you need to support more than one userclient at the same time, you will need to implement ::handleOpen/::handleIsOpen in the driver.
= Mike
-- True terror is to wake up one morning and discover that your high school class is running the country. -- Kurt Vonnegut
|
_______________________________________________
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