Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Move callout initialization to a single location; no nee...



details:   https://anonhg.NetBSD.org/src/rev/a86e41765eb8
branches:  trunk
changeset: 480779:a86e41765eb8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jan 19 20:05:30 2000 +0000

description:
Move callout initialization to a single location; no need to duplicate
that code all over the place.

diffstat:

 sys/arch/alpha/alpha/machdep.c       |  13 ++-----------
 sys/arch/amiga/amiga/machdep.c       |  10 +---------
 sys/arch/arm32/arm32/machdep.c       |  11 +----------
 sys/arch/atari/atari/machdep.c       |   9 +--------
 sys/arch/bebox/bebox/machdep.c       |  10 +---------
 sys/arch/evbsh3/evbsh3/machdep.c     |   3 +--
 sys/arch/hp300/hp300/machdep.c       |  11 +----------
 sys/arch/hpcmips/hpcmips/machdep.c   |  13 ++-----------
 sys/arch/i386/i386/machdep.c         |  10 +---------
 sys/arch/luna68k/luna68k/machdep.c   |  13 ++-----------
 sys/arch/mac68k/mac68k/machdep.c     |  10 +---------
 sys/arch/macppc/macppc/machdep.c     |  10 +---------
 sys/arch/mips/mips/mips_machdep.c    |   5 ++---
 sys/arch/mvme68k/mvme68k/machdep.c   |  11 +----------
 sys/arch/news68k/news68k/machdep.c   |  11 +----------
 sys/arch/newsmips/newsmips/machdep.c |  13 ++-----------
 sys/arch/next68k/next68k/machdep.c   |  11 +----------
 sys/arch/ofppc/ofppc/machdep.c       |  10 +---------
 sys/arch/pc532/pc532/machdep.c       |  10 +---------
 sys/arch/pica/pica/machdep.c         |  11 +----------
 sys/arch/pmax/pmax/machdep.c         |  13 ++-----------
 sys/arch/sh3/sh3/sh3_machdep.c       |  10 +---------
 sys/arch/sparc/sparc/machdep.c       |  11 +----------
 sys/arch/sparc64/sparc64/machdep.c   |  10 +---------
 sys/arch/sun3/sun3/machdep.c         |  11 +----------
 sys/arch/sun3/sun3x/machdep.c        |  11 +----------
 sys/arch/vax/vax/machdep.c           |  12 +-----------
 sys/arch/x68k/x68k/machdep.c         |  11 +----------
 sys/kern/init_main.c                 |   6 +++++-
 sys/kern/kern_clock.c                |  18 +++++++++++++++++-
 sys/sys/callout.h                    |   4 +++-
 31 files changed, 59 insertions(+), 263 deletions(-)

diffs (truncated from 987 to 300 lines):

diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.190 2000/01/19 02:52:16 msaitoh Exp $ */
+/* $NetBSD: machdep.c,v 1.191 2000/01/19 20:05:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.190 2000/01/19 02:52:16 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.191 2000/01/19 20:05:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -91,7 +91,6 @@
 #include <sys/reboot.h>
 #include <sys/device.h>
 #include <sys/file.h>
-#include <sys/callout.h>
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 #include <sys/mman.h>
@@ -984,14 +983,6 @@
         * map those pages.
         */
 
-       /*
-        * Initialize callouts
-        */
-       callfree = callout;
-       for (i = 1; i < ncallout; i++)
-               callout[i-1].c_next = &callout[i];
-       callout[i-1].c_next = NULL;
-
 #if defined(DEBUG)
        pmapdebug = opmapdebug;
 #endif
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/amiga/amiga/machdep.c
--- a/sys/arch/amiga/amiga/machdep.c    Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/amiga/amiga/machdep.c    Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.144 2000/01/19 02:52:22 msaitoh Exp $    */
+/*     $NetBSD: machdep.c,v 1.145 2000/01/19 20:05:32 thorpej Exp $    */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -60,7 +60,6 @@
 #include <sys/conf.h>
 #include <sys/file.h>
 #include <sys/clist.h>
-#include <sys/callout.h>
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 #include <sys/msgbuf.h>
@@ -348,13 +347,6 @@
                                 nmbclusters * mclbytes, VM_MAP_INTRSAFE,
                                 FALSE, NULL);
 
-       /*
-        * Initialize callouts
-        */
-       callfree = callout;
-       for (i = 1; i < ncallout; i++)
-               callout[i-1].c_next = &callout[i];
-
 #ifdef DEBUG
        pmapdebug = opmapdebug;
 #endif
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/arm32/arm32/machdep.c
--- a/sys/arch/arm32/arm32/machdep.c    Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/arm32/arm32/machdep.c    Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.73 1999/12/04 21:20:07 ragge Exp $       */
+/*     $NetBSD: machdep.c,v 1.74 2000/01/19 20:05:32 thorpej Exp $     */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -47,7 +47,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/reboot.h>
-#include <sys/callout.h>
 #include <sys/proc.h>
 #include <sys/user.h>
 #include <sys/kernel.h>
@@ -452,14 +451,6 @@
                                 nmbclusters * mclbytes, VM_MAP_INTRSAFE,
                                 FALSE, NULL);
 
-       /*
-        * Initialise callouts
-        */
-       callfree = callout;
-       for (loop = 1; loop < ncallout; ++loop)
-               callout[loop - 1].c_next = &callout[loop];
-       callout[loop - 1].c_next = NULL;
-
        format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
        printf("avail memory = %s\n", pbuf);
        format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/atari/atari/machdep.c
