> > I'm glad to see some more fixes to kaweth. I'm curious > > why the new block-til-unlink code is only in disconnect() > > AFAIK only disconnect and timeout need to unlink > a transmitting URB.
close() may too ... > > Also, I suspect it'd be better to use "struct completion" > > synchronization objects rather than waitqueues. In part > > that's a correctness concern. Classically, the idiom is > > "reschedule till done", and those objects encapsulate > > that logic (which is omitted in this patch). > > But I am waiting for a single event and am not using semaphores. > It should be safe, shouldn't it be ? Not necessarily. Of course I'm just working from a rule of thumb that applies to most threading systems: don't assume only one event can ever wake up your thread, first make sure that it's really safe to proceed. Look at it this way: you _know_ that "struct completion" objects will always do this right. With waitqueues there are opportunities for error (tomorrow if not today). - Dave _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel