BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / sys / systm.h
index 646c4b5..03340bc 100644 (file)
-/*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+/*-
+ * Copyright (c) 1982, 1988, 1991 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  *
  *
- *     @(#)systm.h     7.11 (Berkeley) %G%
+ *     @(#)systm.h     7.17 (Berkeley) 5/25/91
  */
 
  */
 
-/*
- * Random set of variables
- * used by more than one
- * routine.
- */
-extern char version[];         /* system version */
+extern char *panicstr;         /* panic message */
+extern char version[];         /* system version */
+extern char copyright[];       /* system copyright */
 
 
-/*
- * Nblkdev is the number of entries (rows) in the block switch.
- * Used in bounds checking on major device numbers.
- */
-int    nblkdev;
+extern int nblkdev;            /* number of entries in bdevsw */
+extern int nchrdev;            /* number of entries in cdevsw */
+extern int nswdev;             /* number of swap devices */
+extern int nswap;              /* size of swap space */
 
 
-/*
- * Number of character switch entries.
- */
-int    nchrdev;
+extern int selwait;            /* select timeout address */
 
 
-int    nswdev;                 /* number of swap devices */
-char   kmapwnt;                /* kernel map want flag */
-u_char curpri;                 /* priority of current process */
+extern u_char curpri;          /* priority of current process */
 
 
-int    maxmem;                 /* actual max memory per process */
-int    physmem;                /* physical memory on this CPU */
+extern int maxmem;             /* max memory per process */
+extern int physmem;            /* physical memory */
 
 
-int    nswap;                  /* size of swap space */
-extern int intstack[];         /* stack for interrupts */
-dev_t  rootdev;                /* device of the root */
-struct vnode *rootvp;          /* vnode of root filesystem */
-dev_t  dumpdev;                /* device to take dumps on */
-long   dumplo;                 /* offset into dumpdev */
-dev_t  swapdev;                /* swapping device */
-struct vnode *swapdev_vp;      /* vnode equivalent to above */
-dev_t  argdev;                 /* device for argument lists */
-struct vnode *argdev_vp;       /* vnode equivalent to above */
+extern dev_t dumpdev;          /* dump device */
+extern long dumplo;            /* offset into dumpdev */
 
 
-extern int icode[];            /* user init code */
-extern int szicode;            /* its size */
+extern dev_t rootdev;          /* root device */
+extern struct vnode *rootvp;   /* vnode equivalent to above */
 
 
-int    memall();
-int    vmemall();
-swblk_t        vtod();
+extern dev_t swapdev;          /* swapping device */
+extern struct vnode *swapdev_vp;/* vnode equivalent to above */
 
 
-/*
- * Structure of the system-entry table
- */
-extern struct sysent {
-       int     sy_narg;                /* total number of arguments */
-       int     (*sy_call)();           /* handler */
+extern struct sysent {         /* system call table */
+       int     sy_narg;        /* number of arguments */
+       int     (*sy_call)();   /* implementing function */
 } sysent[];
 
 } sysent[];
 
-int    noproc;                 /* no one is running just now */
-char   *panicstr;
-int    boothowto;              /* reboot flags, from console subsystem */
+extern int boothowto;          /* reboot flags, from console subsystem */
 #ifdef KADB
 #ifdef KADB
-char   *bootesym;              /* end of symbol info from boot */
+extern char *bootesym;         /* end of symbol info from boot */
 #endif
 #endif
-int    selwait;
-
-extern char *vmmap;            /* poor name! */
 
 /* casts to keep lint happy */
 #define        insque(q,p)     _insque((caddr_t)q,(caddr_t)p)
 #define        remque(q)       _remque((caddr_t)q)
 
 /*
 
 /* casts to keep lint happy */
 #define        insque(q,p)     _insque((caddr_t)q,(caddr_t)p)
 #define        remque(q)       _remque((caddr_t)q)
 
 /*
- * General function declarations
+ * General function declarations.
  */
 int    nullop __P((void));
 int    enodev __P((void));
  */
 int    nullop __P((void));
 int    enodev __P((void));
+int    enoioctl __P((void));
 int    enxio __P((void));
 int    eopnotsupp __P((void));
 int    seltrue __P((dev_t dev, int which, struct proc *p));
 int    enxio __P((void));
 int    eopnotsupp __P((void));
 int    seltrue __P((dev_t dev, int which, struct proc *p));
+
+void   panic __P((char *));
+void   tablefull __P((char *));
+void   addlog __P((const char *, ...));
+void   log __P((int, const char *, ...));
+void   printf __P((const char *, ...));
+int    sprintf __P((char *buf, const char *, ...));
+void   ttyprintf __P((struct tty *, const char *, ...));
+
+void   bcopy __P((void *from, void *to, u_int len));
+void   ovbcopy __P((void *from, void *to, u_int len));
+void   bzero __P((void *buf, u_int len));
+int    bcmp __P((void *str1, void *str2, u_int len));
+int    strlen __P((char *string));
+
+int    copystr __P((void *kfaddr, void *kdaddr, u_int len, u_int *done));
+int    copyinstr __P((void *udaddr, void *kaddr, u_int len, u_int *done));
+int    copyoutstr __P((void *kaddr, void *udaddr, u_int len, u_int *done));
+int    copyin __P((void *udaddr, void *kaddr, u_int len));
+int    copyout __P((void *kaddr, void *udaddr, u_int len));
+
+int    fubyte __P((void *base));
+#ifdef notdef
+int    fuibyte __P((void *base));
+#endif
+int    subyte __P((void *base, int byte));
+int    suibyte __P((void *base, int byte));
+int    fuword __P((void *base));
+int    fuiword __P((void *base));
+int    suword __P((void *base, int word));
+int    suiword __P((void *base, int word));
+
+int    scanc __P((unsigned size, u_char *cp, u_char *table, int mask));
+int    skpc __P((int mask, int size, char *cp));
+int    locc __P((int mask, char *cp, unsigned size));
+int    ffs __P((long value));