--- a/sys/arch/atari/atari/machdep.c    Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/atari/atari/machdep.c    Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.90 2000/01/19 02:52:22 msaitoh Exp $     */
+/*     $NetBSD: machdep.c,v 1.91 2000/01/19 20:05:33 thorpej Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -60,7 +60,6 @@
 #include <sys/conf.h>
 #include <sys/file.h>
 #include <sys/clist.h>
-#include <sys/callout.h>
 #include <sys/device.h>
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
@@ -289,12 +288,6 @@
        if (uvm_map_protect(kernel_map, NBPG, m68k_round_page(&etext),
            UVM_PROT_READ|UVM_PROT_EXEC, TRUE) != KERN_SUCCESS)
                panic("can't protect kernel text");
-       /*
-        * Initialize callouts
-        */
-       callfree = callout;
-       for (i = 1; i < ncallout; i++)
-               callout[i-1].c_next = &callout[i];
 
 #ifdef DEBUG
        pmapdebug = opmapdebug;
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/bebox/bebox/machdep.c
--- a/sys/arch/bebox/bebox/machdep.c    Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/bebox/bebox/machdep.c    Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.47 2000/01/19 03:28:24 danw Exp $        */
+/*     $NetBSD: machdep.c,v 1.48 2000/01/19 20:05:33 thorpej Exp $     */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -41,7 +41,6 @@
 
 #include <sys/param.h>
 #include <sys/buf.h>
-#include <sys/callout.h>
 #include <sys/conf.h>
 #include <sys/device.h>
 #include <sys/exec.h>
@@ -550,13 +549,6 @@
         * pool pages.
         */
 
-       /*
-        * Initialize callouts.
-        */
-       callfree = callout;
-       for (i = 1; i < ncallout; i++)
-               callout[i - 1].c_next = &callout[i];
-
        format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
        printf("avail memory = %s\n", pbuf);
        format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/evbsh3/evbsh3/machdep.c
--- a/sys/arch/evbsh3/evbsh3/machdep.c  Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/evbsh3/evbsh3/machdep.c  Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.6 2000/01/17 21:59:44 msaitoh Exp $      */
+/*     $NetBSD: machdep.c,v 1.7 2000/01/19 20:05:34 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -91,7 +91,6 @@
 #include <sys/reboot.h>
 #include <sys/conf.h>
 #include <sys/file.h>
-#include <sys/callout.h>
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 #include <sys/msgbuf.h>
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/hp300/hp300/machdep.c
--- a/sys/arch/hp300/hp300/machdep.c    Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/hp300/hp300/machdep.c    Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.135 1999/12/14 17:51:21 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.136 2000/01/19 20:05:34 thorpej Exp $    */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -49,7 +49,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/buf.h>
-#include <sys/callout.h>
 #include <sys/clist.h>
 #include <sys/conf.h>
 #include <sys/exec.h>
@@ -383,14 +382,6 @@
                                 nmbclusters * mclbytes, VM_MAP_INTRSAFE,
                                 FALSE, NULL);
 
-       /*
-        * Initialize callouts
-        */
-       callfree = callout;
-       for (i = 1; i < ncallout; i++)
-               callout[i-1].c_next = &callout[i];
-       callout[i-1].c_next = NULL;
-
 #ifdef DEBUG
        pmapdebug = opmapdebug;
 #endif
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/hpcmips/hpcmips/machdep.c
--- a/sys/arch/hpcmips/hpcmips/machdep.c        Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/hpcmips/hpcmips/machdep.c        Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.15 2000/01/19 02:52:18 msaitoh Exp $     */
+/*     $NetBSD: machdep.c,v 1.16 2000/01/19 20:05:35 thorpej Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2000/01/19 02:52:18 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2000/01/19 20:05:35 thorpej Exp $");
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 #include "opt_vr41x1.h"
@@ -63,7 +63,6 @@
 #include <sys/reboot.h>
 #include <sys/conf.h>
 #include <sys/file.h>
-#include <sys/callout.h>
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 #include <sys/msgbuf.h>
@@ -524,14 +523,6 @@
         * map those pages.
         */
 
-       /*
-        * Initialize callouts
-        */
-       callfree = callout;
-       for (i = 1; i < ncallout; i++)
-               callout[i-1].c_next = &callout[i];
-       callout[i-1].c_next = NULL;
-
 #ifdef DEBUG
        pmapdebug = opmapdebug;
 #endif
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/i386/i386/machdep.c      Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.372 1999/12/21 12:34:11 drochner Exp $   */
+/*     $NetBSD: machdep.c,v 1.373 2000/01/19 20:05:35 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -95,7 +95,6 @@
 #include <sys/reboot.h>
 #include <sys/conf.h>
 #include <sys/file.h>
-#include <sys/callout.h>
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 #include <sys/msgbuf.h>
@@ -357,13 +356,6 @@
            nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
 
        /*
-        * Initialize callouts
-        */
-       callfree = callout;
-       for (i = 1; i < ncallout; i++)
-               callout[i-1].c_next = &callout[i];
-
-       /*
         * XXX Buffer cache pages haven't yet been allocated, so
         * XXX we need to account for those pages when printing
         * XXX the amount of free memory.
diff -r 2029a4a1df22 -r a86e41765eb8 sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c        Wed Jan 19 19:43:42 2000 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c        Wed Jan 19 20:05:30 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.3 2000/01/19 02:52:18 msaitoh Exp $ */
+/* $NetBSD: machdep.c,v 1.4 2000/01/19 20:05:37 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.3 2000/01/19 02:52:18 msaitoh Exp $");



Home | Main Index | Thread Index | Old Index