Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Use hardclock_ticks instead of a h...



details:   https://anonhg.NetBSD.org/src/rev/15a6ee81ba61
branches:  trunk
changeset: 337627:15a6ee81ba61
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Apr 21 16:18:50 2015 +0000

description:
Use hardclock_ticks instead of a homegrown variable.

... not that I understand how various kernel algorithms can work
after enough uptime with hardclock_ticks being a signed int.

diffstat:

 sys/rump/librump/rumpkern/intr.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 6fdcc59953c7 -r 15a6ee81ba61 sys/rump/librump/rumpkern/intr.c
--- a/sys/rump/librump/rumpkern/intr.c  Tue Apr 21 13:17:25 2015 +0000
+++ b/sys/rump/librump/rumpkern/intr.c  Tue Apr 21 16:18:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.49 2015/04/16 10:08:59 pooka Exp $  */
+/*     $NetBSD: intr.c,v 1.50 2015/04/21 16:18:50 pooka Exp $  */
 
 /*
  * Copyright (c) 2008-2010, 2015 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.49 2015/04/16 10:08:59 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.50 2015/04/21 16:18:50 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -80,7 +80,6 @@
 
 kcondvar_t lbolt; /* Oh Kath Ra */
 
-static u_int ticks;
 static int ncpu_final;
 
 static u_int
@@ -88,7 +87,7 @@
 {
 
        KASSERT(rump_threads);
-       return ticks;
+       return (u_int)hardclock_ticks;
 }
 
 static struct timecounter rumptc = {
@@ -132,7 +131,7 @@
                if (cpuindx != 0)
                        continue;
 
-               if ((++ticks % hz) == 0) {
+               if ((++hardclock_ticks % hz) == 0) {
                        cv_broadcast(&lbolt);
                }
                tc_ticktock();



Home | Main Index | Thread Index | Old Index