summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-01-05 22:19:44 +0000
committerjhb <jhb@FreeBSD.org>2005-01-05 22:19:44 +0000
commit3ec0dff7ad7566c73f4fc3e43b3120acdae74fdb (patch)
tree2065f01a2c26ba653ecc3487d355c7dcb1791690
parentbd77e02714a1df01009c3db711eb95761b5963b4 (diff)
downloadFreeBSD-src-3ec0dff7ad7566c73f4fc3e43b3120acdae74fdb.zip
FreeBSD-src-3ec0dff7ad7566c73f4fc3e43b3120acdae74fdb.tar.gz
- Move the function prototypes for kern_setrlimit() and kern_wait() to
sys/syscallsubr.h where all the other kern_foo() prototypes live. - Resort kern_execve() while I'm there.
-rw-r--r--sys/compat/svr4/svr4_misc.c1
-rw-r--r--sys/compat/svr4/svr4_resource.c1
-rw-r--r--sys/i386/ibcs2/ibcs2_misc.c1
-rw-r--r--sys/kern/kern_exit.c1
-rw-r--r--sys/sys/resource.h3
-rw-r--r--sys/sys/syscallsubr.h8
-rw-r--r--sys/sys/wait.h8
7 files changed, 13 insertions, 10 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 6ed6ea9..fed1299 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$");
#include <sys/signalvar.h>
#include <sys/stat.h>
#include <sys/sx.h>
+#include <sys/syscallsubr.h>
#include <sys/sysproto.h>
#include <sys/time.h>
#include <sys/times.h>
diff --git a/sys/compat/svr4/svr4_resource.c b/sys/compat/svr4/svr4_resource.c
index 6aed48d..4f4ef79 100644
--- a/sys/compat/svr4/svr4_resource.c
+++ b/sys/compat/svr4/svr4_resource.c
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/resource.h>
#include <sys/resourcevar.h>
+#include <sys/syscallsubr.h>
#include <compat/svr4/svr4.h>
#include <compat/svr4/svr4_types.h>
diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c
index 618fce6..0f7f3a9 100644
--- a/sys/i386/ibcs2/ibcs2_misc.c
+++ b/sys/i386/ibcs2/ibcs2_misc.c
@@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$");
#include <sys/resourcevar.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
+#include <sys/syscallsubr.h>
#include <sys/sysproto.h>
#include <sys/time.h>
#include <sys/times.h>
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index e3ae64b..eff74a9 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
#include <sys/signalvar.h>
#include <sys/sched.h>
#include <sys/sx.h>
+#include <sys/syscallsubr.h>
#include <sys/ptrace.h>
#include <sys/acct.h> /* for acct_process() function prototype */
#include <sys/filedesc.h>
diff --git a/sys/sys/resource.h b/sys/sys/resource.h
index 1662cf1..5b2d18a 100644
--- a/sys/sys/resource.h
+++ b/sys/sys/resource.h
@@ -154,11 +154,10 @@ struct loadavg {
#endif /* __BSD_VISIBLE */
#ifdef _KERNEL
+
extern struct loadavg averunnable;
extern long cp_time[CPUSTATES];
-int kern_setrlimit(struct thread *, u_int, struct rlimit *);
-
#else
__BEGIN_DECLS
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h
index c583e08..bb9c5b6 100644
--- a/sys/sys/syscallsubr.h
+++ b/sys/sys/syscallsubr.h
@@ -35,6 +35,7 @@
struct mbuf;
struct msghdr;
+struct rlimit;
struct rusage;
struct sockaddr;
@@ -49,6 +50,8 @@ int kern_chmod(struct thread *td, char *path, enum uio_seg pathseg,
int kern_chown(struct thread *td, char *path, enum uio_seg pathseg, int uid,
int gid);
int kern_connect(struct thread *td, int fd, struct sockaddr *sa);
+int kern_execve(struct thread *td, char *fname, char **argv, char **envv,
+ struct mac *mac_p);
int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg);
int kern_futimes(struct thread *td, int fd, struct timeval *tptr,
enum uio_seg tptrseg);
@@ -80,6 +83,7 @@ int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou,
fd_set *fd_ex, struct timeval *tvp);
int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags,
struct mbuf *control);
+int kern_setrlimit(struct thread *, u_int, struct rlimit *);
int kern_setsockopt(struct thread *td, int s, int level, int name,
void *optval, enum uio_seg valseg, socklen_t valsize);
int kern_shmat(struct thread *td, int shmid, const void *shmaddr,
@@ -99,8 +103,8 @@ int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg,
int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg);
int kern_utimes(struct thread *td, char *path, enum uio_seg pathseg,
struct timeval *tptr, enum uio_seg tptrseg);
-int kern_execve(struct thread *td, char *fname, char **argv, char **envv,
- struct mac *mac_p);
+int kern_wait(struct thread *td, pid_t pid, int *status, int options,
+ struct rusage *rup);
/* flags for kern_sigaction */
#define KSA_OSIGSET 0x0001 /* uses osigact_t */
diff --git a/sys/sys/wait.h b/sys/sys/wait.h
index 6b8d1e5..c16821c 100644
--- a/sys/sys/wait.h
+++ b/sys/sys/wait.h
@@ -92,11 +92,7 @@
#define WAIT_MYPGRP 0 /* any process in my process group */
#endif /* __BSD_VISIBLE */
-#ifdef _KERNEL
-struct rusage;
-int kern_wait(struct thread *td, pid_t pid, int *status, int options,
- struct rusage *rup);
-#else /* !_KERNEL */
+#ifndef _KERNEL
#include <sys/types.h>
__BEGIN_DECLS
@@ -108,6 +104,6 @@ pid_t wait3(int *, int, struct rusage *);
pid_t wait4(pid_t, int *, int, struct rusage *);
#endif
__END_DECLS
-#endif /* _KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_WAIT_H_ */
OpenPOWER on IntegriCloud