On Thu, Nov 10, 2005 at 05:15:56PM +0000, Alan Cox wrote:
On Iau, 2005-11-10 at 11:31 -0500, Peter Staubach wrote:
Clearly, the timeout calculations problem can be fixed without changingThere really is no need for the kernel API to match the userspace one,
the arguments to the sys_poll() routine. However, it is cleaner to fix
it this way by ensuring the sizes and types of arguments match.
many of our others differ between the syscall interface which is most
definitely 'exported' in one sense and the POSIX interface which is
defined by libc, posix and the LSB etc
No argument about the timeout fix.
I posted a different fix here about a month ago (but I sent it 3 times,
as it was twice wrong). Andrew was about to merge it in his tree but I
have not checked yet. It was different in the sense that it used
msecs_to_jiffies() to do the arithmetic in the best possible way depending
on the HZ value and the ints size. Most of the time (when 1000 % HZ == 0),
it will simplify the operations to a single divide by a constant and
correctly check for integer overflows. Eg, with HZ=250, a simple 2 bits
right shift will replace a multiply followed by an divide.
I'll check whether 2.6.14-mm1 has it, otherwise I can repost it.