On Sun, 2004-04-04 at 22:54, David Brownell wrote:
> Which directly follows from what I said ... USB propagates
> that knowledge in carefully defined ways.   Other layers can
> do the same, although clearly state associated with open file
> descriptors needs to use a slightly different strategy.  And
> that strategy is what Alan's original comment was about.

Well, again, this is at the core of the argument.

I say that as long as we have all our objects correctly refcounted, how
disconnections propagate up the stack is irrelevant.

If you have to have a "carefully defined" order for the propagation of
an asynchronous event to save you from oopsing, it's a sure sign of bugs
in the code.

My reasoning is that I/O down the stack will ultimately hit the part of
the kernel (or even just timeout in transmission to the device if it's
disappeared without trace) that contains the knowledge and be returned
with an error.  Ordering the disconnection propagation cannot change
this fact, merely alter *which* component returns the error.

As long as we're robust to the error there is no problem.

At this point, the object lifetime does nothing more that count how long
we have to keep the object around to return the error.

James




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to