On Mon, 17 May 2004 23:01:07 +0200 Oliver Neukum <[EMAIL PROTECTED]> wrote:
> this is a new waiting helper safe even if we are left on a waitqueue. > This version addresses Alan's concerns about ifdefs. Please apply. > --- a/drivers/usb/core/usb.c Mon May 17 22:58:26 2004 > +++ b/drivers/usb/core/usb.c Mon May 17 22:58:26 2004 > +void usb_uninterruptible_sleep_ms(int msecs) > +{ > + long timeout = msecs_to_jiffies(msecs); > + > + while(timeout) { > + set_current_state(TASK_UNINTERRUPTIBLE); > + timeout = schedule_timeout(timeout); > + } > +} This looks good, however I'm curious where msecs_to_jiffies originates. [EMAIL PROTECTED] linux-2.6.6-usb]$ LANG=C grep msecs_to_jiffies include/linux/*.h include/linux/libata.h:static inline unsigned long msecs_to_jiffies(unsigned long msecs) [EMAIL PROTECTED] linux-2.6.6-usb]$ jgarzik's implementation looks good (it addresses an attempt to sleep for less than a jiffie), but was it moved to a common header yet? -- Pete ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel