diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-03-24 05:40:57 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-03-24 05:40:57 +0000 |
commit | 49af4c171ee559944b9c5895dfd9add1cc967fd3 (patch) | |
tree | b5635e92b530a5e75cbbfce8e4cf213a02b9a8de /sys | |
parent | e353d2255e633ab21196fde4cc2e26491fa8ff1f (diff) |
set ticks 15 seconds before its value wraps.
this helps us identify issues around ticks wrap in 15 minutes instead
of 240ish days. the change is inspired by something freebsd did as
a result of a ticks change they made that went horribly wrong.
lots of people said they wanted this
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_clock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c9d596e3769..61ec41af87d 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.89 2016/03/20 07:56:08 uebayasi Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.90 2016/03/24 05:40:56 dlg Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -115,6 +115,8 @@ initclocks(void) if (softclock_si == NULL) panic("initclocks: unable to register softclock intr"); + ticks = INT_MAX - (15 * 60 * hz); + /* * Set divisors to 1 (normal case) and let the machine-specific * code do its bit. |