Or, fix sys_poll(). With the +1, this means that sys_poll() would have
a 1 in 1001 chance per second of returning one jiffie too early.
> > > And that the prototypes for ep_poll() and sys_epoll_wait() be changed
> > > to take a "long timeout" instead of an "int", just like sys_poll().
> > I don't see why. The poll(2) timeout is an int.
> poll(2) takes an int, but sys_poll() takes a long.
> I think everyone is confused :)
> The reason I suggested "long timeout" for ep_poll is because the
> multiply in the expression:
> jtimeout = (unsigned long)(timeout*HZ+999)/1000;
> can overflow if you don't. If you stick with the int, you'll need to
> write:
> jtimeout = (((unsigned long)timeout)*HZ+999)/1000;
On a 16 bit platform, perhaps... :-)
mark
-- mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, CanadaOne ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them...
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/