Remove prototype definitions from <sys/systm.h>.

Prototypes are located in <sys/sysproto.h>.

Add appropriate #include <sys/sysproto.h> to files that needed
protos from systm.h.

Add structure definitions to appropriate files that relied on sys/systm.h,
right before system call definition, as in the rest of the kernel source.

In kern_prot.c, instead of using the dummy structure "args", create
individual dummy structures named <syscall>_args.  This makes
life easier for prototype generation.
This commit is contained in:
Steven Wallace 1995-10-08 00:06:22 +00:00
parent 4170ff3e27
commit ad7507e248
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11332
11 changed files with 76 additions and 45 deletions

View File

@ -28,11 +28,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: imgact_shell.c,v 1.6 1994/09/25 19:33:32 phk Exp $
* $Id: imgact_shell.c,v 1.7 1995/09/08 13:24:33 davidg Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/resourcevar.h>
#include <sys/exec.h>
#include <sys/imgact.h>

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
* $Id: init_main.c,v 1.29 1995/09/03 05:43:35 julian Exp $
* $Id: init_main.c,v 1.30 1995/09/09 18:09:59 davidg Exp $
*/
#include <sys/param.h>
@ -67,6 +67,7 @@
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/user.h>
#include <sys/sysproto.h>
#include <ufs/ufs/quota.h>

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
* $Id: kern_descrip.c,v 1.9 1995/03/28 07:56:26 bde Exp $
* $Id: kern_descrip.c,v 1.10 1995/05/30 08:05:21 rgrimes Exp $
*/
#include <sys/param.h>
@ -330,6 +330,9 @@ finishdup(fdp, old, new, retval)
/*
* Close a file descriptor.
*/
struct close_args {
int fd;
};
/* ARGSUSED */
int
close(p, uap, retval)

View File

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_exec.c,v 1.21 1995/05/30 08:05:24 rgrimes Exp $
* $Id: kern_exec.c,v 1.22 1995/08/24 10:32:37 davidg Exp $
*/
#include <sys/param.h>
@ -62,6 +62,12 @@ static int exec_check_permissions(struct image_params *);
*/
const struct execsw **execsw = (const struct execsw **)&execsw_set.ls_items[0];
struct execve_args {
char *fname;
char **argv;
char **envv;
};
/*
* execve() system call.
*/

View File

@ -281,6 +281,13 @@ exit1(p, rv)
cpu_exit(p);
}
struct wait_args {
int pid;
int *status;
int options;
struct rusage *rusage;
};
#if defined(COMPAT_43) || defined(COMPAT_IBCS2)
#if defined(hp300) || defined(luna68k)
#include <machine/frame.h>

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
* $Id: kern_fork.c,v 1.11 1995/03/16 18:12:32 bde Exp $
* $Id: kern_fork.c,v 1.12 1995/05/30 08:05:27 rgrimes Exp $
*/
#include <sys/param.h>
@ -55,6 +55,10 @@
static int fork1(struct proc *, int, int *);
struct fork_args {
int dummy;
};
/* ARGSUSED */
int
fork(p, uap, retval)

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_prot.c 8.6 (Berkeley) 1/21/94
* $Id: kern_prot.c,v 1.11 1995/04/29 11:46:15 ache Exp $
* $Id: kern_prot.c,v 1.12 1995/06/15 22:32:03 ache Exp $
*/
/*
@ -52,7 +52,7 @@
#include <sys/times.h>
#include <sys/malloc.h>
struct args {
struct getpid_args {
int dummy;
};
@ -60,7 +60,7 @@ struct args {
int
getpid(p, uap, retval)
struct proc *p;
struct args *uap;
struct getpid_args *uap;
int *retval;
{
@ -71,11 +71,14 @@ getpid(p, uap, retval)
return (0);
}
struct getppid_args {
int dummy;
};
/* ARGSUSED */
int
getppid(p, uap, retval)
struct proc *p;
struct args *uap;
struct getppid_args *uap;
int *retval;
{
@ -84,10 +87,14 @@ getppid(p, uap, retval)
}
/* Get process group ID; note that POSIX getpgrp takes no parameter */
struct getpgrp_args {
int dummy;
};
int
getpgrp(p, uap, retval)
struct proc *p;
struct args *uap;
struct getpgrp_args *uap;
int *retval;
{
@ -95,11 +102,15 @@ getpgrp(p, uap, retval)
return (0);
}
struct getuid_args {
int dummy;
};
/* ARGSUSED */
int
getuid(p, uap, retval)
struct proc *p;
struct args *uap;
struct getuid_args *uap;
int *retval;
{
@ -110,11 +121,15 @@ getuid(p, uap, retval)
return (0);
}
struct geteuid_args {
int dummy;
};
/* ARGSUSED */
int
geteuid(p, uap, retval)
struct proc *p;
struct args *uap;
struct geteuid_args *uap;
int *retval;
{
@ -122,11 +137,15 @@ geteuid(p, uap, retval)
return (0);
}
struct getgid_args {
int dummy;
};
/* ARGSUSED */
int
getgid(p, uap, retval)
struct proc *p;
struct args *uap;
struct getgid_args *uap;
int *retval;
{
@ -142,11 +161,15 @@ getgid(p, uap, retval)
* via getgroups. This syscall exists because it is somewhat painful to do
* correctly in a library function.
*/
struct getegid_args {
int dummy;
};
/* ARGSUSED */
int
getegid(p, uap, retval)
struct proc *p;
struct args *uap;
struct getegid_args *uap;
int *retval;
{
@ -182,11 +205,15 @@ getgroups(p, uap, retval)
return (0);
}
struct getsid_args {
int dummy;
};
/* ARGSUSED */
int
setsid(p, uap, retval)
register struct proc *p;
struct args *uap;
struct getsid_args *uap;
int *retval;
{

View File

@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: vfs_bio.c,v 1.64 1995/09/23 21:12:43 dyson Exp $
* $Id: vfs_bio.c,v 1.65 1995/10/01 05:50:27 davidg Exp $
*/
/*
@ -35,6 +35,7 @@
#define VMIO
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/vnode.h>

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.32 1995/08/17 11:53:40 bde Exp $
* $Id: vfs_syscalls.c,v 1.33 1995/08/28 09:18:56 julian Exp $
*/
#include <sys/param.h>
@ -315,6 +315,10 @@ int syncprt = 0;
struct ctldebug debug0 = { "syncprt", &syncprt };
#endif
struct sync_args {
int dummy;
};
/* ARGSUSED */
int
sync(p, uap, retval)

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.32 1995/08/17 11:53:40 bde Exp $
* $Id: vfs_syscalls.c,v 1.33 1995/08/28 09:18:56 julian Exp $
*/
#include <sys/param.h>
@ -315,6 +315,10 @@ int syncprt = 0;
struct ctldebug debug0 = { "syncprt", &syncprt };
#endif
struct sync_args {
int dummy;
};
/* ARGSUSED */
int
sync(p, uap, retval)

View File

@ -190,31 +190,4 @@ void timeout(timeout_func_t, void *, int);
void untimeout(timeout_func_t, void *);
void logwakeup __P((void));
/* Syscalls that are called internally. */
struct close_args {
int fd;
};
int close __P((struct proc *, struct close_args *uap, int *retval));
struct execve_args {
char *fname;
char **argv;
char **envv;
};
int execve __P((struct proc *, struct execve_args *, int *retval));
struct fork_args {
int dummy;
};
int fork __P((struct proc *, struct fork_args *, int retval[]));
struct sync_args {
int dummy;
};
int sync __P((struct proc *, struct sync_args *, int *retval));
struct wait_args {
int pid;
int *status;
int options;
struct rusage *rusage;
};
int wait1 __P((struct proc *, struct wait_args *, int retval[]));
#endif /* !_SYS_SYSTM_H_ */