summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k
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/mac68k
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/mac68k')
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 88f09533e26..9fb3112faf4 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.65 2000/02/22 19:27:52 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.66 2000/03/23 09:59:54 art Exp $ */
/* $NetBSD: machdep.c,v 1.134 1997/02/14 06:15:30 scottr Exp $ */
/*
@@ -93,7 +93,7 @@
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/clist.h>
-#include <sys/callout.h>
+#include <sys/timeout.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/msgbuf.h>
@@ -363,7 +363,7 @@ again:
#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
@@ -479,11 +479,9 @@ again:
VM_MBUF_SIZE, FALSE);
/*
- * Initialize callouts
+ * Initialize timeouts
*/
- callfree = callout;
- for (i = 1; i < ncallout; i++)
- callout[i - 1].c_next = &callout[i];
+ timeout_init();
printf("avail mem = %ld\n", ptoa(cnt.v_free_count));
printf("using %d buffers containing %d bytes of memory\n",