summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
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/mvme88k
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/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 700140a76ba..e0b04f9cb5e 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.19 2000/02/22 19:27:55 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.20 2000/03/23 09:59:55 art Exp $ */
/*
* Copyright (c) 1998, 1999 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -55,7 +55,7 @@
#include <sys/reboot.h>
#include <sys/conf.h>
#include <sys/file.h>
-#include <sys/callout.h>
+#include <sys/timeout.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/mount.h>
@@ -636,12 +636,9 @@ cpu_startup()
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();
printf("avail mem = %d\n", ptoa(cnt.v_free_count));
printf("using %d buffers containing %d bytes of memory\n",
@@ -700,7 +697,7 @@ register caddr_t v;
#ifdef REAL_CLISTS
valloc(cfree, struct cblock, nclist);
#endif
- valloc(callout, struct callout, ncallout);
+ valloc(timeouts, struct timeout, ntimeout);
#if 0
valloc(swapmap, struct map, nswapmap = maxproc * 2);
#endif