diff options
author | 2001-08-23 08:18:57 +0000 | |
---|---|---|
committer | 2001-08-23 08:18:57 +0000 | |
commit | 5df13310eec10f94b7bd1ff524c1916cf979a4d1 (patch) | |
tree | 2a37c720d03bfb2d2c12bac73a97c466657f6005 /sys/kern/kern_timeout.c | |
parent | Convert the last old-timeout, tested by beck@ (diff) | |
download | wireguard-openbsd-5df13310eec10f94b7bd1ff524c1916cf979a4d1.tar.xz wireguard-openbsd-5df13310eec10f94b7bd1ff524c1916cf979a4d1.zip |
Remove the old timeout legacy code.
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r-- | sys/kern/kern_timeout.c | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index a314e2e77e6..6139b9f871d 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.8 2001/03/28 07:33:51 art Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.9 2001/08/23 08:18:57 miod Exp $ */ /* * Copyright (c) 2000 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -239,69 +239,6 @@ softclock() timeout_list_unlock(s); } -/* - * Legacy interfaces. timeout() and untimeout() - * - * Kill those when everything is converted. They are slow and use the - * static pool (which causes (potential and real) problems). - */ - -void -timeout(fn, arg, to_ticks) - void (*fn) __P((void *)); - void *arg; - int to_ticks; -{ - struct timeout *to; - int s; - - if (to_ticks <= 0) - to_ticks = 1; - - /* - * Get a timeout struct from the static list. - */ - timeout_list_lock(&s); - - to = TAILQ_FIRST(&timeout_static); - if (to == NULL) - panic("timeout table full"); - TAILQ_REMOVE(&timeout_static, to, to_list); - - timeout_list_unlock(s); - - timeout_set(to, fn, arg); - to->to_flags |= TIMEOUT_STATIC; - timeout_add(to, to_ticks); -} - -void -untimeout(fn, arg) - void (*fn) __P((void *)); - void *arg; -{ - int s; - struct timeout *to; - - timeout_list_lock(&s); - TAILQ_FOREACH(to, &timeout_todo, to_list) { - if (to->to_func == fn && to->to_arg == arg) { -#ifdef DIAGNOSTIC - if ((to->to_flags & TIMEOUT_ONQUEUE) == 0) - panic("untimeout: not TIMEOUT_ONQUEUE"); - if ((to->to_flags & TIMEOUT_STATIC) == 0) - panic("untimeout: not static"); -#endif - TAILQ_REMOVE(&timeout_todo, to, to_list); - to->to_flags &= ~TIMEOUT_ONQUEUE; - /* return it to the static pool */ - TAILQ_INSERT_HEAD(&timeout_static, to, to_list); - break; - } - } - timeout_list_unlock(s); -} - #ifdef DDB void db_show_callout(addr, haddr, count, modif) |