summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_clock.c3
-rw-r--r--sys/kern/kern_timeout.c11
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index c7873d167cf..d5bc91a5918 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_clock.c,v 1.51 2004/09/15 17:48:52 grange Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.52 2004/11/10 11:00:00 grange Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
@@ -271,7 +271,6 @@ hardclock(struct clockframe *frame)
* if we are still adjusting the time (see adjtime()),
* ``tickdelta'' may also be added in.
*/
- ticks++;
delta = tick;
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 921f4be9cff..da14eadd5cf 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_timeout.c,v 1.19 2004/07/20 20:20:52 art Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.20 2004/11/10 11:00:00 grange Exp $ */
/*
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
@@ -200,7 +200,12 @@ timeout_del(struct timeout *to)
int
timeout_hardclock_update(void)
{
+ int ret;
+
mtx_enter(&timeout_mutex);
+
+ ticks++;
+
MOVEBUCKET(0, ticks);
if (MASKWHEEL(0, ticks) == 0) {
MOVEBUCKET(1, ticks);
@@ -210,8 +215,10 @@ timeout_hardclock_update(void)
MOVEBUCKET(3, ticks);
}
}
+ ret = !CIRCQ_EMPTY(&timeout_todo);
mtx_leave(&timeout_mutex);
- return (!CIRCQ_EMPTY(&timeout_todo));
+
+ return (ret);
}
void