Of course; that's obvious. What's perhaps less obvious is that I'm
suggesting a change in the calculation of timeout -- a change which
avoids the creation of unnecessarily large _intermediate_ values.
> > ! if (timeout < 0)
> > ! timeout = MAX_SCHEDULE_TIMEOUT;
> > ! else if (timeout)
> > ! timeout = ROUND_UP(timeout, 1000/HZ);
>
> Eh? And re-introduce the original bug?
Well, I forgot the (unsigned long) cast, as someone else noted:
timeout = ROUND_UP((unsigned long) timeout, 1000/HZ);
Otherwise, the code is Just Right.
-- Chip Salzenberg - a.k.a. - <chip@perlsupport.com> "When do you work?" "Whenever I'm not busy."- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/