On Fri, Sep 17, 2004 at 12:38:40AM -0400, Jon Smirl wrote:
> schedule_timeout() is also used in DRM_WAIT_ON() in drm_os_linux.h 
> Does it need to be adjusted too?
> 
> #define DRM_WAIT_ON( ret, queue, timeout, condition )         \
> do {                                                          \
>       DECLARE_WAITQUEUE(entry, current);                      \
>       unsigned long end = jiffies + (timeout);                \
>       add_wait_queue(&(queue), &entry);                       \
>                                                               \
>       for (;;) {                                              \
>               __set_current_state(TASK_INTERRUPTIBLE);        \
>               if (condition)                                  \
>                       break;                                  \
>               if (time_after_eq(jiffies, end)) {              \
>                       ret = -EBUSY;                           \
>                       break;                                  \
>               }                                               \
>               schedule_timeout((HZ/100 > 1) ? HZ/100 : 1);    \
>               if (signal_pending(current)) {                  \
>                       ret = -EINTR;                           \
>                       break;                                  \
>               }                                               \
>       }                                                       \
>       __set_current_state(TASK_RUNNING);                              \
>       remove_wait_queue(&(queue), &entry);                    \
> } while (0)

I did notice this other occurrence, but since the timeout is not
necessarily a long one (measurable in msecs), i.e. in system's where
HZ < 100, I didn't want to make the code more complicated than it is.

But, if some of the DRM people who are more familiar with the hardware
are ok with there always being a 10 ms delay (which it would be for all
system's with HZ > 100 anyways), I could make that change.

Thanks,
Nish


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to