From 6050b2deb7a6c13699916780cc8d104750e657a2 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Sun, 3 Mar 1996 12:12:50 +0000 Subject: From NetBSD: 960217 merge --- sys/sys/acct.h | 1 + sys/sys/audioio.h | 1 + sys/sys/callout.h | 1 + sys/sys/cdefs.h | 1 + sys/sys/cdio.h | 1 + sys/sys/chio.h | 1 + sys/sys/clist.h | 1 + sys/sys/conf.h | 7 +++++- sys/sys/core.h | 1 + sys/sys/cpu.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/device.h | 6 +++-- sys/sys/dir.h | 1 + sys/sys/dirent.h | 1 + sys/sys/disk.h | 1 + sys/sys/disklabel.h | 1 + sys/sys/dkbad.h | 1 + sys/sys/dkio.h | 1 + sys/sys/dkstat.h | 1 + sys/sys/dmap.h | 1 + sys/sys/domain.h | 14 +++++++----- sys/sys/errno.h | 1 + sys/sys/exec.h | 4 +++- sys/sys/exec_aout.h | 11 ++++++++- sys/sys/exec_ecoff.h | 1 + sys/sys/exec_elf.h | 1 + sys/sys/exec_script.h | 1 + sys/sys/fcntl.h | 1 + sys/sys/file.h | 1 + sys/sys/filedesc.h | 10 ++++++++- sys/sys/filio.h | 1 + sys/sys/gmon.h | 1 + sys/sys/ioccom.h | 1 + sys/sys/ioctl.h | 1 + sys/sys/ioctl_compat.h | 1 + sys/sys/ipc.h | 5 ++++- sys/sys/kernel.h | 1 + sys/sys/ktrace.h | 13 ++++++++++- sys/sys/lkm.h | 5 +++-- sys/sys/localedef.h | 1 + sys/sys/lockf.h | 1 + sys/sys/malloc.h | 1 + sys/sys/map.h | 1 + sys/sys/mbuf.h | 12 ++++++++-- sys/sys/mman.h | 1 + sys/sys/msg.h | 5 ++++- sys/sys/msgbuf.h | 1 + sys/sys/mtio.h | 1 + sys/sys/namei.h | 12 ++++++++-- sys/sys/param.h | 1 + sys/sys/proc.h | 8 ++++++- sys/sys/protosw.h | 49 ++++++++++++++++++++++++++++++---------- sys/sys/ptrace.h | 5 ++++- sys/sys/queue.h | 1 + sys/sys/reboot.h | 1 + sys/sys/resource.h | 5 ++++- sys/sys/resourcevar.h | 1 + sys/sys/scanio.h | 1 + sys/sys/scsiio.h | 1 + sys/sys/select.h | 1 + sys/sys/sem.h | 6 ++++- sys/sys/shm.h | 7 +++++- sys/sys/signal.h | 19 ++++++++++++---- sys/sys/signalvar.h | 14 +++++++----- sys/sys/socketvar.h | 1 + sys/sys/sockio.h | 1 + sys/sys/sysctl.h | 33 ++++++++++++++++++++++++++- sys/sys/syslimits.h | 1 + sys/sys/syslog.h | 4 +++- sys/sys/tablet.h | 5 +++-- sys/sys/termios.h | 1 + sys/sys/timeb.h | 1 + sys/sys/times.h | 1 + sys/sys/timex.h | 2 ++ sys/sys/tprintf.h | 1 + sys/sys/trace.h | 1 + sys/sys/tty.h | 19 +++++++++++++++- sys/sys/ttychars.h | 1 + sys/sys/ttycom.h | 1 + sys/sys/ttydefaults.h | 1 + sys/sys/ttydev.h | 1 + sys/sys/types.h | 1 + sys/sys/ucred.h | 1 + sys/sys/uio.h | 6 ++++- sys/sys/un.h | 11 +++++---- sys/sys/unistd.h | 1 + sys/sys/unpcb.h | 1 + sys/sys/user.h | 1 + sys/sys/utsname.h | 1 + sys/sys/vadvise.h | 1 + sys/sys/vcmd.h | 1 + sys/sys/vlimit.h | 1 + sys/sys/vmmeter.h | 1 + sys/sys/vsio.h | 1 + sys/sys/wait.h | 1 + 94 files changed, 367 insertions(+), 57 deletions(-) diff --git a/sys/sys/acct.h b/sys/sys/acct.h index 693777e4206..6ae0361006d 100644 --- a/sys/sys/acct.h +++ b/sys/sys/acct.h @@ -1,3 +1,4 @@ +/* $OpenBSD: acct.h,v 1.2 1996/03/03 12:11:20 niklas Exp $ */ /* $NetBSD: acct.h,v 1.16 1995/03/26 20:23:52 jtc Exp $ */ /*- diff --git a/sys/sys/audioio.h b/sys/sys/audioio.h index 4a5bb099377..4833833c4a4 100644 --- a/sys/sys/audioio.h +++ b/sys/sys/audioio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: audioio.h,v 1.3 1996/03/03 12:11:22 niklas Exp $ */ /* $NetBSD: audioio.h,v 1.4 1996/02/17 02:28:56 jtk Exp $ */ /* diff --git a/sys/sys/callout.h b/sys/sys/callout.h index 2b743e83c4a..b7b2cce66f0 100644 --- a/sys/sys/callout.h +++ b/sys/sys/callout.h @@ -1,3 +1,4 @@ +/* $OpenBSD: callout.h,v 1.2 1996/03/03 12:11:22 niklas Exp $ */ /* $NetBSD: callout.h,v 1.10 1995/03/26 20:23:56 jtc Exp $ */ /*- diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 2e84b117bda..67f76c89cc0 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -1,3 +1,4 @@ +/* $OpenBSD: cdefs.h,v 1.2 1996/03/03 12:11:23 niklas Exp $ */ /* $NetBSD: cdefs.h,v 1.15 1995/01/19 01:54:52 jtc Exp $ */ /* diff --git a/sys/sys/cdio.h b/sys/sys/cdio.h index 77b7e169255..0ef183f8ad5 100644 --- a/sys/sys/cdio.h +++ b/sys/sys/cdio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: cdio.h,v 1.4 1996/03/03 12:11:24 niklas Exp $ */ /* $NetBSD: cdio.h,v 1.11 1996/02/19 18:29:04 scottr Exp $ */ #ifndef _SYS_CDIO_H_ diff --git a/sys/sys/chio.h b/sys/sys/chio.h index 7c1b3ae1c4a..6c084dda570 100644 --- a/sys/sys/chio.h +++ b/sys/sys/chio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: chio.h,v 1.3 1996/03/03 12:11:25 niklas Exp $ */ /* $NetBSD: chio.h,v 1.7 1996/02/19 18:29:06 scottr Exp $ */ /* diff --git a/sys/sys/clist.h b/sys/sys/clist.h index 1ff584e6091..254c62d56ed 100644 --- a/sys/sys/clist.h +++ b/sys/sys/clist.h @@ -1,3 +1,4 @@ +/* $OpenBSD: clist.h,v 1.2 1996/03/03 12:11:26 niklas Exp $ */ /* $NetBSD: clist.h,v 1.7 1995/03/26 20:23:57 jtc Exp $ */ /*- diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 30b86ad7bde..e4cb5e72632 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,5 @@ -/* $NetBSD: conf.h,v 1.28 1995/08/14 05:05:55 cgd Exp $ */ +/* $OpenBSD: conf.h,v 1.3 1996/03/03 12:11:27 niklas Exp $ */ +/* $NetBSD: conf.h,v 1.30 1996/02/13 21:08:50 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -346,4 +347,8 @@ struct swdevt { #ifdef _KERNEL extern struct swdevt swdevt[]; + +int chrtoblk __P((dev_t)); +int iskmemdev __P((dev_t)); +int iszerodev __P((dev_t)); #endif diff --git a/sys/sys/core.h b/sys/sys/core.h index d772ad1b2a6..6606a4c39c6 100644 --- a/sys/sys/core.h +++ b/sys/sys/core.h @@ -1,3 +1,4 @@ +/* $OpenBSD: core.h,v 1.2 1996/03/03 12:11:28 niklas Exp $ */ /* $NetBSD: core.h,v 1.4 1994/10/29 08:20:14 cgd Exp $ */ /* diff --git a/sys/sys/cpu.h b/sys/sys/cpu.h index cdd8dcc371e..807ab4cee43 100644 --- a/sys/sys/cpu.h +++ b/sys/sys/cpu.h @@ -1,3 +1,64 @@ +/* $OpenBSD: cpu.h,v 1.2 1996/03/03 12:11:29 niklas Exp $ */ +/* $NetBSD: cpu.h,v 1.3 1996/02/14 21:49:49 christos Exp $ */ + +/* + * Copyright (c) 1996 Christos Zoulas. 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 Christos Zoulas. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +#ifdef _KERNEL +struct proc; +struct vnode; +struct code; +struct ucred; +struct core; +struct buf; +struct disklabel; +struct device; +struct disk; +__BEGIN_DECLS + +void consinit __P((void)); +void boot __P((int)); +void pagemove __P((caddr_t, caddr_t, size_t)); +void delay __P((unsigned)); +int bounds_check_with_label __P((struct buf *, struct disklabel *, int)); +int dk_establish __P((struct disk *, struct device *)); + + +void cpu_exit __P((struct proc *)); +void cpu_startup __P((void)); +void cpu_initclocks __P((void)); +void cpu_switch __P((struct proc *)); +int cpu_coredump __P((struct proc *, struct vnode *, struct ucred *, + struct core *)); +__END_DECLS + +#endif /* _KERNEL */ /* $NetBSD: cpu.h,v 1.4 1996/02/16 17:25:46 gwr Exp $ */ /* diff --git a/sys/sys/device.h b/sys/sys/device.h index 10d476f0e64..39211b71123 100644 --- a/sys/sys/device.h +++ b/sys/sys/device.h @@ -1,4 +1,5 @@ -/* $NetBSD: device.h,v 1.8 1994/11/04 06:40:17 mycroft Exp $ */ +/* $OpenBSD: device.h,v 1.2 1996/03/03 12:11:30 niklas Exp $ */ +/* $NetBSD: device.h,v 1.9 1996/02/09 18:25:04 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -87,7 +88,8 @@ struct cfdata { int *cf_loc; /* locators (machine dependent) */ int cf_flags; /* flags from config */ short *cf_parents; /* potential parents */ - void (**cf_ivstubs)(); /* config-generated vectors, if any */ + void (**cf_ivstubs) /* config-generated vectors, if any */ + __P((void)); }; #define FSTATE_NOTFOUND 0 /* has not been found */ #define FSTATE_FOUND 1 /* has been found */ diff --git a/sys/sys/dir.h b/sys/sys/dir.h index 1ff913b1058..dff3263c8f7 100644 --- a/sys/sys/dir.h +++ b/sys/sys/dir.h @@ -1,3 +1,4 @@ +/* $OpenBSD: dir.h,v 1.2 1996/03/03 12:11:31 niklas Exp $ */ /* $NetBSD: dir.h,v 1.8 1994/06/29 06:43:52 cgd Exp $ */ /* diff --git a/sys/sys/dirent.h b/sys/sys/dirent.h index 331f65c1907..be379d8795e 100644 --- a/sys/sys/dirent.h +++ b/sys/sys/dirent.h @@ -1,3 +1,4 @@ +/* $OpenBSD: dirent.h,v 1.2 1996/03/03 12:11:32 niklas Exp $ */ /* $NetBSD: dirent.h,v 1.9 1994/12/13 15:58:20 mycroft Exp $ */ /*- diff --git a/sys/sys/disk.h b/sys/sys/disk.h index 9dd2afc75c3..fab4a55152f 100644 --- a/sys/sys/disk.h +++ b/sys/sys/disk.h @@ -1,3 +1,4 @@ +/* $OpenBSD: disk.h,v 1.3 1996/03/03 12:11:33 niklas Exp $ */ /* $NetBSD: disk.h,v 1.9 1996/01/07 22:04:07 thorpej Exp $ */ /* diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 34f1c45a3ee..ede9fbc0021 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -1,3 +1,4 @@ +/* $OpenBSD: disklabel.h,v 1.4 1996/03/03 12:11:33 niklas Exp $ */ /* $NetBSD: disklabel.h,v 1.38 1996/02/09 18:25:05 christos Exp $ */ /* diff --git a/sys/sys/dkbad.h b/sys/sys/dkbad.h index 6f90042f006..dd0e28e8b16 100644 --- a/sys/sys/dkbad.h +++ b/sys/sys/dkbad.h @@ -1,3 +1,4 @@ +/* $OpenBSD: dkbad.h,v 1.2 1996/03/03 12:11:35 niklas Exp $ */ /* $NetBSD: dkbad.h,v 1.10 1994/12/25 13:14:21 pk Exp $ */ /*- diff --git a/sys/sys/dkio.h b/sys/sys/dkio.h index c223775ef17..2405f1bc627 100644 --- a/sys/sys/dkio.h +++ b/sys/sys/dkio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: dkio.h,v 1.2 1996/03/03 12:11:35 niklas Exp $ */ /* $NetBSD: dkio.h,v 1.1 1996/01/30 18:21:48 thorpej Exp $ */ /* diff --git a/sys/sys/dkstat.h b/sys/sys/dkstat.h index 8ce9eaa17db..8d134e5c3cf 100644 --- a/sys/sys/dkstat.h +++ b/sys/sys/dkstat.h @@ -1,3 +1,4 @@ +/* $OpenBSD: dkstat.h,v 1.3 1996/03/03 12:11:36 niklas Exp $ */ /* $NetBSD: dkstat.h,v 1.8 1995/12/28 19:16:31 thorpej Exp $ */ /*- diff --git a/sys/sys/dmap.h b/sys/sys/dmap.h index 24678f71b65..f4848f98747 100644 --- a/sys/sys/dmap.h +++ b/sys/sys/dmap.h @@ -1,3 +1,4 @@ +/* $OpenBSD: dmap.h,v 1.2 1996/03/03 12:11:37 niklas Exp $ */ /* $NetBSD: dmap.h,v 1.7 1995/03/26 20:24:02 jtc Exp $ */ /*- diff --git a/sys/sys/domain.h b/sys/sys/domain.h index 2f930610e7a..23f2f25871f 100644 --- a/sys/sys/domain.h +++ b/sys/sys/domain.h @@ -1,4 +1,5 @@ -/* $NetBSD: domain.h,v 1.8 1995/03/26 20:24:03 jtc Exp $ */ +/* $OpenBSD: domain.h,v 1.2 1996/03/03 12:11:38 niklas Exp $ */ +/* $NetBSD: domain.h,v 1.10 1996/02/09 18:25:07 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -48,19 +49,20 @@ struct domain { int dom_family; /* AF_xxx */ char *dom_name; void (*dom_init) /* initialize domain data structures */ - __P((void)); + __P((void)); int (*dom_externalize) /* externalize access rights */ - __P((struct mbuf *)); - int (*dom_dispose) /* dispose of internalized rights */ - __P((struct mbuf *)); + __P((struct mbuf *)); + void (*dom_dispose) /* dispose of internalized rights */ + __P((struct mbuf *)); struct protosw *dom_protosw, *dom_protoswNPROTOSW; struct domain *dom_next; int (*dom_rtattach) /* initialize routing table */ - __P((void **, int)); + __P((void **, int)); int dom_rtoffset; /* an arg to rtattach, in bits */ int dom_maxrtkey; /* for routing layer */ }; #ifdef _KERNEL struct domain *domains; +void domaininit __P((void)); #endif diff --git a/sys/sys/errno.h b/sys/sys/errno.h index c313b578c5a..ca3781099a5 100644 --- a/sys/sys/errno.h +++ b/sys/sys/errno.h @@ -1,3 +1,4 @@ +/* $OpenBSD: errno.h,v 1.3 1996/03/03 12:11:39 niklas Exp $ */ /* $NetBSD: errno.h,v 1.10 1996/01/20 01:33:53 jtc Exp $ */ /* diff --git a/sys/sys/exec.h b/sys/sys/exec.h index 0a24e92b5c8..e1a96754b09 100644 --- a/sys/sys/exec.h +++ b/sys/sys/exec.h @@ -1,4 +1,5 @@ -/* $NetBSD: exec.h,v 1.58 1995/11/28 08:16:47 thorpej Exp $ */ +/* $OpenBSD: exec.h,v 1.3 1996/03/03 12:11:40 niklas Exp $ */ +/* $NetBSD: exec.h,v 1.59 1996/02/09 18:25:09 christos Exp $ */ /*- * Copyright (c) 1994 Christopher G. Demetriou @@ -167,6 +168,7 @@ void *copyargs __P((struct exec_package *, struct ps_strings *, void *, void *)); void setregs __P((struct proc *, struct exec_package *, u_long, register_t *)); +int check_exec __P((struct proc *, struct exec_package *)); #ifdef DEBUG void new_vmcmd __P((struct exec_vmcmd_set *evsp, diff --git a/sys/sys/exec_aout.h b/sys/sys/exec_aout.h index 942b665cf3c..e98dd8b5c92 100644 --- a/sys/sys/exec_aout.h +++ b/sys/sys/exec_aout.h @@ -1,4 +1,5 @@ -/* $NetBSD: exec_aout.h,v 1.12 1995/08/18 15:32:58 pk Exp $ */ +/* $OpenBSD: exec_aout.h,v 1.2 1996/03/03 12:11:41 niklas Exp $ */ +/* $NetBSD: exec_aout.h,v 1.13 1996/02/09 18:25:10 christos Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -172,9 +173,17 @@ struct exec { int exec_aout_makecmds __P((struct proc *, struct exec_package *)); /* functions which prepare various a.out executable types */ +/* + * MI portion + */ int exec_aout_prep_zmagic __P((struct proc *, struct exec_package *)); int exec_aout_prep_nmagic __P((struct proc *, struct exec_package *)); int exec_aout_prep_omagic __P((struct proc *, struct exec_package *)); int exec_aout_setup_stack __P((struct proc *, struct exec_package *)); +/* + * MD portion + */ +int cpu_exec_aout_makecmds __P((struct proc *, struct exec_package *)); + #endif /* _KERNEL */ diff --git a/sys/sys/exec_ecoff.h b/sys/sys/exec_ecoff.h index 848169504a5..f0e13224e4a 100644 --- a/sys/sys/exec_ecoff.h +++ b/sys/sys/exec_ecoff.h @@ -1,3 +1,4 @@ +/* $OpenBSD: exec_ecoff.h,v 1.2 1996/03/03 12:11:42 niklas Exp $ */ /* $NetBSD: exec_ecoff.h,v 1.7 1995/06/16 02:07:56 mellon Exp $ */ /* diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h index a50dc0e56e4..06738b6c5bd 100644 --- a/sys/sys/exec_elf.h +++ b/sys/sys/exec_elf.h @@ -1,3 +1,4 @@ +/* $OpenBSD: exec_elf.h,v 1.3 1996/03/03 12:11:42 niklas Exp $ */ /* $NetBSD: exec_elf.h,v 1.2 1996/01/16 23:19:43 fvdl Exp $ */ /* diff --git a/sys/sys/exec_script.h b/sys/sys/exec_script.h index abefb0a80e5..22d3c0eb854 100644 --- a/sys/sys/exec_script.h +++ b/sys/sys/exec_script.h @@ -1,3 +1,4 @@ +/* $OpenBSD: exec_script.h,v 1.3 1996/03/03 12:11:43 niklas Exp $ */ /* $NetBSD: exec_script.h,v 1.6 1995/03/26 20:24:11 jtc Exp $ */ /* diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index ec791957936..b960be866e5 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -1,3 +1,4 @@ +/* $OpenBSD: fcntl.h,v 1.2 1996/03/03 12:11:44 niklas Exp $ */ /* $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $ */ /*- diff --git a/sys/sys/file.h b/sys/sys/file.h index 4dbe907f3f6..fd9afbd0672 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -1,3 +1,4 @@ +/* $OpenBSD: file.h,v 1.2 1996/03/03 12:11:46 niklas Exp $ */ /* $NetBSD: file.h,v 1.11 1995/03/26 20:24:13 jtc Exp $ */ /* diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 445d78d8e78..787743fe21f 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -1,4 +1,5 @@ -/* $NetBSD: filedesc.h,v 1.11 1995/03/26 20:24:14 jtc Exp $ */ +/* $OpenBSD: filedesc.h,v 1.3 1996/03/03 12:11:46 niklas Exp $ */ +/* $NetBSD: filedesc.h,v 1.12 1996/02/09 18:25:11 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -95,11 +96,18 @@ struct filedesc0 { */ int dupfdopen __P((struct filedesc *fdp, int indx, int dfd, int mode, int error)); +int fdopen __P((dev_t, int, int, struct proc *)); int fdalloc __P((struct proc *p, int want, int *result)); int fdavail __P((struct proc *p, int n)); int falloc __P((struct proc *p, struct file **resultfp, int *resultfd)); +void ffree __P((struct file *)); struct filedesc *fdinit __P((struct proc *p)); struct filedesc *fdshare __P((struct proc *p)); struct filedesc *fdcopy __P((struct proc *p)); void fdfree __P((struct proc *p)); +int fdrelease __P((struct proc *p, int)); +void fdcloseexec __P((struct proc *)); + +int closef __P((struct file *, struct proc *)); +int getsock __P((struct filedesc *, int, struct file **)); #endif diff --git a/sys/sys/filio.h b/sys/sys/filio.h index a8c3103af23..79619b60478 100644 --- a/sys/sys/filio.h +++ b/sys/sys/filio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: filio.h,v 1.2 1996/03/03 12:11:47 niklas Exp $ */ /* $NetBSD: filio.h,v 1.5 1994/06/29 06:44:14 cgd Exp $ */ /*- diff --git a/sys/sys/gmon.h b/sys/sys/gmon.h index 7e786443cd6..e6a3df458ad 100644 --- a/sys/sys/gmon.h +++ b/sys/sys/gmon.h @@ -1,3 +1,4 @@ +/* $OpenBSD: gmon.h,v 1.2 1996/03/03 12:11:48 niklas Exp $ */ /* $NetBSD: gmon.h,v 1.4 1994/06/29 06:44:17 cgd Exp $ */ /*- diff --git a/sys/sys/ioccom.h b/sys/sys/ioccom.h index 70acf1a9375..629f79c61a5 100644 --- a/sys/sys/ioccom.h +++ b/sys/sys/ioccom.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ioccom.h,v 1.2 1996/03/03 12:11:49 niklas Exp $ */ /* $NetBSD: ioccom.h,v 1.4 1994/10/30 21:49:56 cgd Exp $ */ /*- diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index 08633c51e2d..42a64938318 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ioctl.h,v 1.3 1996/03/03 12:11:50 niklas Exp $ */ /* $NetBSD: ioctl.h,v 1.20 1996/01/30 18:21:47 thorpej Exp $ */ /*- diff --git a/sys/sys/ioctl_compat.h b/sys/sys/ioctl_compat.h index b34fab2e72a..4b221a8537b 100644 --- a/sys/sys/ioctl_compat.h +++ b/sys/sys/ioctl_compat.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ioctl_compat.h,v 1.2 1996/03/03 12:11:51 niklas Exp $ */ /* $NetBSD: ioctl_compat.h,v 1.10 1995/03/31 03:10:15 christos Exp $ */ /* diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h index b90ffa7b72e..283768ec277 100644 --- a/sys/sys/ipc.h +++ b/sys/sys/ipc.h @@ -1,4 +1,5 @@ -/* $NetBSD: ipc.h,v 1.14 1995/03/26 20:24:17 jtc Exp $ */ +/* $OpenBSD: ipc.h,v 1.2 1996/03/03 12:11:52 niklas Exp $ */ +/* $NetBSD: ipc.h,v 1.15 1996/02/09 18:25:12 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -82,6 +83,8 @@ struct ipc_perm { #define IPCID_TO_IX(id) ((id) & 0xffff) #define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff) #define IXSEQ_TO_IPCID(ix,perm) (((perm.seq) << 16) | (ix & 0xffff)) + +int ipcperm __P((struct ucred *, struct ipc_perm *, int)); #endif /* _KERNEL */ #ifndef _KERNEL diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 1e32edc1ef5..98c927ec64a 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -1,3 +1,4 @@ +/* $OpenBSD: kernel.h,v 1.3 1996/03/03 12:11:53 niklas Exp $ */ /* $NetBSD: kernel.h,v 1.11 1995/03/03 01:24:16 cgd Exp $ */ /*- diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h index 090e4851558..83e1f7dd30c 100644 --- a/sys/sys/ktrace.h +++ b/sys/sys/ktrace.h @@ -1,4 +1,5 @@ -/* $NetBSD: ktrace.h,v 1.11 1995/07/19 15:27:05 christos Exp $ */ +/* $OpenBSD: ktrace.h,v 1.2 1996/03/03 12:11:54 niklas Exp $ */ +/* $NetBSD: ktrace.h,v 1.12 1996/02/04 02:12:29 christos Exp $ */ /* * Copyright (c) 1988, 1993 @@ -162,4 +163,14 @@ __BEGIN_DECLS int ktrace __P((const char *, int, int, pid_t)); __END_DECLS +#else + +void ktrcsw __P((struct vnode *, int, int)); +void ktremul __P((struct vnode *, char *)); +void ktrgenio __P((struct vnode *, int, enum uio_rw, struct iovec *, int, int)); +void ktrnamei __P((struct vnode *, char *)); +void ktrpsig __P((struct vnode *, int, sig_t, int, int)); +void ktrsyscall __P((struct vnode *, register_t, size_t, register_t [])); +void ktrsysret __P((struct vnode *, register_t, int, register_t)); + #endif /* !_KERNEL */ diff --git a/sys/sys/lkm.h b/sys/sys/lkm.h index 0ee813614d4..b8b7a050ae1 100644 --- a/sys/sys/lkm.h +++ b/sys/sys/lkm.h @@ -1,4 +1,5 @@ -/* $NetBSD: lkm.h,v 1.11 1995/03/26 20:24:19 jtc Exp $ */ +/* $OpenBSD: lkm.h,v 1.2 1996/03/03 12:11:55 niklas Exp $ */ +/* $NetBSD: lkm.h,v 1.12 1996/02/09 18:25:13 christos Exp $ */ /* * Header file used by loadable kernel modules and loadable kernel module @@ -186,7 +187,7 @@ struct lkm_table { int depcnt; /* dependency count (INIT) */ int id; /* identifier (INIT) */ - int (*entry)(); /* entry function */ + int (*entry) __P((struct lkm_table *, int, int));/* entry function */ union lkm_generic private; /* module private data */ }; diff --git a/sys/sys/localedef.h b/sys/sys/localedef.h index 0355bc5ef6e..34cc0aefd06 100644 --- a/sys/sys/localedef.h +++ b/sys/sys/localedef.h @@ -1,3 +1,4 @@ +/* $OpenBSD: localedef.h,v 1.2 1996/03/03 12:11:56 niklas Exp $ */ /* $NetBSD: localedef.h,v 1.3 1994/11/30 22:15:58 jtc Exp $ */ /* diff --git a/sys/sys/lockf.h b/sys/sys/lockf.h index b9d8db2cf1e..2b19b8aaeb3 100644 --- a/sys/sys/lockf.h +++ b/sys/sys/lockf.h @@ -1,3 +1,4 @@ +/* $OpenBSD: lockf.h,v 1.2 1996/03/03 12:11:57 niklas Exp $ */ /* $NetBSD: lockf.h,v 1.5 1994/06/29 06:44:33 cgd Exp $ */ /* diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index fd18c59322a..65ef52c0752 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -1,3 +1,4 @@ +/* $OpenBSD: malloc.h,v 1.3 1996/03/03 12:11:58 niklas Exp $ */ /* $NetBSD: malloc.h,v 1.21 1995/11/21 01:00:25 cgd Exp $ */ /* diff --git a/sys/sys/map.h b/sys/sys/map.h index 28908d433d8..57989b8a8bd 100644 --- a/sys/sys/map.h +++ b/sys/sys/map.h @@ -1,3 +1,4 @@ +/* $OpenBSD: map.h,v 1.2 1996/03/03 12:11:59 niklas Exp $ */ /* $NetBSD: map.h,v 1.10 1995/09/15 05:32:45 jtc Exp $ */ /*- diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 61109d31dba..c18ff3236e8 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1,4 +1,5 @@ -/* $NetBSD: mbuf.h,v 1.17 1995/08/16 01:04:06 mycroft Exp $ */ +/* $OpenBSD: mbuf.h,v 1.2 1996/03/03 12:12:00 niklas Exp $ */ +/* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1988, 1993 @@ -84,7 +85,8 @@ struct pkthdr { /* description of external storage mapped into mbuf, valid if M_EXT set */ struct m_ext { caddr_t ext_buf; /* start of buffer */ - void (*ext_free)(); /* free routine if not the usual */ + void (*ext_free) /* free routine if not the usual */ + __P((caddr_t, u_int)); u_int ext_size; /* size of buffer, for ext_free */ }; @@ -359,6 +361,7 @@ int max_hdr; /* largest link+protocol header */ int max_datalen; /* MHLEN - max_hdr */ extern int mbtypes[]; /* XXX */ +void mbinit __P((void)); struct mbuf *m_copym __P((struct mbuf *, int, int, int)); struct mbuf *m_free __P((struct mbuf *)); struct mbuf *m_get __P((int, int)); @@ -373,6 +376,11 @@ void m_adj __P((struct mbuf *, int)); int m_clalloc __P((int, int)); void m_copyback __P((struct mbuf *, int, int, caddr_t)); void m_freem __P((struct mbuf *)); +void m_reclaim __P((void)); +void m_copydata __P((struct mbuf *, int, int, caddr_t)); +void m_cat __P((struct mbuf *, struct mbuf *)); +struct mbuf *m_devget __P((char *, int, int, struct ifnet *, + void (*) __P((const void *, void *, size_t)))); #ifdef MBTYPES int mbtypes[] = { /* XXX */ diff --git a/sys/sys/mman.h b/sys/sys/mman.h index f3919910daf..0706f088e23 100644 --- a/sys/sys/mman.h +++ b/sys/sys/mman.h @@ -1,3 +1,4 @@ +/* $OpenBSD: mman.h,v 1.2 1996/03/03 12:12:01 niklas Exp $ */ /* $NetBSD: mman.h,v 1.11 1995/03/26 20:24:23 jtc Exp $ */ /*- diff --git a/sys/sys/msg.h b/sys/sys/msg.h index 04ad8531ff2..3de8519aa05 100644 --- a/sys/sys/msg.h +++ b/sys/sys/msg.h @@ -1,4 +1,5 @@ -/* $NetBSD: msg.h,v 1.8 1995/07/11 18:16:20 jtc Exp $ */ +/* $OpenBSD: msg.h,v 1.2 1996/03/03 12:12:02 niklas Exp $ */ +/* $NetBSD: msg.h,v 1.9 1996/02/09 18:25:18 christos Exp $ */ /* * SVID compatible msg.h file @@ -155,6 +156,8 @@ int msgget __P((key_t, int)); int msgsnd __P((int, void *, size_t, int)); int msgrcv __P((int, void *, size_t, long, int)); __END_DECLS +#else +void msginit __P((void)); #endif /* !_KERNEL */ #endif /* !_SYS_MSG_H_ */ diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h index 8a7ce6a9fd1..728a768b605 100644 --- a/sys/sys/msgbuf.h +++ b/sys/sys/msgbuf.h @@ -1,3 +1,4 @@ +/* $OpenBSD: msgbuf.h,v 1.2 1996/03/03 12:12:03 niklas Exp $ */ /* $NetBSD: msgbuf.h,v 1.8 1995/03/26 20:24:27 jtc Exp $ */ /* diff --git a/sys/sys/mtio.h b/sys/sys/mtio.h index be90c119a9a..646511cb81d 100644 --- a/sys/sys/mtio.h +++ b/sys/sys/mtio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: mtio.h,v 1.2 1996/03/03 12:12:04 niklas Exp $ */ /* $NetBSD: mtio.h,v 1.12 1995/03/29 22:10:07 briggs Exp $ */ /* diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 10b6354a72a..ac6b1d1232d 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -1,4 +1,5 @@ -/* $NetBSD: namei.h,v 1.10 1995/04/15 08:12:35 cgd Exp $ */ +/* $OpenBSD: namei.h,v 1.2 1996/03/03 12:12:05 niklas Exp $ */ +/* $NetBSD: namei.h,v 1.11 1996/02/09 18:25:20 christos Exp $ */ /* * Copyright (c) 1985, 1989, 1991, 1993 @@ -175,7 +176,14 @@ u_long nextvnodeid; int namei __P((struct nameidata *ndp)); int lookup __P((struct nameidata *ndp)); int relookup __P((struct vnode *dvp, struct vnode **vpp, - struct componentname *cnp)); + struct componentname *cnp)); +void cache_purge __P((struct vnode *)); +int cache_lookup __P((struct vnode *, struct vnode **, struct componentname *)); +void cache_enter __P((struct vnode *, struct vnode *, struct componentname *)); +void nchinit __P((void)); +struct mount; +void cache_purgevfs __P((struct mount *)); + #endif /* diff --git a/sys/sys/param.h b/sys/sys/param.h index 0a1eb5c454c..6525205fbd1 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,3 +1,4 @@ +/* $OpenBSD: param.h,v 1.4 1996/03/03 12:12:06 niklas Exp $ */ /* $NetBSD: param.h,v 1.18.2.1 1995/10/12 05:42:01 jtc Exp $ */ /*- diff --git a/sys/sys/proc.h b/sys/sys/proc.h index de92fb5c666..ce99c55d358 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,5 @@ -/* $NetBSD: proc.h,v 1.41 1995/08/13 09:04:43 mycroft Exp $ */ +/* $OpenBSD: proc.h,v 1.2 1996/03/03 12:12:07 niklas Exp $ */ +/* $NetBSD: proc.h,v 1.42 1996/02/09 18:25:23 christos Exp $ */ /*- * Copyright (c) 1986, 1989, 1991, 1993 @@ -311,5 +312,10 @@ void swapin __P((struct proc *)); int tsleep __P((void *chan, int pri, char *wmesg, int timo)); void unsleep __P((struct proc *)); void wakeup __P((void *chan)); +void exit1 __P((struct proc *, int)); +int fork1 __P((struct proc *, int, int, register_t *)); +void kmeminit __P((void)); +void rqinit __P((void)); +int groupmember __P((gid_t, struct ucred *)); #endif /* _KERNEL */ #endif /* !_SYS_PROC_H_ */ diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 2487c402490..b2307188841 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -1,4 +1,5 @@ -/* $NetBSD: protosw.h,v 1.7 1995/03/26 20:24:33 jtc Exp $ */ +/* $OpenBSD: protosw.h,v 1.2 1996/03/03 12:12:08 niklas Exp $ */ +/* $NetBSD: protosw.h,v 1.9 1996/02/13 21:08:55 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -57,24 +58,45 @@ * The userreq routine interfaces protocols to the system and is * described below. */ + +struct mbuf; +struct sockaddr; +struct socket; +struct domain; + struct protosw { short pr_type; /* socket type used for */ struct domain *pr_domain; /* domain protocol a member of */ short pr_protocol; /* protocol number */ short pr_flags; /* see below */ + /* protocol-protocol hooks */ - void (*pr_input)(); /* input to protocol (from below) */ - int (*pr_output)(); /* output to protocol (from above) */ - void (*pr_ctlinput)(); /* control input (from below) */ - int (*pr_ctloutput)(); /* control output (from above) */ + void (*pr_input) /* input to protocol (from below) */ + __P((struct mbuf *, ...)); + int (*pr_output) /* output to protocol (from above) */ + __P((struct mbuf *, ...)); + void *(*pr_ctlinput) /* control input (from below) */ + __P((int, struct sockaddr *, void *)); + int (*pr_ctloutput) /* control output (from above) */ + __P((int, struct socket *, int, int, struct mbuf **)); + /* user-protocol hook */ - int (*pr_usrreq)(); /* user request: see list below */ + int (*pr_usrreq) /* user request: see list below */ + __P((struct socket *, int, struct mbuf *, + struct mbuf *, struct mbuf *)); + /* utility hooks */ - void (*pr_init)(); /* initialization hook */ - void (*pr_fasttimo)(); /* fast timeout (200ms) */ - void (*pr_slowtimo)(); /* slow timeout (500ms) */ - void (*pr_drain)(); /* flush any excess space possible */ - int (*pr_sysctl)(); /* sysctl for protocol */ + void (*pr_init) /* initialization hook */ + __P((void)); + + void (*pr_fasttimo) /* fast timeout (200ms) */ + __P((void)); + void (*pr_slowtimo) /* slow timeout (500ms) */ + __P((void)); + void (*pr_drain) /* flush any excess space possible */ + __P((void)); + int (*pr_sysctl) /* sysctl for protocol */ + __P((int *, u_int, void *, size_t *, void *, size_t)); }; #define PR_SLOWHZ 2 /* 2 slow timeouts per second */ @@ -208,5 +230,8 @@ char *prcorequests[] = { #endif #ifdef _KERNEL -extern struct protosw *pffindproto(), *pffindtype(); +struct sockaddr; +struct protosw *pffindproto __P((int, int, int)); +struct protosw *pffindtype __P((int, int)); +void pfctlinput __P((int, struct sockaddr *)); #endif diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h index ef66901576b..16c112e5a02 100644 --- a/sys/sys/ptrace.h +++ b/sys/sys/ptrace.h @@ -1,4 +1,5 @@ -/* $NetBSD: ptrace.h,v 1.20 1995/03/26 20:24:35 jtc Exp $ */ +/* $OpenBSD: ptrace.h,v 1.2 1996/03/03 12:12:09 niklas Exp $ */ +/* $NetBSD: ptrace.h,v 1.21 1996/02/09 18:25:26 christos Exp $ */ /*- * Copyright (c) 1984, 1993 @@ -80,6 +81,8 @@ int process_write_regs __P((struct proc *p, struct reg *regs)); #define FIX_SSTEP(p) #endif +int trace_req __P((struct proc *)); + #else /* !_KERNEL */ #include diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 8dae6629726..5b5832b6836 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -1,3 +1,4 @@ +/* $OpenBSD: queue.h,v 1.2 1996/03/03 12:12:10 niklas Exp $ */ /* $NetBSD: queue.h,v 1.9 1994/12/13 15:04:28 mycroft Exp $ */ /* diff --git a/sys/sys/reboot.h b/sys/sys/reboot.h index 1ecae07ab20..aae3e4cb0f3 100644 --- a/sys/sys/reboot.h +++ b/sys/sys/reboot.h @@ -1,3 +1,4 @@ +/* $OpenBSD: reboot.h,v 1.2 1996/03/03 12:12:11 niklas Exp $ */ /* $NetBSD: reboot.h,v 1.7 1994/12/13 15:01:22 mycroft Exp $ */ /* diff --git a/sys/sys/resource.h b/sys/sys/resource.h index cbdf75961a2..98e8337e721 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -1,4 +1,5 @@ -/* $NetBSD: resource.h,v 1.13 1995/03/26 20:24:36 jtc Exp $ */ +/* $OpenBSD: resource.h,v 1.2 1996/03/03 12:12:12 niklas Exp $ */ +/* $NetBSD: resource.h,v 1.14 1996/02/09 18:25:27 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -111,6 +112,8 @@ struct loadavg { #ifdef _KERNEL extern struct loadavg averunnable; +int dosetrlimit __P((struct proc *, u_int, struct rlimit *)); +int donice __P((struct proc *, struct proc *, int)); #else #include diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 53097b08c57..c904244cdcb 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -1,3 +1,4 @@ +/* $OpenBSD: resourcevar.h,v 1.3 1996/03/03 12:12:13 niklas Exp $ */ /* $NetBSD: resourcevar.h,v 1.12 1995/11/22 23:01:53 cgd Exp $ */ /* diff --git a/sys/sys/scanio.h b/sys/sys/scanio.h index 2d08f6f88e6..1c57c7ac5a3 100644 --- a/sys/sys/scanio.h +++ b/sys/sys/scanio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: scanio.h,v 1.2 1996/03/03 12:12:13 niklas Exp $ */ /* $NetBSD: scanio.h,v 1.1 1996/02/18 20:33:18 mycroft Exp $ */ /* diff --git a/sys/sys/scsiio.h b/sys/sys/scsiio.h index d94d140494a..3b8942f511e 100644 --- a/sys/sys/scsiio.h +++ b/sys/sys/scsiio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: scsiio.h,v 1.2 1996/03/03 12:12:15 niklas Exp $ */ /* $NetBSD: scsiio.h,v 1.3 1994/06/29 06:45:09 cgd Exp $ */ #ifndef _SYS_SCSIIO_H_ diff --git a/sys/sys/select.h b/sys/sys/select.h index 0ac706a7c4b..a52dc0a6dcf 100644 --- a/sys/sys/select.h +++ b/sys/sys/select.h @@ -1,3 +1,4 @@ +/* $OpenBSD: select.h,v 1.2 1996/03/03 12:12:16 niklas Exp $ */ /* $NetBSD: select.h,v 1.10 1995/03/26 20:24:38 jtc Exp $ */ /*- diff --git a/sys/sys/sem.h b/sys/sys/sem.h index 3e74af57926..e92566a6583 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -1,4 +1,5 @@ -/* $NetBSD: sem.h,v 1.7 1995/03/26 20:24:40 jtc Exp $ */ +/* $OpenBSD: sem.h,v 1.2 1996/03/03 12:12:17 niklas Exp $ */ +/* $NetBSD: sem.h,v 1.8 1996/02/09 18:25:29 christos Exp $ */ /* * SVID compatible sem.h file @@ -172,6 +173,9 @@ int semget __P((key_t, int, int)); int semop __P((int, struct sembuf *, u_int)); int semconfig __P((int)); __END_DECLS +#else +void seminit __P((void)); +void semexit __P((struct proc *)); #endif /* !_KERNEL */ #endif /* !_SEM_H_ */ diff --git a/sys/sys/shm.h b/sys/sys/shm.h index cf604d45179..2405beeddcd 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -1,4 +1,5 @@ -/* $NetBSD: shm.h,v 1.18 1995/03/26 20:24:41 jtc Exp $ */ +/* $OpenBSD: shm.h,v 1.2 1996/03/03 12:12:18 niklas Exp $ */ +/* $NetBSD: shm.h,v 1.19 1996/02/09 18:25:30 christos Exp $ */ /* * Copyright (c) 1994 Adam Glass @@ -76,6 +77,10 @@ struct shminfo { struct shminfo shminfo; struct shmid_ds *shmsegs; +void shminit __P((void)); +void shmfork __P((struct proc *, struct proc *)); +void shmexit __P((struct proc *)); + #else /* !_KERNEL */ #include diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 036c67d4a98..7ed8de3d2e1 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -1,4 +1,5 @@ -/* $NetBSD: signal.h,v 1.20 1996/01/04 22:23:23 jtc Exp $ */ +/* $OpenBSD: signal.h,v 1.3 1996/03/03 12:12:18 niklas Exp $ */ +/* $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -96,7 +97,7 @@ #define SIGUSR1 30 /* user defined signal 1 */ #define SIGUSR2 31 /* user defined signal 2 */ -#if defined(_ANSI_SOURCE) || defined(__cplusplus) +#if defined(_ANSI_SOURCE) || defined(__cplusplus) || defined(_KERNEL) /* * Language spec sez we must list exactly one parameter, even though we * actually supply three. Ugh! @@ -117,7 +118,12 @@ typedef unsigned int sigset_t; * Signal vector "template" used in sigaction call. */ struct sigaction { - void (*sa_handler)(); /* signal handler */ + void (*sa_handler) /* signal handler */ +#ifdef _KERNEL + __P((int)); +#else + __P(()); +#endif sigset_t sa_mask; /* signal mask to apply */ int sa_flags; /* see signal options below */ }; @@ -163,7 +169,12 @@ struct sigaltstack { * Signal vector "template" used in sigvec call. */ struct sigvec { - void (*sv_handler)(); /* signal handler */ + void (*sv_handler) /* signal handler */ +#ifdef _KERNEL + __P((int)); +#else + __P(()); +#endif int sv_mask; /* signal mask to apply */ int sv_flags; /* see signal options below */ }; diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index 083fcb71ec4..9ef04702475 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -1,4 +1,5 @@ -/* $NetBSD: signalvar.h,v 1.14 1995/08/13 22:48:47 mycroft Exp $ */ +/* $OpenBSD: signalvar.h,v 1.2 1996/03/03 12:12:19 niklas Exp $ */ +/* $NetBSD: signalvar.h,v 1.16 1996/02/09 18:25:34 christos Exp $ */ /* * Copyright (c) 1991, 1993 @@ -66,8 +67,8 @@ struct sigacts { #define SAS_ALTSTACK 0x02 /* have alternate signal stack */ /* additional signal action values, used only temporarily/internally */ -#define SIG_CATCH (void (*)())2 -#define SIG_HOLD (void (*)())3 +#define SIG_CATCH (void (*) __P((int)))2 +#define SIG_HOLD (void (*) __P((int)))3 /* * get signal action for process and signal; currently only for current process @@ -81,8 +82,8 @@ struct sigacts { */ #define CURSIG(p) \ (((p)->p_siglist == 0 || \ - ((p)->p_flag & P_TRACED) == 0 && \ - ((p)->p_siglist & ~(p)->p_sigmask) == 0) ? \ + (((p)->p_flag & P_TRACED) == 0 && \ + ((p)->p_siglist & ~(p)->p_sigmask) == 0)) ? \ 0 : issignal(p)) /* @@ -160,6 +161,9 @@ void postsig __P((int sig)); void psignal __P((struct proc *p, int sig)); void siginit __P((struct proc *p)); void trapsignal __P((struct proc *p, int sig, u_long code)); +void sigexit __P((struct proc *, int)); +void setsigvec __P((struct proc *, int, struct sigaction *)); +int killpg1 __P((struct proc *, int, int, int)); /* * Machine-dependent functions: diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index d83cb7168b3..41dfd6a1083 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -1,3 +1,4 @@ +/* $OpenBSD: socketvar.h,v 1.3 1996/03/03 12:12:20 niklas Exp $ */ /* $NetBSD: socketvar.h,v 1.18 1996/02/09 18:25:38 christos Exp $ */ /*- diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index 0b80c7496b2..2c3b20411e3 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: sockio.h,v 1.2 1996/03/03 12:12:21 niklas Exp $ */ /* $NetBSD: sockio.h,v 1.5 1995/08/23 00:40:47 thorpej Exp $ */ /*- diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index bb1360b8e50..6c3cbd55d6b 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1,4 +1,5 @@ -/* $NetBSD: sysctl.h,v 1.9 1995/08/04 18:36:08 thorpej Exp $ */ +/* $OpenBSD: sysctl.h,v 1.2 1996/03/03 12:12:22 niklas Exp $ */ +/* $NetBSD: sysctl.h,v 1.11 1996/02/09 18:25:39 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -331,8 +332,38 @@ int sysctl_rdint __P((void *, size_t *, void *, int)); int sysctl_string __P((void *, size_t *, void *, size_t, char *, int)); int sysctl_rdstring __P((void *, size_t *, void *, char *)); int sysctl_rdstruct __P((void *, size_t *, void *, void *, int)); +int sysctl_struct __P((void *, size_t *, void *, size_t, void *, int)); +int sysctl_file __P((char *, size_t *)); +int sysctl_doproc __P((int *, u_int, char *, size_t *)); +struct radix_node; +struct walkarg; +int sysctl_dumpentry __P((struct radix_node *, void *)); +int sysctl_iflist __P((int, struct walkarg *)); +int sysctl_rtable __P((int *, u_int, void *, size_t *, void *, size_t)); +int sysctl_clockrate __P((char *, size_t *)); +int sysctl_rdstring __P((void *, size_t *, void *, char *)); +int sysctl_rdstruct __P((void *, size_t *, void *, void *, int)); +int sysctl_vnode __P((char *, size_t *)); + void fill_eproc __P((struct proc *, struct eproc *)); +int kern_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, + struct proc *)); +int hw_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, + struct proc *)); +#ifdef DEBUG +int debug_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, + struct proc *)); +#endif +int vm_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, + struct proc *)); +int fs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, + struct proc *)); +int net_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, + struct proc *)); +int cpu_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, + struct proc *)); + #else /* !_KERNEL */ #include diff --git a/sys/sys/syslimits.h b/sys/sys/syslimits.h index d876d13dedb..114513f9daa 100644 --- a/sys/sys/syslimits.h +++ b/sys/sys/syslimits.h @@ -1,3 +1,4 @@ +/* $OpenBSD: syslimits.h,v 1.2 1996/03/03 12:12:23 niklas Exp $ */ /* $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ */ /* diff --git a/sys/sys/syslog.h b/sys/sys/syslog.h index b882b9cbab0..d2c5e2df39d 100644 --- a/sys/sys/syslog.h +++ b/sys/sys/syslog.h @@ -1,4 +1,5 @@ -/* $NetBSD: syslog.h,v 1.9 1995/03/26 20:24:51 jtc Exp $ */ +/* $OpenBSD: syslog.h,v 1.2 1996/03/03 12:12:24 niklas Exp $ */ +/* $NetBSD: syslog.h,v 1.10 1996/02/09 18:25:40 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1988, 1993 @@ -191,5 +192,6 @@ __END_DECLS void logpri __P((int)); void log __P((int, const char *, ...)); void addlog __P((const char *, ...)); +void logwakeup __P((void)); #endif /* !_KERNEL */ diff --git a/sys/sys/tablet.h b/sys/sys/tablet.h index c151520ff4b..01422017c8f 100644 --- a/sys/sys/tablet.h +++ b/sys/sys/tablet.h @@ -1,4 +1,5 @@ -/* $NetBSD: tablet.h,v 1.8 1995/04/22 12:55:10 cgd Exp $ */ +/* $OpenBSD: tablet.h,v 1.2 1996/03/03 12:12:25 niklas Exp $ */ +/* $NetBSD: tablet.h,v 1.10 1996/02/09 18:25:43 christos Exp $ */ /*- * Copyright (c) 1985, 1986, 1993 @@ -50,7 +51,7 @@ * in-proximity bit is simulated where the tablet does not directly provide * the information. */ -struct tbpos { +struct hitpos { int32_t xpos, ypos; /* raw x-y coordinates */ int16_t status; /* buttons/pen down */ #define TBINPROX 0100000 /* pen in proximity of tablet */ diff --git a/sys/sys/termios.h b/sys/sys/termios.h index 79afe124588..8557fa524b8 100644 --- a/sys/sys/termios.h +++ b/sys/sys/termios.h @@ -1,3 +1,4 @@ +/* $OpenBSD: termios.h,v 1.2 1996/03/03 12:12:26 niklas Exp $ */ /* $NetBSD: termios.h,v 1.13 1995/04/22 13:03:10 cgd Exp $ */ /* diff --git a/sys/sys/timeb.h b/sys/sys/timeb.h index 52fe10dea0d..c2ffec8a496 100644 --- a/sys/sys/timeb.h +++ b/sys/sys/timeb.h @@ -1,3 +1,4 @@ +/* $OpenBSD: timeb.h,v 1.2 1996/03/03 12:12:27 niklas Exp $ */ /* $NetBSD: timeb.h,v 1.10 1995/06/05 19:39:35 pk Exp $ */ /*- diff --git a/sys/sys/times.h b/sys/sys/times.h index 8542f448d0d..0476ec66ff5 100644 --- a/sys/sys/times.h +++ b/sys/sys/times.h @@ -1,3 +1,4 @@ +/* $OpenBSD: times.h,v 1.2 1996/03/03 12:12:28 niklas Exp $ */ /* $NetBSD: times.h,v 1.8 1995/03/26 20:24:54 jtc Exp $ */ /*- diff --git a/sys/sys/timex.h b/sys/sys/timex.h index b352b9ea973..a673063d981 100644 --- a/sys/sys/timex.h +++ b/sys/sys/timex.h @@ -1,3 +1,5 @@ +/* $OpenBSD: timex.h,v 1.2 1996/03/03 12:12:29 niklas Exp $ */ + /****************************************************************************** * * * Copyright (c) David L. Mills 1993, 1994 * diff --git a/sys/sys/tprintf.h b/sys/sys/tprintf.h index a94be2e93ed..ace3958b43a 100644 --- a/sys/sys/tprintf.h +++ b/sys/sys/tprintf.h @@ -1,3 +1,4 @@ +/* $OpenBSD: tprintf.h,v 1.2 1996/03/03 12:12:30 niklas Exp $ */ /* $NetBSD: tprintf.h,v 1.6 1994/06/29 06:45:49 cgd Exp $ */ /*- diff --git a/sys/sys/trace.h b/sys/sys/trace.h index 1e44f3a1e8d..fa5b3011cfe 100644 --- a/sys/sys/trace.h +++ b/sys/sys/trace.h @@ -1,3 +1,4 @@ +/* $OpenBSD: trace.h,v 1.2 1996/03/03 12:12:31 niklas Exp $ */ /* $NetBSD: trace.h,v 1.7 1995/03/26 20:24:56 jtc Exp $ */ /*- diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 55b45f198b1..5cb084ef737 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -1,4 +1,5 @@ -/* $NetBSD: tty.h,v 1.28 1995/03/26 20:24:57 jtc Exp $ */ +/* $OpenBSD: tty.h,v 1.2 1996/03/03 12:12:32 niklas Exp $ */ +/* $NetBSD: tty.h,v 1.29 1996/02/09 18:25:44 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -241,4 +242,20 @@ int ttywflush __P((struct tty *tp)); struct tty *ttymalloc __P((void)); void ttyfree __P((struct tty *)); u_char *firstc __P((struct clist *clp, int *c)); + +int cttyopen __P((dev_t, int, int, struct proc *)); +int cttyread __P((dev_t, struct uio *, int)); +int cttywrite __P((dev_t, struct uio *, int)); +int cttyioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); +int cttyselect __P((dev_t, int, struct proc *)); + +int clalloc __P((struct clist *, int, int)); +void clfree __P((struct clist *)); + +#if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_SVR4) || \ + defined(COMPAT_FREEBSD) +# define COMPAT_OLDTTY +int ttcompat __P((struct tty *, u_long, caddr_t, int, struct proc *)); +#endif + #endif diff --git a/sys/sys/ttychars.h b/sys/sys/ttychars.h index c5ad2921222..d3b93aa4c28 100644 --- a/sys/sys/ttychars.h +++ b/sys/sys/ttychars.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ttychars.h,v 1.2 1996/03/03 12:12:33 niklas Exp $ */ /* $NetBSD: ttychars.h,v 1.6 1994/06/29 06:45:54 cgd Exp $ */ /*- diff --git a/sys/sys/ttycom.h b/sys/sys/ttycom.h index b617c1d1ed9..04d606cd1bc 100644 --- a/sys/sys/ttycom.h +++ b/sys/sys/ttycom.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ttycom.h,v 1.2 1996/03/03 12:12:34 niklas Exp $ */ /* $NetBSD: ttycom.h,v 1.3 1994/06/29 06:45:55 cgd Exp $ */ /*- diff --git a/sys/sys/ttydefaults.h b/sys/sys/ttydefaults.h index 80e3806d522..74c39cd798b 100644 --- a/sys/sys/ttydefaults.h +++ b/sys/sys/ttydefaults.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ttydefaults.h,v 1.3 1996/03/03 12:12:35 niklas Exp $ */ /* $NetBSD: ttydefaults.h,v 1.7 1994/06/29 06:45:57 cgd Exp $ */ /*- diff --git a/sys/sys/ttydev.h b/sys/sys/ttydev.h index 225528812f2..388988c270f 100644 --- a/sys/sys/ttydev.h +++ b/sys/sys/ttydev.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ttydev.h,v 1.2 1996/03/03 12:12:36 niklas Exp $ */ /* $NetBSD: ttydev.h,v 1.7 1994/06/29 06:45:58 cgd Exp $ */ /*- diff --git a/sys/sys/types.h b/sys/sys/types.h index 27762001c62..e6c43bac71d 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -1,3 +1,4 @@ +/* $OpenBSD: types.h,v 1.3 1996/03/03 12:12:36 niklas Exp $ */ /* $NetBSD: types.h,v 1.24 1995/12/29 01:15:13 jtc Exp $ */ /*- diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index c45e87542f3..86ec5811e8c 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -1,3 +1,4 @@ +/* $OpenBSD: ucred.h,v 1.2 1996/03/03 12:12:37 niklas Exp $ */ /* $NetBSD: ucred.h,v 1.12 1995/06/01 22:44:50 jtc Exp $ */ /* diff --git a/sys/sys/uio.h b/sys/sys/uio.h index 992f52e3f31..49e71525019 100644 --- a/sys/sys/uio.h +++ b/sys/sys/uio.h @@ -1,4 +1,5 @@ -/* $NetBSD: uio.h,v 1.11 1995/06/14 05:24:46 jtc Exp $ */ +/* $OpenBSD: uio.h,v 1.2 1996/03/03 12:12:38 niklas Exp $ */ +/* $NetBSD: uio.h,v 1.12 1996/02/09 18:25:45 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993, 1994 @@ -80,5 +81,8 @@ __BEGIN_DECLS ssize_t readv __P((int, const struct iovec *, int)); ssize_t writev __P((int, const struct iovec *, int)); __END_DECLS +#else +int ureadc __P((int c, struct uio *)); #endif /* !_KERNEL */ + #endif /* !_SYS_UIO_H_ */ diff --git a/sys/sys/un.h b/sys/sys/un.h index 9ac6164851e..0366a71d262 100644 --- a/sys/sys/un.h +++ b/sys/sys/un.h @@ -1,4 +1,5 @@ -/* $NetBSD: un.h,v 1.10 1995/03/26 20:25:02 jtc Exp $ */ +/* $OpenBSD: un.h,v 1.2 1996/03/03 12:12:39 niklas Exp $ */ +/* $NetBSD: un.h,v 1.11 1996/02/04 02:12:47 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -46,14 +47,13 @@ struct sockaddr_un { #ifdef _KERNEL struct unpcb; +struct socket; -int uipc_usrreq __P((struct socket *so, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *control)); int unp_attach __P((struct socket *so)); int unp_bind __P((struct unpcb *unp, struct mbuf *nam, struct proc *p)); int unp_connect __P((struct socket *so, struct mbuf *nam, struct proc *p)); int unp_connect2 __P((struct socket *so, struct socket *so2)); -int unp_detach __P((struct unpcb *unp)); +void unp_detach __P((struct unpcb *unp)); void unp_discard __P((struct file *fp)); void unp_disconnect __P((struct unpcb *unp)); void unp_drop __P((struct unpcb *unp, int errno)); @@ -61,6 +61,9 @@ void unp_gc __P((void)); void unp_mark __P((struct file *fp)); void unp_scan __P((struct mbuf *m0, void (*op) __P((struct file *)))); void unp_shutdown __P((struct unpcb *unp)); +int unp_externalize __P((struct mbuf *)); +int unp_internalize __P((struct mbuf *, struct proc *)); +void unp_dispose __P((struct mbuf *)); #else /* !_KERNEL */ /* actual length of an initialized sockaddr_un */ diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h index 9930b44ea5a..ec861cea36d 100644 --- a/sys/sys/unistd.h +++ b/sys/sys/unistd.h @@ -1,3 +1,4 @@ +/* $OpenBSD: unistd.h,v 1.2 1996/03/03 12:12:40 niklas Exp $ */ /* $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ */ /* diff --git a/sys/sys/unpcb.h b/sys/sys/unpcb.h index da5d9f6828a..17606345cd0 100644 --- a/sys/sys/unpcb.h +++ b/sys/sys/unpcb.h @@ -1,3 +1,4 @@ +/* $OpenBSD: unpcb.h,v 1.2 1996/03/03 12:12:41 niklas Exp $ */ /* $NetBSD: unpcb.h,v 1.6 1994/06/29 06:46:08 cgd Exp $ */ /* diff --git a/sys/sys/user.h b/sys/sys/user.h index f6a44b670f3..8dd3fd7beb6 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -1,3 +1,4 @@ +/* $OpenBSD: user.h,v 1.2 1996/03/03 12:12:42 niklas Exp $ */ /* $NetBSD: user.h,v 1.9 1995/03/26 20:25:03 jtc Exp $ */ /* diff --git a/sys/sys/utsname.h b/sys/sys/utsname.h index dd91ba4e405..4387567268e 100644 --- a/sys/sys/utsname.h +++ b/sys/sys/utsname.h @@ -1,3 +1,4 @@ +/* $OpenBSD: utsname.h,v 1.2 1996/03/03 12:12:43 niklas Exp $ */ /* $NetBSD: utsname.h,v 1.6 1994/06/29 06:46:11 cgd Exp $ */ /*- diff --git a/sys/sys/vadvise.h b/sys/sys/vadvise.h index 2d112ae5815..cd7ce319771 100644 --- a/sys/sys/vadvise.h +++ b/sys/sys/vadvise.h @@ -1,3 +1,4 @@ +/* $OpenBSD: vadvise.h,v 1.2 1996/03/03 12:12:44 niklas Exp $ */ /* $NetBSD: vadvise.h,v 1.6 1994/06/29 06:46:12 cgd Exp $ */ /*- diff --git a/sys/sys/vcmd.h b/sys/sys/vcmd.h index 0b6c204cdb7..33bbe0e4fcb 100644 --- a/sys/sys/vcmd.h +++ b/sys/sys/vcmd.h @@ -1,3 +1,4 @@ +/* $OpenBSD: vcmd.h,v 1.2 1996/03/03 12:12:45 niklas Exp $ */ /* $NetBSD: vcmd.h,v 1.6 1994/06/29 06:46:14 cgd Exp $ */ /*- diff --git a/sys/sys/vlimit.h b/sys/sys/vlimit.h index 1b13e9e90db..3b9ce3d7888 100644 --- a/sys/sys/vlimit.h +++ b/sys/sys/vlimit.h @@ -1,3 +1,4 @@ +/* $OpenBSD: vlimit.h,v 1.2 1996/03/03 12:12:46 niklas Exp $ */ /* $NetBSD: vlimit.h,v 1.6 1994/06/29 06:46:15 cgd Exp $ */ /*- diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h index d24dc38e209..dd0c82ec831 100644 --- a/sys/sys/vmmeter.h +++ b/sys/sys/vmmeter.h @@ -1,3 +1,4 @@ +/* $OpenBSD: vmmeter.h,v 1.3 1996/03/03 12:12:47 niklas Exp $ */ /* $NetBSD: vmmeter.h,v 1.9 1995/03/26 20:25:04 jtc Exp $ */ /*- diff --git a/sys/sys/vsio.h b/sys/sys/vsio.h index 5242d3a0e76..fb167626c89 100644 --- a/sys/sys/vsio.h +++ b/sys/sys/vsio.h @@ -1,3 +1,4 @@ +/* $OpenBSD: vsio.h,v 1.2 1996/03/03 12:12:48 niklas Exp $ */ /* $NetBSD: vsio.h,v 1.6 1994/06/29 06:46:20 cgd Exp $ */ /*- diff --git a/sys/sys/wait.h b/sys/sys/wait.h index e1b21419073..65e72921d72 100644 --- a/sys/sys/wait.h +++ b/sys/sys/wait.h @@ -1,3 +1,4 @@ +/* $OpenBSD: wait.h,v 1.3 1996/03/03 12:12:49 niklas Exp $ */ /* $NetBSD: wait.h,v 1.10 1995/10/19 08:14:18 jtc Exp $ */ /* -- cgit v1.2.3