svn commit: trunk/uClibc/libc/sysdeps/linux/common
vapier at uclibc.org
vapier at uclibc.org
Fri May 25 18:34:47 UTC 2007
Author: vapier
Date: 2007-05-25 11:34:46 -0700 (Fri, 25 May 2007)
New Revision: 18693
Log:
Jean-Christian de Rivaz writes:
I actually suspect this code into the file uClibc/libc/sysdeps/linux/common/poll.c:
tval.tv_nsec = (timeout % 1000) *1000; <==== make only usec!
>From milisecond this really needs a * 1000000 to make nanosecond. Without this
a 1100 milisecond timeout is converted into a 1 seconde and 100 microsecond
timeout! This can explain the weird result of the test code.
Modified:
trunk/uClibc/libc/sysdeps/linux/common/poll.c
Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/common/poll.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/poll.c 2007-05-25 18:06:02 UTC (rev 18692)
+++ trunk/uClibc/libc/sysdeps/linux/common/poll.c 2007-05-25 18:34:46 UTC (rev 18693)
@@ -36,7 +36,7 @@
struct timespec *ts = NULL, tval;
if (timeout > 0) {
tval.tv_sec = timeout / 1000;
- tval.tv_nsec = (timeout % 1000) *1000;
+ tval.tv_nsec = (timeout % 1000) * 1000000;
ts = &tval;
}
return ppoll(fds, nfds, ts, NULL);
More information about the uClibc-cvs
mailing list