diff options
author | eivind <eivind@FreeBSD.org> | 1998-02-09 06:11:36 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1998-02-09 06:11:36 +0000 |
commit | d7a6ab28035779065026b70dca440892d819c0bc (patch) | |
tree | 930fd4603b42a095e9f3669517dea29274323575 /sys/kern | |
parent | 4538098d0b3fbe09f64c578b730483a6e77ff40f (diff) | |
download | FreeBSD-src-d7a6ab28035779065026b70dca440892d819c0bc.zip FreeBSD-src-d7a6ab28035779065026b70dca440892d819c0bc.tar.gz |
Staticize.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/imgact_elf.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_malloc.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_proc.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_resource.c | 10 | ||||
-rw-r--r-- | sys/kern/subr_smp.c | 12 | ||||
-rw-r--r-- | sys/kern/sys_pipe.c | 6 | ||||
-rw-r--r-- | sys/kern/sysv_shm.c | 4 | ||||
-rw-r--r-- | sys/kern/uipc_syscalls.c | 10 | ||||
-rw-r--r-- | sys/kern/vfs_aio.c | 34 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 11 | ||||
-rw-r--r-- | sys/kern/vfs_conf.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_export.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_init.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_mount.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 6 |
15 files changed, 64 insertions, 61 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index a65f836..8d2b69c 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: imgact_elf.c,v 1.19 1997/04/13 01:48:21 dyson Exp $ + * $Id: imgact_elf.c,v 1.20 1997/09/21 03:13:21 peter Exp $ */ #include "opt_rlimit.h" @@ -69,7 +69,7 @@ static int elf_check_header __P((const Elf32_Ehdr *hdr, int type)); static int elf_load_section __P((struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot)); static int elf_load_file __P((struct proc *p, char *file, u_long *addr, u_long *entry)); static int elf_freebsd_fixup __P((int **stack_base, struct image_params *imgp)); -int exec_elf_imgact __P((struct image_params *imgp)); +static int exec_elf_imgact __P((struct image_params *imgp)); static int elf_trace = 0; SYSCTL_INT(_debug, OID_AUTO, elf_trace, CTLFLAG_RW, &elf_trace, 0, ""); @@ -463,7 +463,7 @@ fail: return error; } -int +static int exec_elf_imgact(struct image_params *imgp) { const Elf32_Ehdr *hdr = (const Elf32_Ehdr *) imgp->image_header; diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index d0fa6e4..e0e2393 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94 - * $Id: kern_malloc.c,v 1.41 1998/02/05 03:32:06 dyson Exp $ + * $Id: kern_malloc.c,v 1.42 1998/02/06 12:13:23 eivind Exp $ */ #include <sys/param.h> @@ -56,7 +56,7 @@ SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL) static MALLOC_DEFINE(M_FREE, "free", "should be on free list"); -struct malloc_type *kmemstatistics = M_FREE; +static struct malloc_type *kmemstatistics = M_FREE; static struct kmembuckets bucket[MINBUCKET + 16]; static struct kmemusage *kmemusage; static char *kmembase; diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 63b193d..029db1f 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 - * $Id: kern_proc.c,v 1.33 1998/02/04 22:32:33 eivind Exp $ + * $Id: kern_proc.c,v 1.34 1998/02/06 12:13:24 eivind Exp $ */ #include <sys/param.h> @@ -69,7 +69,7 @@ struct uidinfo { long ui_proccnt; }; #define UIHASH(uid) (&uihashtbl[(uid) & uihash]) -LIST_HEAD(uihashhead, uidinfo) *uihashtbl; +static LIST_HEAD(uihashhead, uidinfo) *uihashtbl; static u_long uihash; /* size of hash table - 1 */ static void orphanpg __P((struct pgrp *pg)); diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index d1bb77f..02c288e 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_resource.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_resource.c,v 1.30 1998/01/19 12:39:00 bde Exp $ + * $Id: kern_resource.c,v 1.31 1998/02/04 18:43:10 dg Exp $ */ #include "opt_compat.h" @@ -58,8 +58,8 @@ #include <vm/pmap.h> #include <vm/vm_map.h> -int donice __P((struct proc *curp, struct proc *chgp, int n)); -int dosetrlimit __P((struct proc *p, u_int which, struct rlimit *limp)); +static int donice __P((struct proc *curp, struct proc *chgp, int n)); +static int dosetrlimit __P((struct proc *p, u_int which, struct rlimit *limp)); /* * Resource controls and accounting. @@ -186,7 +186,7 @@ setpriority(curp, uap) return (error); } -int +static int donice(curp, chgp, n) register struct proc *curp, *chgp; register int n; @@ -360,7 +360,7 @@ setrlimit(p, uap) return (dosetrlimit(p, uap->which, &alim)); } -int +static int dosetrlimit(p, which, limp) struct proc *p; u_int which; diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index 7397775..0b5a162 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $ + * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $ */ #include "opt_smp.h" @@ -265,7 +265,7 @@ static struct { /* Bitmap of all available CPUs */ u_int all_cpus; -/* AP uses this PTD during bootstrap */ +/* AP uses this PTD during bootstrap. Do not staticize. */ pd_entry_t *bootPTD; /* Hotwire a 0->4MB V==P mapping */ @@ -689,10 +689,10 @@ static int default_data[7][5] = /* the bus data */ -bus_datum bus_data[NBUS]; +static bus_datum bus_data[NBUS]; /* the IO INT data, one entry per possible APIC INTerrupt */ -io_int io_apic_ints[NINTR]; +static io_int io_apic_ints[NINTR]; static int nintrs; @@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */ SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, ""); /* XXX maybe should be hw.ncpu */ -int smp_cpus = 1; /* how many cpu's running */ +static int smp_cpus = 1; /* how many cpu's running */ SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, ""); int invltlb_ok = 0; /* throttle smp_invltlb() till safe */ SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, ""); +/* Warning: Do not staticize. Used from swtch.s */ int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */ SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW, &do_page_zero_idle, 0, ""); @@ -2092,6 +2093,7 @@ putfmtrr() #define CHECKSTATE_SYS 1 #define CHECKSTATE_INTR 2 +/* Do not staticize. Used from apic_vector.s */ struct proc* checkstate_curproc[NCPU]; int checkstate_cpustate[NCPU]; u_long checkstate_pc[NCPU]; diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 3565e95..8c008a2 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: sys_pipe.c,v 1.37 1998/02/04 22:32:35 eivind Exp $ + * $Id: sys_pipe.c,v 1.38 1998/02/06 12:13:26 eivind Exp $ */ /* @@ -122,7 +122,7 @@ static struct fileops pipeops = * Limit the number of "big" pipes */ #define LIMITBIGPIPES 32 -int nbigpipe; +static int nbigpipe; static int amountpipekva; @@ -139,7 +139,7 @@ static void pipe_clone_write_buffer __P((struct pipe *wpipe)); #endif static void pipespace __P((struct pipe *cpipe)); -vm_zone_t pipe_zone; +static vm_zone_t pipe_zone; /* * The pipe system call for the DTYPE_PIPE type of pipes diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 701f917..4d05cad 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $Id: sysv_shm.c,v 1.32 1997/11/06 19:29:25 phk Exp $ */ +/* $Id: sysv_shm.c,v 1.33 1997/12/16 17:40:23 eivind Exp $ */ /* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ /* @@ -77,7 +77,7 @@ static int shmget_allocate_segment __P((struct proc *p, struct shmget_args *uap, static int shmget_existing __P((struct proc *p, struct shmget_args *uap, int mode, int segnum)); /* XXX casting to (sy_call_t *) is bogus, as usual. */ -sy_call_t *shmcalls[] = { +static sy_call_t *shmcalls[] = { (sy_call_t *)shmat, (sy_call_t *)oshmctl, (sy_call_t *)shmdt, (sy_call_t *)shmget, (sy_call_t *)shmctl diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 20004a7..c1a5826 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 - * $Id: uipc_syscalls.c,v 1.34 1997/12/15 02:29:10 msmith Exp $ + * $Id: uipc_syscalls.c,v 1.35 1997/12/16 17:40:30 eivind Exp $ */ #include "opt_compat.h" @@ -54,8 +54,8 @@ #include <sys/ktrace.h> #endif -extern int sendit __P((struct proc *p, int s, struct msghdr *mp, int flags)); -extern int recvit __P((struct proc *p, int s, struct msghdr *mp, +static int sendit __P((struct proc *p, int s, struct msghdr *mp, int flags)); +static int recvit __P((struct proc *p, int s, struct msghdr *mp, caddr_t namelenp)); static int accept1 __P((struct proc *p, struct accept_args *uap, int compat)); @@ -397,7 +397,7 @@ free1: return (error); } -int +static int sendit(p, s, mp, flags) register struct proc *p; int s; @@ -633,7 +633,7 @@ done: return (error); } -int +static int recvit(p, s, mp, namelenp) register struct proc *p; int s; diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 802b069..683b99c 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -13,7 +13,7 @@ * bad that happens because of using this software isn't the responsibility * of the author. This software is distributed AS-IS. * - * $Id: vfs_aio.c,v 1.21 1998/02/04 22:32:38 eivind Exp $ + * $Id: vfs_aio.c,v 1.22 1998/02/06 12:13:29 eivind Exp $ */ /* @@ -92,20 +92,20 @@ static int jobrefid; #define AIOD_LIFETIME_DEFAULT (30 * hz) #endif -int max_aio_procs = MAX_AIO_PROCS; -int num_aio_procs = 0; -int target_aio_procs = TARGET_AIO_PROCS; -int max_queue_count = MAX_AIO_QUEUE; -int num_queue_count = 0; -int num_buf_aio = 0; -int num_aio_resv_start = 0; -int aiod_timeout; -int aiod_lifetime; - -int max_aio_per_proc = MAX_AIO_PER_PROC, +static int max_aio_procs = MAX_AIO_PROCS; +static int num_aio_procs = 0; +static int target_aio_procs = TARGET_AIO_PROCS; +static int max_queue_count = MAX_AIO_QUEUE; +static int num_queue_count = 0; +static int num_buf_aio = 0; +static int num_aio_resv_start = 0; +static int aiod_timeout; +static int aiod_lifetime; + +static int max_aio_per_proc = MAX_AIO_PER_PROC, max_aio_queue_per_proc=MAX_AIO_QUEUE_PER_PROC; -int max_buf_aio = MAX_BUF_AIO; +static int max_buf_aio = MAX_BUF_AIO; SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "AIO mgmt"); @@ -222,10 +222,10 @@ struct kaioinfo { event */ -TAILQ_HEAD (,aioproclist) aio_freeproc, aio_activeproc; -TAILQ_HEAD(,aiocblist) aio_jobs; /* Async job list */ -TAILQ_HEAD(,aiocblist) aio_bufjobs; /* Phys I/O job list */ -TAILQ_HEAD(,aiocblist) aio_freejobs; /* Pool of free jobs */ +static TAILQ_HEAD (,aioproclist) aio_freeproc, aio_activeproc; +static TAILQ_HEAD(,aiocblist) aio_jobs; /* Async job list */ +static TAILQ_HEAD(,aiocblist) aio_bufjobs; /* Phys I/O job list */ +static TAILQ_HEAD(,aiocblist) aio_freejobs; /* Pool of free jobs */ static void aio_init_aioinfo(struct proc *p) ; static void aio_onceonly(void *) ; diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index c03a8f8..51b49ba 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $Id: vfs_bio.c,v 1.148 1998/02/04 22:32:39 eivind Exp $ + * $Id: vfs_bio.c,v 1.149 1998/02/06 12:13:29 eivind Exp $ */ /* @@ -65,7 +65,7 @@ SYSINIT_KT(update, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, &up_kp) struct buf *buf; /* buffer header pool */ struct swqueue bswlist; -int count_lock_queue __P((void)); +static int count_lock_queue __P((void)); static void vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to); static void vm_hold_load_pages(struct buf * bp, vm_offset_t from, @@ -105,7 +105,8 @@ static vm_offset_t bogus_offset; static int bufspace, maxbufspace, vmiospace, maxvmiobufspace, bufmallocspace, maxbufmallocspace; -int numdirtybuffers, lodirtybuffers, hidirtybuffers; +int numdirtybuffers; +static int lodirtybuffers, hidirtybuffers; static int numfreebuffers, lofreebuffers, hifreebuffers; static int kvafreespace; @@ -1972,7 +1973,7 @@ biodone(register struct buf * bp) splx(s); } -int +static int count_lock_queue() { int count; @@ -1986,7 +1987,7 @@ count_lock_queue() return (count); } -int vfs_update_interval = 30; +static int vfs_update_interval = 30; static void vfs_update() diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 4a103be..56fb1b9 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id: vfs_conf.c,v 1.19 1997/12/01 11:34:41 julian Exp $ + * $Id: vfs_conf.c,v 1.20 1998/01/09 03:21:01 eivind Exp $ */ /* @@ -70,7 +70,7 @@ MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount struct"); /* * These define the root filesystem, device, and root filesystem type. */ -struct mount *rootfs; +static struct mount *rootfs; struct vnode *rootvnode; char *mountrootfsname; #ifdef BOOTP diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 376b833..e764907 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.130 1998/02/06 12:13:31 eivind Exp $ + * $Id: vfs_subr.c,v 1.131 1998/02/07 08:44:31 kato Exp $ */ /* @@ -103,7 +103,7 @@ int vttoif_tab[9] = { (bp)->b_vnbufs.le_next = NOLIST; \ } -TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */ +static TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */ struct tobefreelist vnode_tobefree_list; /* vnode free list */ static u_long wantfreevnodes = 25; @@ -118,7 +118,7 @@ struct mntlist mountlist; /* mounted filesystem list */ struct simplelock mountlist_slock; static struct simplelock mntid_slock; struct simplelock mntvnode_slock; -struct simplelock vnode_free_list_slock; +static struct simplelock vnode_free_list_slock; static struct simplelock spechash_slock; struct nfs_public nfs_pub; /* publicly exported FS */ static vm_zone_t vnode_zone; diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 1982913..c6aaacb 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 - * $Id: vfs_init.c,v 1.30 1997/10/16 10:47:57 phk Exp $ + * $Id: vfs_init.c,v 1.31 1997/10/26 20:26:33 phk Exp $ */ @@ -64,7 +64,7 @@ MALLOC_DEFINE(M_VNODE, "vnodes", "Dynamically allocated vnodes"); #define DODEBUG(A) #endif -struct vfsconf void_vfsconf; +static struct vfsconf void_vfsconf; extern struct linker_set vfs_opv_descs_; #define vfs_opv_descs ((struct vnodeopv_desc **)vfs_opv_descs_.ls_items) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 4a103be..56fb1b9 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id: vfs_conf.c,v 1.19 1997/12/01 11:34:41 julian Exp $ + * $Id: vfs_conf.c,v 1.20 1998/01/09 03:21:01 eivind Exp $ */ /* @@ -70,7 +70,7 @@ MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount struct"); /* * These define the root filesystem, device, and root filesystem type. */ -struct mount *rootfs; +static struct mount *rootfs; struct vnode *rootvnode; char *mountrootfsname; #ifdef BOOTP diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 376b833..e764907 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.130 1998/02/06 12:13:31 eivind Exp $ + * $Id: vfs_subr.c,v 1.131 1998/02/07 08:44:31 kato Exp $ */ /* @@ -103,7 +103,7 @@ int vttoif_tab[9] = { (bp)->b_vnbufs.le_next = NOLIST; \ } -TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */ +static TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */ struct tobefreelist vnode_tobefree_list; /* vnode free list */ static u_long wantfreevnodes = 25; @@ -118,7 +118,7 @@ struct mntlist mountlist; /* mounted filesystem list */ struct simplelock mountlist_slock; static struct simplelock mntid_slock; struct simplelock mntvnode_slock; -struct simplelock vnode_free_list_slock; +static struct simplelock vnode_free_list_slock; static struct simplelock spechash_slock; struct nfs_public nfs_pub; /* publicly exported FS */ static vm_zone_t vnode_zone; |