diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-06-02 22:05:55 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-06-02 22:05:55 +0000 |
commit | 6e04978c7e3739302d4ccea71b6ea1f7b31259ae (patch) | |
tree | 7a01883f2be33c5c9f6500a6abf03e094afc250b /sys/kern | |
parent | 1fba9f48387d03cee6ca93ba2eae4d56f81c0721 (diff) |
Constipate the second argument to timeout_add_*(). Also, use
nitems() in two places instead of coding the array size and fix a
spot of whitespace.
ok miod@ blambert@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_timeout.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 4e385102d97..be87d0fc789 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.30 2009/03/03 19:09:13 miod Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.31 2009/06/02 22:05:54 guenther Exp $ */ /* * Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org> * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> @@ -138,7 +138,7 @@ timeout_startup(void) int b; CIRCQ_INIT(&timeout_todo); - for (b = 0; b < BUCKETS; b++) + for (b = 0; b < nitems(timeout_wheel); b++) CIRCQ_INIT(&timeout_wheel[b]); } @@ -187,7 +187,7 @@ timeout_add(struct timeout *new, int to_ticks) } void -timeout_add_tv(struct timeout *to, struct timeval *tv) +timeout_add_tv(struct timeout *to, const struct timeval *tv) { long long to_ticks; @@ -199,7 +199,7 @@ timeout_add_tv(struct timeout *to, struct timeval *tv) } void -timeout_add_ts(struct timeout *to, struct timespec *ts) +timeout_add_ts(struct timeout *to, const struct timespec *ts) { long long to_ticks; @@ -211,7 +211,7 @@ timeout_add_ts(struct timeout *to, struct timespec *ts) } void -timeout_add_bt(struct timeout *to, struct bintime *bt) +timeout_add_bt(struct timeout *to, const struct bintime *bt) { long long to_ticks; @@ -370,7 +370,7 @@ db_show_callout(db_expr_t addr, int haddr, db_expr_t count, char *modif) db_printf(" ticks wheel arg func\n"); db_show_callout_bucket(&timeout_todo); - for (b = 0; b < BUCKETS; b++) + for (b = 0; b < nitems(timeout_wheel); b++) db_show_callout_bucket(&timeout_wheel[b]); } #endif |