summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-03-23 09:59:58 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-03-23 09:59:58 +0000
commite4ca293f2b7880e155199a51cd0ccc792fa720e0 (patch)
tree6dc58c76d2eaaa482951d8cf4cf7855a14281d96 /sys/arch/hp300
parentd66e702367cad6ad4bdb3038f6f500811c97dc6e (diff)
New API for timeouts. Replaces the old timeout()/untimeout() API and
makes it the callers responsibility to allocate resources for the timeouts. This is a KISS implementation and does _not_ solve the problems of slow handling of a large number of pending timeouts (this will be solved in future work) (although hardclock is now guarateed to take constant time for handling of timeouts). Old timeout() and untimeout() are implemented as wrappers around the new API and kept for compatibility. They will be removed as soon as all subsystems are converted to use the new API.
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r--sys/arch/hp300/hp300/machdep.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 170b07c5137..a6b85a3c25d 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.39 2000/02/22 19:27:46 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.40 2000/03/23 09:59:54 art Exp $ */
/* $NetBSD: machdep.c,v 1.94 1997/06/12 15:46:29 mrg Exp $ */
/*
@@ -48,7 +48,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
-#include <sys/callout.h>
+#include <sys/timeout.h>
#include <sys/clist.h>
#include <sys/conf.h>
#include <sys/exec.h>
@@ -320,12 +320,9 @@ cpu_startup()
mb_map = kmem_suballoc(kernel_map, (vm_offset_t *)&mbutl, &maxaddr,
VM_MBUF_SIZE, FALSE);
/*
- * Initialize callouts
+ * Initialize timeouts
*/
- callfree = callout;
- for (i = 1; i < ncallout; i++)
- callout[i-1].c_next = &callout[i];
- callout[i-1].c_next = NULL;
+ timeout_init();
#ifdef DEBUG
pmapdebug = opmapdebug;
@@ -400,7 +397,7 @@ allocsys(v)
#ifdef REAL_CLISTS
valloc(cfree, struct cblock, nclist);
#endif
- valloc(callout, struct callout, ncallout);
+ valloc(timeouts, struct timeout, ntimeout);
#ifdef SYSVSHM
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
#endif