Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode/dev use HZ to calculate interval for setit...



details:   https://anonhg.NetBSD.org/src/rev/75292120fcc2
branches:  trunk
changeset: 769389:75292120fcc2
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Sep 08 11:11:18 2011 +0000

description:
use HZ to calculate interval for setitimer

diffstat:

 sys/arch/usermode/dev/clock.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r f8bb933745c2 -r 75292120fcc2 sys/arch/usermode/dev/clock.c
--- a/sys/arch/usermode/dev/clock.c     Thu Sep 08 10:56:49 2011 +0000
+++ b/sys/arch/usermode/dev/clock.c     Thu Sep 08 11:11:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.14 2011/09/05 18:52:14 reinoud Exp $ */
+/* $NetBSD: clock.c,v 1.15 2011/09/08 11:11:18 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -26,8 +26,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "opt_hz.h"
+
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.14 2011/09/05 18:52:14 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.15 2011/09/08 11:11:18 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -121,7 +123,7 @@
                    thunk_geterrno());
 
        itimer.it_interval.tv_sec = 0;
-       itimer.it_interval.tv_usec = 10000;
+       itimer.it_interval.tv_usec = 1000000 / HZ;
        itimer.it_value = itimer.it_interval;
        thunk_setitimer(ITIMER_REAL, &itimer, NULL);
 



Home | Main Index | Thread Index | Old Index