> > > > > struct usb_device->serialize will become a read-write semaphore. > > > > The only reason to go for an rw-semaphore is contention. If contention is > > low, there's no point in going for the extra overhead of such a lock. > > No, there can be other reasons too. For example, suppose one routine that > gets a read lock calls another that does the same thing. That works well > with rw-semaphores but not with regular ones. That's not contention, it's > something else (poor design perhaps -- but Duncan has his reasons).
NO ! You are running to Mount Doom and dragging along the horses. rw-semaphores are fair. If you have this sequence: TASK A TASK B down_read() down_write() down_read() --> DEADLOCK You must not do this. Debugging such a thing will drive programmers to madness in incredible numbers. Regards Oliver ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel