diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-02-29 13:57:33 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-02-29 13:57:33 +0000 |
commit | 04d7e605aa2117d17ae47d856570efbbe6de01c2 (patch) | |
tree | 96c53ba2c91acd48c733ab4b50fe447aa1049862 /sys | |
parent | 206d8deea9cb88496999fc2c707cc5aa702aaa45 (diff) |
From NetBSD: Merge with NetBSD 960217
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/buf.h | 18 | ||||
-rw-r--r-- | sys/sys/mount.h | 16 | ||||
-rw-r--r-- | sys/sys/socket.h | 15 | ||||
-rw-r--r-- | sys/sys/stat.h | 13 | ||||
-rw-r--r-- | sys/sys/systm.h | 31 | ||||
-rw-r--r-- | sys/sys/time.h | 15 | ||||
-rw-r--r-- | sys/sys/vnode.h | 31 |
7 files changed, 93 insertions, 46 deletions
diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 8400c52c20c..ff4b485a220 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -1,4 +1,5 @@ -/* $NetBSD: buf.h,v 1.21 1995/08/12 20:31:53 mycroft Exp $ */ +/* $OpenBSD: buf.h,v 1.2 1996/02/29 13:57:26 niklas Exp $ */ +/* $NetBSD: buf.h,v 1.23 1996/02/09 18:24:59 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -159,24 +160,24 @@ struct buf bswlist; /* Head of swap I/O buffer headers free list. */ struct buf *bclnlist; /* Head of cleaned page list. */ __BEGIN_DECLS -int allocbuf __P((struct buf *, int)); +void allocbuf __P((struct buf *, int)); void bawrite __P((struct buf *)); void bdwrite __P((struct buf *)); void biodone __P((struct buf *)); int biowait __P((struct buf *)); int bread __P((struct vnode *, daddr_t, int, - struct ucred *, struct buf **)); + struct ucred *, struct buf **)); int breada __P((struct vnode *, daddr_t, int, daddr_t, int, - struct ucred *, struct buf **)); + struct ucred *, struct buf **)); int breadn __P((struct vnode *, daddr_t, int, daddr_t *, int *, int, - struct ucred *, struct buf **)); + struct ucred *, struct buf **)); void brelse __P((struct buf *)); void bremfree __P((struct buf *)); void bufinit __P((void)); int bwrite __P((struct buf *)); void cluster_callback __P((struct buf *)); int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long, - struct ucred *, struct buf **)); + struct ucred *, struct buf **)); void cluster_write __P((struct buf *, u_quad_t)); struct buf *getblk __P((struct vnode *, daddr_t, int, int, int)); struct buf *geteblk __P((int)); @@ -185,7 +186,10 @@ struct buf *incore __P((struct vnode *, daddr_t)); void minphys __P((struct buf *bp)); int physio __P((void (*strategy)(struct buf *), struct buf *bp, dev_t dev, - int flags, void (*minphys)(struct buf *), struct uio *uio)); + int flags, void (*minphys)(struct buf *), struct uio *uio)); +void brelvp __P((struct buf *)); +void reassignbuf __P((struct buf *, struct vnode *)); +void bgetvp __P((struct vnode *, struct buf *)); __END_DECLS #endif #endif /* !_SYS_BUF_H_ */ diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 5dacd681ff2..5976b27ed80 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -1,4 +1,5 @@ -/* $NetBSD: mount.h,v 1.45 1996/01/19 14:29:25 leo Exp $ */ +/* $OpenBSD: mount.h,v 1.5 1996/02/29 13:57:27 niklas Exp $ */ +/* $NetBSD: mount.h,v 1.47 1996/02/09 18:25:16 christos Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -200,7 +201,7 @@ struct vfsops { struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); int (*vfs_vptofh) __P((struct vnode *vp, struct fid *fhp)); - int (*vfs_init) __P((void)); + void (*vfs_init) __P((void)); int vfs_refcount; }; @@ -408,10 +409,17 @@ int vfs_mountedon __P((struct vnode *));/* is a vfs mounted on vp */ void vfs_shutdown __P((void)); /* unmount and sync file systems */ void vfs_unlock __P((struct mount *)); /* unlock a vfs */ void vfs_unmountall __P((void)); /* unmount file systems */ +int vfs_busy __P((struct mount *)); +void vfs_unbusy __P((struct mount *)); extern CIRCLEQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */ extern struct vfsops *vfssw[]; /* filesystem type table */ extern int nvfssw; - +long makefstype __P((char *)); +int dounmount __P((struct mount *, int, struct proc *)); +void vfsinit __P((void)); +#ifdef DEBUG +void vfs_bufstats __P((void)); +#endif #else /* _KERNEL */ #include <sys/cdefs.h> @@ -421,7 +429,7 @@ int fstatfs __P((int, struct statfs *)); int getfh __P((const char *, fhandle_t *)); int getfsstat __P((struct statfs *, long, int)); int getmntinfo __P((struct statfs **, int)); -int mount __P((char *, const char *, int, void *)); +int mount __P((const char *, const char *, int, void *)); int statfs __P((const char *, struct statfs *)); int unmount __P((const char *, int)); __END_DECLS diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 28aeb570fd3..aeb4cf29807 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -1,4 +1,5 @@ -/* $NetBSD: socket.h,v 1.12 1995/03/29 22:10:11 briggs Exp $ */ +/* $OpenBSD: socket.h,v 1.2 1996/02/29 13:57:28 niklas Exp $ */ +/* $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ */ /* * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -237,9 +238,9 @@ struct sockproto { } /* - * Maximum queue length specifiable by listen. + * Maximum queue length specifiable by listen(2). */ -#define SOMAXCONN 5 +#define SOMAXCONN 128 /* * Message header for recvmsg and sendmsg calls. @@ -336,6 +337,12 @@ int shutdown __P((int, int)); int socket __P((int, int, int)); int socketpair __P((int, int, int, int *)); __END_DECLS - +#else +# if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_LINUX) || \ + defined(COMPAT_HPUX) || defined(COMPAT_FREEBSD) +# define COMPAT_OLDSOCK +# define MSG_COMPAT 0x8000 +# endif #endif /* !_KERNEL */ + #endif /* !_SYS_SOCKET_H_ */ diff --git a/sys/sys/stat.h b/sys/sys/stat.h index 1f4981148db..37c690d3f9c 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -1,3 +1,4 @@ +/* $OpenBSD: stat.h,v 1.2 1996/02/29 13:57:29 niklas Exp $ */ /* $NetBSD: stat.h,v 1.17 1995/06/15 23:08:08 cgd Exp $ */ /*- @@ -94,12 +95,12 @@ struct stat { int64_t st_qspare[2]; }; #ifndef _POSIX_SOURCE -#define st_atime st_atimespec.ts_sec -#define st_atimensec st_atimespec.ts_nsec -#define st_mtime st_mtimespec.ts_sec -#define st_mtimensec st_mtimespec.ts_nsec -#define st_ctime st_ctimespec.ts_sec -#define st_ctimensec st_ctimespec.ts_nsec +#define st_atime st_atimespec.tv_sec +#define st_atimensec st_atimespec.tv_nsec +#define st_mtime st_mtimespec.tv_sec +#define st_mtimensec st_mtimespec.tv_nsec +#define st_ctime st_ctimespec.tv_sec +#define st_ctimensec st_ctimespec.tv_nsec #endif #define S_ISUID 0004000 /* set user id on execution */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 4ae0aa60333..4b683a432c0 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,5 @@ -/* $NetBSD: systm.h,v 1.37 1995/09/19 21:40:36 thorpej Exp $ */ +/* $OpenBSD: systm.h,v 1.2 1996/02/29 13:57:30 niklas Exp $ */ +/* $NetBSD: systm.h,v 1.40 1996/02/10 00:13:28 christos Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -104,21 +105,28 @@ extern int nsysent; extern int boothowto; /* reboot flags, from console subsystem */ -/* casts to keep lint happy */ -#define insque(q,p) _insque((caddr_t)q,(caddr_t)p) -#define remque(q) _remque((caddr_t)q) +extern void (*v_putc) __P((int)); /* Virtual console putc routine */ + +extern void _insque __P((void *, void *)); +extern void _remque __P((void *)); + +/* casts to keep lint happy, but it should be happy with void * */ +#define insque(q,p) _insque(q, p) +#define remque(q) _remque(q) /* * General function declarations. */ -int nullop __P((void)); +int nullop __P((void *)); int enodev __P((void)); +int enosys __P((void)); +int lkmenodev __P((dev_t, int, int, struct proc *)); int enoioctl __P((void)); int enxio __P((void)); int eopnotsupp __P((void)); int seltrue __P((dev_t dev, int which, struct proc *p)); void *hashinit __P((int count, int type, u_long *hashmask)); -int nosys __P((struct proc *, void *, register_t *)); +int sys_nosys __P((struct proc *, void *, register_t *)); #ifdef __GNUC__ volatile void panic __P((const char *, ...)); @@ -127,12 +135,14 @@ void panic __P((const char *, ...)); #endif void tablefull __P((const char *)); void printf __P((const char *, ...)); +void uprintf __P((const char *, ...)); int sprintf __P((char *buf, const char *, ...)); void ttyprintf __P((struct tty *, const char *, ...)); void bcopy __P((const void *from, void *to, size_t len)); void ovbcopy __P((const void *from, void *to, size_t len)); void bzero __P((void *buf, size_t len)); +int bcmp __P((const void *b1, const void *b2, size_t len)); int copystr __P((void *kfaddr, void *kdaddr, size_t len, size_t *done)); int copyinstr __P((void *udaddr, void *kaddr, size_t len, size_t *done)); @@ -150,7 +160,10 @@ long fuword __P((void *base)); long fuiword __P((void *base)); int suword __P((void *base, long word)); int suiword __P((void *base, long word)); +int fuswintr __P((caddr_t)); +int suswintr __P((caddr_t, u_int)); +struct timeval; int hzto __P((struct timeval *tv)); void timeout __P((void (*func)(void *), void *arg, int ticks)); void untimeout __P((void (*func)(void *), void *arg)); @@ -177,10 +190,14 @@ void *shutdownhook_establish __P((void (*)(void *), void *)); void shutdownhook_disestablish __P((void *)); void doshutdownhooks __P((void)); +int uiomove __P((caddr_t, int, struct uio *)); + #include <lib/libkern/libkern.h> #ifdef DDB /* debugger entry points */ -int Debugger __P((void)); /* in DDB only */ +#ifdef notyet /* XXX: Lots of local decls assume int Debugger */ +void Debugger __P((void)); /* in DDB only */ +#endif int read_symtab_from_file __P((struct proc *,struct vnode *,const char *)); #endif diff --git a/sys/sys/time.h b/sys/sys/time.h index 9ceff4aee67..bf904fe6cbc 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -1,3 +1,4 @@ +/* $OpenBSD: time.h,v 1.2 1996/02/29 13:57:31 niklas Exp $ */ /* $NetBSD: time.h,v 1.16 1995/06/15 23:08:11 cgd Exp $ */ /* @@ -50,20 +51,20 @@ struct timeval { }; /* - * Structure defined by POSIX.4 to be like a timeval. + * Structure defined by POSIX.1b to be like a timeval. */ struct timespec { - time_t ts_sec; /* seconds */ - long ts_nsec; /* and nanoseconds */ + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ }; #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ - (ts)->ts_sec = (tv)->tv_sec; \ - (ts)->ts_nsec = (tv)->tv_usec * 1000; \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } #define TIMESPEC_TO_TIMEVAL(tv, ts) { \ - (tv)->tv_sec = (ts)->ts_sec; \ - (tv)->tv_usec = (ts)->ts_nsec / 1000; \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ } struct timezone { diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index f2596f8d705..02582e79e8c 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,5 @@ -/* $NetBSD: vnode.h,v 1.32 1995/03/26 20:25:05 jtc Exp $ */ +/* $OpenBSD: vnode.h,v 1.2 1996/02/29 13:57:32 niklas Exp $ */ +/* $NetBSD: vnode.h,v 1.37 1996/02/09 18:25:47 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -73,7 +74,7 @@ struct vnode { daddr_t v_lastr; /* last read (read-ahead) */ u_long v_id; /* capability identifier */ struct mount *v_mount; /* ptr to vfs we are in */ - int (**v_op)(); /* vnode operations vector */ + int (**v_op) __P((void *)); /* vnode operations vector */ TAILQ_ENTRY(vnode) v_freelist; /* vnode freelist */ LIST_ENTRY(vnode) v_mntvnodes; /* vnodes for mount point */ struct buflists v_cleanblkhd; /* clean blocklist head */ @@ -304,18 +305,18 @@ extern struct vnodeop_desc *vnodeop_descs[]; */ struct vnodeopv_entry_desc { struct vnodeop_desc *opve_op; /* which operation this is */ - int (*opve_impl)(); /* code implementing this operation */ + int (*opve_impl) __P((void *)); /* code implementing this operation */ }; struct vnodeopv_desc { /* ptr to the ptr to the vector where op should go */ - int (***opv_desc_vector_p)(); + int (***opv_desc_vector_p) __P((void *)); struct vnodeopv_entry_desc *opv_desc_ops; /* null terminated list */ }; /* * A default routine which just returns an error. */ -int vn_default_error __P((void)); +int vn_default_error __P((void *)); /* * A generic structure. @@ -343,12 +344,13 @@ struct vop_generic_args { /* * Finally, include the default set of vnode operations. */ -#include <vnode_if.h> +#include "vnode_if.h" /* * Public vnode manipulation functions. */ struct file; +struct filedesc; struct mount; struct nameidata; struct proc; @@ -357,22 +359,28 @@ struct ucred; struct uio; struct vattr; struct vnode; -struct vop_bwrite_args; int bdevvp __P((dev_t dev, struct vnode **vpp)); int cdevvp __P((dev_t dev, struct vnode **vpp)); -int getnewvnode __P((enum vtagtype tag, - struct mount *mp, int (**vops)(), struct vnode **vpp)); +int getnewvnode __P((enum vtagtype tag, struct mount *mp, + int (**vops) __P((void *)), struct vnode **vpp)); +int getvnode __P((struct filedesc *fdp, int fd, struct file **fpp)); +void getnewfsid __P((struct mount *, int)); void vattr_null __P((struct vattr *vap)); int vcount __P((struct vnode *vp)); +void vclean __P((struct vnode *, int)); +int vfinddev __P((dev_t, enum vtype, struct vnode **)); void vflushbuf __P((struct vnode *vp, int sync)); +int vflush __P((struct mount *mp, struct vnode *vp, int flags)); +void vntblinit __P((void)); +void vwakeup __P((struct buf *)); int vget __P((struct vnode *vp, int lockflag)); void vgone __P((struct vnode *vp)); void vgoneall __P((struct vnode *vp)); int vinvalbuf __P((struct vnode *vp, int save, struct ucred *cred, struct proc *p, int slpflag, int slptimeo)); void vprint __P((char *label, struct vnode *vp)); -int vn_bwrite __P((struct vop_bwrite_args *ap)); +int vn_bwrite __P((void *ap)); int vn_close __P((struct vnode *vp, int flags, struct ucred *cred, struct proc *p)); int vn_closefile __P((struct file *fp, struct proc *p)); @@ -386,11 +394,12 @@ int vn_read __P((struct file *fp, struct uio *uio, struct ucred *cred)); int vn_select __P((struct file *fp, int which, struct proc *p)); int vn_stat __P((struct vnode *vp, struct stat *sb, struct proc *p)); int vn_write __P((struct file *fp, struct uio *uio, struct ucred *cred)); +int vn_writechk __P((struct vnode *vp)); struct vnode * checkalias __P((struct vnode *vp, dev_t nvp_rdev, struct mount *mp)); void vput __P((struct vnode *vp)); void vref __P((struct vnode *vp)); void vrele __P((struct vnode *vp)); int vaccess __P((mode_t file_mode, uid_t uid, gid_t gid, - mode_t acc_mode, struct ucred *cred)); + mode_t acc_mode, struct ucred *cred)); #endif /* _KERNEL */ |