Yes, this counts as Outstanding I/O, and no, you should not close the
Interface until all of your callbacks have been called.
The reason is that if you close your interface, then I/O Kit will
terminate your driver, which could cause it to be replaced in memory by
something else, and when the callback occurs, it passes execution
control to something that does not expect it, which usually results in
a kernel panic.
That is the reason that all of the Apple drivers are careful to monitor
the outstanding I/O and to not call close on their provider until all
the babies are off the streets, as my mother used to say.
Rhoads Hollowell
USB Software Team
Apple Computer, Inc.
On Monday, October 6, 2003, at 09:07 AM, Jessica Davies wrote:
I was wondering what happens if you issue a Read on an interrupt
IOUSBPipe,
which returns kIOReturnSuccess, then call Abort on the pipe and Close
on the
IOUSBInterface before the callback for the Read has been called? I
seem to
get a kernel panic when this happens. Does this count as outstanding
I/O
and therefore you shouldn't call Close on the interface? This
sequence of
events occurs if I unplug my device without generating any input with
it, so
the callback never gets called.
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.