/[linux-patches]/genpatches-2.6/trunk/2.6.21/1700_amd64-time-usecs.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.21/1700_amd64-time-usecs.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 951 - (show annotations) (download)
Tue May 15 22:30:21 2007 UTC (10 years, 11 months ago) by dsd
File size: 718 byte(s)
Fix vgettimeofday() system call on x86-64
1 [PATCH] x86_64 : Fix vgettimeofday()
2
3 vgettimeofday() may return some bad timeval values, (tv_usec = 1000000),
4 because of a wrong compare.
5
6 Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
7
8 Index: linux-2.6.21-gentoo/arch/x86_64/kernel/vsyscall.c
9 ===================================================================
10 --- linux-2.6.21-gentoo.orig/arch/x86_64/kernel/vsyscall.c
11 +++ linux-2.6.21-gentoo/arch/x86_64/kernel/vsyscall.c
12 @@ -132,7 +132,7 @@ static __always_inline void do_vgettimeo
13
14 /* convert to usecs and add to timespec: */
15 tv->tv_usec += nsec_delta / NSEC_PER_USEC;
16 - while (tv->tv_usec > USEC_PER_SEC) {
17 + while (tv->tv_usec >= USEC_PER_SEC) {
18 tv->tv_sec += 1;
19 tv->tv_usec -= USEC_PER_SEC;
20 }

  ViewVC Help
Powered by ViewVC 1.1.20