Prototypes, prototypes and even more prototypes. Not quite done yet, but

getting closer all the time.
This commit is contained in:
Poul-Henning Kamp
1994-10-02 17:25:04 +00:00
parent c9421aa7c4
commit f86eaaca2c
20 changed files with 152 additions and 41 deletions
+1 -3
View File
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)exec.h 8.3 (Berkeley) 1/21/94
* $Id: exec.h,v 1.6 1994/08/21 04:41:43 paul Exp $
* $Id: exec.h,v 1.7 1994/09/24 21:37:01 davidg Exp $
*/
#ifndef _SYS_EXEC_H_
@@ -80,8 +80,6 @@ struct execsw {
#ifdef KERNEL
extern const struct execsw **execsw;
extern int exec_extract_strings(/* struct image_params * */);
extern int exec_new_vmspace(/* struct image_params * */);
#endif
#include <machine/exec.h>
+4 -1
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)filedesc.h 8.1 (Berkeley) 6/2/93
* $Id: filedesc.h,v 1.2 1994/08/02 07:52:59 davidg Exp $
* $Id: filedesc.h,v 1.3 1994/08/21 04:41:46 paul Exp $
*/
#ifndef _SYS_FILEDESC_H_
@@ -98,8 +98,11 @@ struct filedesc0 {
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 *fdcopy __P((struct proc *p));
void fdfree __P((struct proc *p));
int closef __P((struct file *fp,struct proc *p));
void fdcloseexec __P((struct proc *p));
#endif
#endif
+5 -1
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: imgact.h,v 1.6 1994/08/19 11:45:29 davidg Exp $
* $Id: imgact.h,v 1.7 1994/08/21 04:41:47 paul Exp $
*/
#ifndef _SYS_IMGACT_H_
@@ -56,4 +56,8 @@ struct image_params {
char interpreter_name[64]; /* name of the interpreter */
};
#ifdef KERNEL
int exec_extract_strings __P((struct image_params *));
int exec_new_vmspace __P((struct image_params *));
#endif
#endif
+3 -1
View File
@@ -41,7 +41,7 @@
* SUCH DAMAGE.
*
* @(#)ipc.h 8.3 (Berkeley) 1/21/94
* $Id: ipc.h,v 1.2 1994/08/02 07:53:06 davidg Exp $
* $Id: ipc.h,v 1.3 1994/09/13 14:47:33 dfr Exp $
*/
/*
@@ -83,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 */
#endif /* !_SYS_IPC_H_ */
+10 -2
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ktrace.h 8.1 (Berkeley) 6/2/93
* $Id: ktrace.h,v 1.4 1994/09/27 20:39:46 phk Exp $
* $Id: ktrace.h,v 1.5 1994/09/27 21:26:56 phk Exp $
*/
#ifndef _SYS_KTRACE_H_
@@ -150,7 +150,15 @@ struct ktr_csw {
#define KTRFAC_ACTIVE 0x20000000 /* ktrace logging in progress, ignore */
#ifdef KERNEL
void ktrnamei __P((struct vnode *vp,char *path));
void ktrnamei __P((struct vnode *,char *));
void ktrcsw __P((struct vnode *,int,int));
void ktrwrite __P((struct vnode *, struct ktr_header *));
int ktrcanset __P((struct proc *,struct proc *));
int ktrsetchildren __P((struct proc *,struct proc *,int,int,struct vnode *));
int ktrops __P((struct proc *,struct proc *,int,int,struct vnode *));
void ktrpsig __P((struct vnode *,int, sig_t, int, int));
void ktrgenio __P((struct vnode *,int, enum uio_rw,struct iovec *,int,int));
#else /* KERNEL */
#include <sys/cdefs.h>
+18 -11
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mbuf.h 8.3 (Berkeley) 1/21/94
* $Id: mbuf.h,v 1.4 1994/08/21 04:41:51 paul Exp $
* $Id: mbuf.h,v 1.5 1994/08/21 19:19:39 paul Exp $
*/
#ifndef _SYS_MBUF_H_
@@ -238,7 +238,8 @@ union mcluster {
MBUFLOCK( \
if (mclfree == 0) \
(void)m_clalloc(1, (how)); \
if ((p) = (caddr_t)mclfree) { \
(p) = (caddr_t)mclfree; \
if ((p)) { \
++mclrefcnt[mtocl(p)]; \
mbstat.m_clfree--; \
mclfree = ((union mcluster *)(p))->mcl_next; \
@@ -395,18 +396,24 @@ int max_hdr; /* largest link+protocol header */
int max_datalen; /* MHLEN - max_hdr */
extern int mbtypes[]; /* XXX */
struct mbuf *m_copym __P((struct mbuf *, int, int, int));
struct mbuf *m_free __P((struct mbuf *));
struct mbuf *m_get __P((int, int));
struct mbuf *m_getclr __P((int, int));
struct mbuf *m_gethdr __P((int, int));
struct mbuf *m_prepend __P((struct mbuf *, int, int));
struct mbuf *m_pullup __P((struct mbuf *, int));
int m_clalloc __P((int, int));
struct mbuf *m_retry __P((int, int));
struct mbuf *m_retryhdr __P((int, int));
int m_clalloc __P((int, int));
void m_copyback __P((struct mbuf *, int, int, caddr_t));
void m_reclaim __P((void));
struct mbuf *m_get __P((int, int));
struct mbuf *m_gethdr __P((int, int));
struct mbuf *m_getclr __P((int, int));
struct mbuf *m_free __P((struct mbuf *));
void m_freem __P((struct mbuf *));
struct mbuf *m_prepend __P((struct mbuf *,int,int));
struct mbuf *m_copym __P((struct mbuf *, int, int, int));
void m_copydata __P((struct mbuf *,int,int,caddr_t));
void m_cat __P((struct mbuf *,struct mbuf *));
void m_adj __P((struct mbuf *,int));
struct mbuf *m_pullup __P((struct mbuf *, int));
struct mbuf *m_split __P((struct mbuf *,int,int));
struct mbuf *m_devget __P((char *,int,int,struct ifnet*,void (*copy)()));
#ifdef MBTYPES
int mbtypes[] = { /* XXX */
+5 -1
View File
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)proc.h 8.8 (Berkeley) 1/21/94
* $Id: proc.h,v 1.9 1994/10/02 04:45:58 davidg Exp $
* $Id: proc.h,v 1.10 1994/10/02 08:34:47 davidg Exp $
*/
#ifndef _SYS_PROC_H_
@@ -263,10 +263,14 @@ void mi_switch __P((void));
void resetpriority __P((struct proc *));
void setrunnable __P((struct proc *));
void setrunqueue __P((struct proc *));
void remrq __P((struct proc *));
void cpu_switch __P((struct proc *));
void sleep __P((void *chan, int pri));
int tsleep __P((void *chan, int pri, char *wmesg, int timo));
void unsleep __P((struct proc *));
void wakeup __P((void *chan));
__dead void cpu_exit __P((struct proc *));
__dead void exit1 __P((struct proc *, int));
#endif /* KERNEL */
+2 -1
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)resourcevar.h 8.3 (Berkeley) 2/22/94
* $Id$
* $Id: resourcevar.h,v 1.2 1994/08/02 07:53:29 davidg Exp $
*/
#ifndef _SYS_RESOURCEVAR_H_
@@ -87,5 +87,6 @@ void addupc_intr __P((struct proc *p, u_long pc, u_int ticks));
void addupc_task __P((struct proc *p, u_long pc, u_int ticks));
struct plimit
*limcopy __P((struct plimit *lim));
void calcru __P((struct proc *p,struct timeval *up,struct timeval *sp,struct timeval *ip));
#endif
#endif /* !_SYS_RESOURCEVAR_H_ */
+4 -1
View File
@@ -1,4 +1,4 @@
/* $Id: shm.h,v 1.1 1994/09/13 14:47:36 dfr Exp $ */
/* $Id: shm.h,v 1.2 1994/09/17 13:24:29 davidg Exp $ */
/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
/*
@@ -73,6 +73,9 @@ struct shminfo {
extern struct shminfo shminfo;
struct shmid_ds *shmsegs;
void shminit __P((void));
void shmexit __P((struct proc *));
void shmfork __P((struct proc *, struct proc *, int));
#else /* !KERNEL */
#include <sys/cdefs.h>
+2 -1
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)signalvar.h 8.3 (Berkeley) 1/4/94
* $Id: signalvar.h,v 1.2 1994/08/02 07:53:33 davidg Exp $
* $Id: signalvar.h,v 1.3 1994/09/25 19:34:01 phk Exp $
*/
#ifndef _SYS_SIGNALVAR_H_ /* tmp for user.h */
@@ -156,6 +156,7 @@ void gsignal __P((int pgid, int sig));
int issig __P((struct proc *p));
void pgsignal __P((struct pgrp *pgrp, int sig, int checkctty));
void postsig __P((int sig));
int issignal __P((struct proc *p));
void psignal __P((struct proc *p, int sig));
void siginit __P((struct proc *p));
void trapsignal __P((struct proc *p, int sig, unsigned code));
+2 -1
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)socket.h 8.4 (Berkeley) 2/21/94
* $Id$
* $Id: socket.h,v 1.2 1994/08/02 07:53:35 davidg Exp $
*/
#ifndef _SYS_SOCKET_H_
@@ -262,6 +262,7 @@ struct msghdr {
#define MSG_CTRUNC 0x20 /* control data lost before delivery */
#define MSG_WAITALL 0x40 /* wait for full request or error */
#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */
#define MSG_COMPAT 0x8000 /* used in sendit() */
/*
* Header for ancillary data objects in msg_control buffer.
+51 -3
View File
@@ -31,12 +31,14 @@
* SUCH DAMAGE.
*
* @(#)socketvar.h 8.1 (Berkeley) 6/2/93
* $Id: socketvar.h,v 1.3 1994/08/18 22:35:45 wollman Exp $
* $Id: socketvar.h,v 1.4 1994/08/21 04:41:58 paul Exp $
*/
#ifndef _SYS_SOCKETVAR_H_
#define _SYS_SOCKETVAR_H_
#include <sys/stat.h> /* for struct stat */
#include <sys/filedesc.h> /* for struct filedesc */
#include <sys/select.h> /* for struct selinfo */
/*
@@ -144,9 +146,9 @@ struct socket {
/* can we write something to so? */
#define sowriteable(so) \
(sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
(((so)->so_state&SS_ISCONNECTED) || \
((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0) || \
((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0)) || \
((so)->so_state & SS_CANTSENDMORE) || \
(so)->so_error)
@@ -208,6 +210,52 @@ int soo_write __P((struct file *fp, struct uio *uio, struct ucred *cred));
int soo_ioctl __P((struct file *fp, int com, caddr_t data, struct proc *p));
int soo_select __P((struct file *fp, int which, struct proc *p));
int soo_close __P((struct file *fp, struct proc *p));
int soo_stat __P((struct socket *, struct stat *));
/*
* From uipc_socket and friends
*/
void soqinsque __P((struct socket *, struct socket *, int));
void sowakeup __P((struct socket *, struct sockbuf *));
void socantrcvmore __P((struct socket *));
void socantsendmore __P((struct socket *));
void sbrelease __P((struct sockbuf *));
void sbappend __P((struct sockbuf *, struct mbuf *));
void sbappendrecord __P((struct sockbuf *, struct mbuf *));
int sbappendcontrol __P((struct sockbuf *, struct mbuf *, struct mbuf *));
int sbappendaddr __P((struct sockbuf *, struct sockaddr *, struct mbuf *, struct mbuf *));
void sbdroprecord __P((struct sockbuf *));
void sbcompress __P((struct sockbuf *, struct mbuf *, struct mbuf *));
void sbflush __P((struct sockbuf *));
int sbreserve __P((struct sockbuf *,u_long));
int soreserve __P((struct socket *,u_long,u_long));
int sb_lock __P((struct sockbuf *));
int sbwait __P((struct sockbuf *));
void sbdrop __P((struct sockbuf *, int));
void sofree __P((struct socket *));
void sorflush __P((struct socket *));
int soqremque __P((struct socket *,int));
int soabort __P((struct socket *));
void soisdisconnected __P((struct socket *));
void soisconnected __P((struct socket *));
void soisconnecting __P((struct socket *));
void soisdisconnecting __P((struct socket *));
void sohasoutofband __P((struct socket *));
int sodisconnect __P((struct socket *));
int sosend __P((struct socket *,struct mbuf *, struct uio *, struct mbuf *, struct mbuf *, int));
int socreate __P((int, struct socket **,int,int));
int getsock __P((struct filedesc *,int,struct file **));
int sockargs __P((struct mbuf **,caddr_t,int,int));
int sobind __P((struct socket *,struct mbuf *));
int solisten __P((struct socket *,int));
int soaccept __P((struct socket *,struct mbuf *));
int soconnect __P((struct socket *,struct mbuf *));
int soconnect2 __P((struct socket *,struct socket *));
int soclose __P((struct socket *));
int soshutdown __P((struct socket *,int));
int soreceive __P((struct socket *,struct mbuf **,struct uio *,struct mbuf **,struct mbuf **,int *));
int sosetopt __P((struct socket *,int, int, struct mbuf *));
int sogetopt __P((struct socket *,int, int, struct mbuf **));
#endif
#endif
+4 -2
View File
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)stat.h 8.6 (Berkeley) 3/8/94
* $Id: stat.h,v 1.3 1994/09/09 15:19:40 dfr Exp $
* $Id: stat.h,v 1.4 1994/09/20 22:24:26 bde Exp $
*/
#ifndef _SYS_STAT_H_
@@ -179,7 +179,9 @@ struct stat {
#endif /* !_POSIX_SOURCE */
#ifndef KERNEL
#ifdef KERNEL
void cvtstat __P((struct stat *, struct ostat *));
#else /* KERNEL */
#include <sys/cdefs.h>
__BEGIN_DECLS
+2 -2
View File
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)sysctl.h 8.1 (Berkeley) 6/2/93
* $Id: sysctl.h,v 1.11 1994/09/21 03:47:33 wollman Exp $
* $Id: sysctl.h,v 1.12 1994/09/23 19:07:42 wollman Exp $
*/
#ifndef _SYS_SYSCTL_H_
@@ -315,7 +315,7 @@ struct kinfo_proc {
#define CTL_DEBUG_MAXID 20
#ifdef KERNEL
#ifdef DEBUG
#if defined(DEBUG) || defined(DIAGNOSTIC)
/*
* CTL_DEBUG variables.
*
+2 -1
View File
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)systm.h 8.4 (Berkeley) 2/23/94
* $Id: systm.h,v 1.10 1994/09/15 20:24:27 bde Exp $
* $Id: systm.h,v 1.11 1994/09/18 21:30:30 bde Exp $
*/
#ifndef _SYS_SYSTM_H_
@@ -108,6 +108,7 @@ int enoioctl __P((void));
int enxio __P((void));
int eopnotsupp __P((void));
int seltrue __P((dev_t dev, int which, struct proc *p));
int ureadc __P((int, struct uio *));
void *hashinit __P((int count, int type, u_long *hashmask));
__dead void panic __P((const char *, ...)) __dead2;
+6 -2
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)time.h 8.1 (Berkeley) 6/2/93
* $Id: time.h,v 1.2 1994/08/02 07:53:47 davidg Exp $
* $Id: time.h,v 1.3 1994/08/18 22:35:48 wollman Exp $
*/
#ifndef _SYS_TIME_H_
@@ -108,7 +108,11 @@ struct clockinfo {
#ifdef KERNEL
extern void microtime(struct timeval *);
void microtime __P((struct timeval *));
void timevaladd __P((struct timeval *, struct timeval *));
void timevalsub __P((struct timeval *, struct timeval *));
void timevalfix __P((struct timeval *));
int itimerdecr __P((struct itimerval *itp,int usec));
#else /* not KERNEL */
#include <time.h>
+6 -2
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)time.h 8.1 (Berkeley) 6/2/93
* $Id: time.h,v 1.2 1994/08/02 07:53:47 davidg Exp $
* $Id: time.h,v 1.3 1994/08/18 22:35:48 wollman Exp $
*/
#ifndef _SYS_TIME_H_
@@ -108,7 +108,11 @@ struct clockinfo {
#ifdef KERNEL
extern void microtime(struct timeval *);
void microtime __P((struct timeval *));
void timevaladd __P((struct timeval *, struct timeval *));
void timevalsub __P((struct timeval *, struct timeval *));
void timevalfix __P((struct timeval *));
int itimerdecr __P((struct itimerval *itp,int usec));
#else /* not KERNEL */
#include <time.h>
+2 -2
View File
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.h 8.6 (Berkeley) 1/21/94
* $Id: tty.h,v 1.4 1994/08/21 04:42:05 paul Exp $
* $Id: tty.h,v 1.5 1994/09/13 16:03:35 davidg Exp $
*/
#ifndef _SYS_TTY_H_
@@ -69,7 +69,7 @@ struct tty {
long t_cancc; /* Canonical queue statistics. */
struct clist t_outq; /* Device output queue. */
long t_outcc; /* Output queue statistics. */
char t_line; /* Interface to device drivers. */
int t_line; /* Interface to device drivers. */
dev_t t_dev; /* Device. */
int t_state; /* Device and driver (TS*) state. */
int t_flags; /* Tty flags. */
+20 -2
View File
@@ -31,12 +31,16 @@
* SUCH DAMAGE.
*
* @(#)un.h 8.1 (Berkeley) 6/2/93
* $Id: un.h,v 1.3 1994/08/02 07:54:03 davidg Exp $
* $Id: un.h,v 1.4 1994/08/21 04:42:09 paul Exp $
*/
#ifndef _SYS_UN_H_
#define _SYS_UN_H_
#ifdef KERNEL
#include <sys/unpcb.h>
#endif /* KERNEL */
/*
* Definitions for UNIX IPC domain.
*/
@@ -46,7 +50,21 @@ struct sockaddr_un {
char sun_path[104]; /* path name (gag) */
};
#ifndef KERNEL
#ifdef KERNEL
int unp_connect2 __P((struct socket*,struct socket*));
void unp_detach __P((struct unpcb *));
void unp_disconnect __P((struct unpcb *));
void unp_shutdown __P((struct unpcb *));
void unp_drop __P((struct unpcb *, int));
void unp_gc __P((void));
void unp_scan __P((struct mbuf *, void (*)(struct file *)));
void unp_mark __P((struct file *));
void unp_discard __P((struct file *));
int unp_attach __P((struct socket *));
int unp_bind __P((struct unpcb *,struct mbuf *, struct proc *));
int unp_connect __P((struct socket *,struct mbuf *, struct proc *));
int unp_internalize __P((struct mbuf *, struct proc *));
#else /* KERNEL */
/* actual length of an initialized sockaddr_un */
#define SUN_LEN(su) \
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+3 -1
View File
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vnode.h 8.7 (Berkeley) 2/4/94
* $Id: vnode.h,v 1.8 1994/09/22 22:10:49 wollman Exp $
* $Id: vnode.h,v 1.9 1994/09/25 19:34:02 phk Exp $
*/
#ifndef _SYS_VNODE_H_
@@ -414,6 +414,8 @@ void vprint __P((char *, struct vnode *));
void vput __P((struct vnode *vp));
void vref __P((struct vnode *vp));
void vrele __P((struct vnode *vp));
void vfs_opv_init __P((struct vnodeopv_desc **));
#endif /* KERNEL */
#endif /* !_SYS_VNODE_H_ */