On Mon, 2004-04-05 at 18:23, David Brownell wrote: > "Irrelevant" is pointlessly strong, even for what I'm guessing > you really mean to be saying.
No, it's the very point. If we have to enforce ordering on the event propagation across subsystems, that can't be done without inter subsystem synchronisation. In order to get away without any inter subsystem synchronisation the order has to not matter. i.e. be irrelevant. > Minimally, there needs to be synchronization to prevent open() on > one CPU from using data structures disconnect() just invalidated > on another CPU. That's a basic "how to write multi-threaded code" > kind of issue, which I won't bother to explain (yet again). Yes, but that's intra subsystem synchronisation, not inter subsystem synchronisation. Look, the rules are very simple: - Every subsystem gives out refcounted objects. - Every subsystem takes in a disconnection event for another object. Now what the subsystem does with the event is up to it. The only guarantee is if the subsystem holds no references to the other object after the disconnection completes in that subsystem, then it may be garbage collected. However, if not, the other object must remain until the last reference is dropped. The point is that all the disconnection event does is inform a subsystem that the entity represented by the other object has gone. What it chooses to do with the information is up to it. It could set it's own connected object to degraded, never use the other object again and drop the reference. Or, it could simply ignore the indication and continue to use the other object (even though it will return errors for every operation). Now, if the subsystem is going to garbage collect its own object as a result of the other object disconnect, then it is responsible for synchronising that with reference gets on its own object. However, that is easily achievable via *intra* subsystem synchronisation. If you follow these rules, there's no *inter* subsystem ordering or synchronisation requirement. 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