IOEventSource subclass won't unload?
IOEventSource subclass won't unload?
- Subject: IOEventSource subclass won't unload?
- From: Brian Doyle <email@hidden>
- Date: Fri, 3 Mar 2006 01:51:17 -0800
I'm perplexed :(
I've created a custom event source subclassed from IOEventSource
that as near as I can tell is correct. It is very simple and follows
fairly closely the layout of IOCommandGate. When I call
attachEventSource() it attaches, the IOWorkLoop calls checkForWork()
and dispatches to the Action handler correctly, there's nothing
special about initialization, it calls super::init() and behaves
appropriately. After instantiation I attach it to the workloop
(retain count==2) and then I release it and have verified that the
retain count is 1 (i.e. retained only by the workloop). So it
appears all is well and good, until I try to unload my kext, at which
point it refuses saying that there is still an instance of my event
source.
I've attaching several other event sources to the same workloop (an
IOCommandGate and an IOTimerEventSource) and I release them after
they attach sucessfully (with a verifiable retain count of 1). The
code is identical yet these unload just fine (presumably when the
workloop is released).
Commenting out just the add-it-to-the-workloop part allows
everything to unload properly (just allocating and releasing my event
source without ever attaching it to the workloop allows the kext to
unload fine). So it just seems to cause a problem when it is
attached into the workloop.
Anyone have any ideas on why this might be happening?
Thank you,
Brian
_______________________________________________
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