summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-12-08 04:21:08 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-12-08 04:21:08 +0000
commitf2bc20364ee44f360fd146e3d2c26b6f81c2c0e4 (patch)
treeb2d905f71e77585724017746a6c235aa87146514 /sys/kern
parent88e501796de76b5e610e88a164f6a5e7f5db5f99 (diff)
- Lock the timeout wheel after the diagnostic checks.
- show timeout_todo in the ddb command.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_timeout.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 8a078512a97..1eab246a84f 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_timeout.c,v 1.14 2002/03/14 01:27:04 millert Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.15 2002/12/08 04:21:07 art Exp $ */
/*
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
@@ -158,13 +158,14 @@ timeout_add(struct timeout *new, int to_ticks)
int s;
int old_time;
- timeout_wheel_lock(&s);
#ifdef DIAGNOSTIC
if (!(new->to_flags & TIMEOUT_INITIALIZED))
panic("timeout_add: not initialized");
if (to_ticks < 0)
panic("timeout_add: to_ticks < 0");
#endif
+
+ timeout_wheel_lock(&s);
/* Initialize the time here, it won't change. */
old_time = new->to_time;
new->to_time = to_ticks + ticks;
@@ -293,7 +294,7 @@ db_show_callout(db_expr_t addr, int haddr, db_expr_t count, char *modif)
timeout_wheel_lock(&s);
- /* XXX: Show timeout_todo? */
+ db_show_callout_bucket(&timeout_todo);
for (b = 0; b < BUCKETS; b++)
db_show_callout_bucket(&timeout_wheel[b]);