svn commit: branches/uClibc_0_9_29/libc/sysdeps/linux/common
vapier at uclibc.org
vapier at uclibc.org
Sat Jan 5 17:20:54 UTC 2008
Author: vapier
Date: 2008-01-05 09:20:54 -0800 (Sat, 05 Jan 2008)
New Revision: 20739
Log:
Merge r18693 by vapier from trunk:
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:
branches/uClibc_0_9_29/libc/sysdeps/linux/common/poll.c
Changeset:
Modified: branches/uClibc_0_9_29/libc/sysdeps/linux/common/poll.c
===================================================================
--- branches/uClibc_0_9_29/libc/sysdeps/linux/common/poll.c 2008-01-05 17:19:58 UTC (rev 20738)
+++ branches/uClibc_0_9_29/libc/sysdeps/linux/common/poll.c 2008-01-05 17:20:54 UTC (rev 20739)
@@ -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