Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/arch/xen/xen Pull up revision 1.13 (requested by bouy...
details: https://anonhg.NetBSD.org/src/rev/89e4e9a26be1
branches: netbsd-3
changeset: 576342:89e4e9a26be1
user: tron <tron%NetBSD.org@localhost>
date: Wed Jun 29 12:23:27 2005 +0000
description:
Pull up revision 1.13 (requested by bouyer in ticket #510):
Use the time provided by the hypervisor instead of our global time variable
for xen_microtime(). This match more closely what is done on a real i386
(where we read the RTC), and seems to fix gettimeofday() sometime going
backward by several seconds for me.
diffstat:
sys/arch/xen/xen/clock.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 06ddb1fa5da8 -r 89e4e9a26be1 sys/arch/xen/xen/clock.c
--- a/sys/arch/xen/xen/clock.c Wed Jun 29 12:18:49 2005 +0000
+++ b/sys/arch/xen/xen/clock.c Wed Jun 29 12:23:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.9.2.3 2005/05/28 16:23:36 tron Exp $ */
+/* $NetBSD: clock.c,v 1.9.2.4 2005/06/29 12:23:27 tron Exp $ */
/*
*
@@ -34,7 +34,7 @@
#include "opt_xen.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9.2.3 2005/05/28 16:23:36 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9.2.4 2005/06/29 12:23:27 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -224,8 +224,10 @@
void
xen_microtime(struct timeval *tv)
{
-
- *tv = time;
+ int s = splclock();
+ get_time_values_from_xen();
+ *tv = shadow_tv;
+ splx(s);
}
void
Home |
Main Index |
Thread Index |
Old Index