summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
committerkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
commit99851f359e6f006b3223bb37dbc49e751ca8c13a (patch)
tree2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/kern
parentbf8fedabcd023c90bb2ee4ce0e5d6d8c2b927714 (diff)
downloadFreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.zip
FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.tar.gz
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/kern_acct.c2
-rw-r--r--sys/kern/kern_context.c6
-rw-r--r--sys/kern/kern_cpuset.c10
-rw-r--r--sys/kern/kern_descrip.c20
-rw-r--r--sys/kern/kern_environment.c2
-rw-r--r--sys/kern/kern_event.c4
-rw-r--r--sys/kern/kern_exec.c6
-rw-r--r--sys/kern/kern_exit.c14
-rw-r--r--sys/kern/kern_fork.c10
-rw-r--r--sys/kern/kern_jail.c12
-rw-r--r--sys/kern/kern_ktrace.c4
-rw-r--r--sys/kern/kern_linker.c16
-rw-r--r--sys/kern/kern_loginclass.c4
-rw-r--r--sys/kern/kern_module.c8
-rw-r--r--sys/kern/kern_ntptime.c6
-rw-r--r--sys/kern/kern_proc.c4
-rw-r--r--sys/kern/kern_prot.c54
-rw-r--r--sys/kern/kern_rctl.c22
-rw-r--r--sys/kern/kern_resource.c16
-rw-r--r--sys/kern/kern_shutdown.c8
-rw-r--r--sys/kern/kern_sig.c34
-rw-r--r--sys/kern/kern_synch.c2
-rw-r--r--sys/kern/kern_sysctl.c2
-rw-r--r--sys/kern/kern_thr.c18
-rw-r--r--sys/kern/kern_time.c30
-rw-r--r--sys/kern/kern_umtx.c6
-rw-r--r--sys/kern/kern_uuid.c2
-rw-r--r--sys/kern/makesyscalls.sh24
-rw-r--r--sys/kern/p1003_1b.c16
-rw-r--r--sys/kern/subr_bus.c2
-rw-r--r--sys/kern/subr_prof.c6
-rw-r--r--sys/kern/subr_trap.c4
-rw-r--r--sys/kern/sys_capability.c16
-rw-r--r--sys/kern/sys_generic.c34
-rw-r--r--sys/kern/sys_pipe.c2
-rw-r--r--sys/kern/sys_procdesc.c6
-rw-r--r--sys/kern/sys_process.c4
-rw-r--r--sys/kern/sysv_msg.c22
-rw-r--r--sys/kern/sysv_sem.c20
-rw-r--r--sys/kern/sysv_shm.c22
-rw-r--r--sys/kern/tty.c2
-rw-r--r--sys/kern/tty_pts.c2
-rw-r--r--sys/kern/uipc_mqueue.c16
-rw-r--r--sys/kern/uipc_sem.c34
-rw-r--r--sys/kern/uipc_shm.c4
-rw-r--r--sys/kern/uipc_syscalls.c42
-rw-r--r--sys/kern/vfs_acl.c24
-rw-r--r--sys/kern/vfs_aio.c30
-rw-r--r--sys/kern/vfs_cache.c2
-rw-r--r--sys/kern/vfs_extattr.c26
-rw-r--r--sys/kern/vfs_mount.c6
-rw-r--r--sys/kern/vfs_syscalls.c144
-rw-r--r--sys/kern/vfs_vnops.c2
54 files changed, 427 insertions, 409 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index fc07245..2c094f8 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -765,7 +765,7 @@ start_init(void *dummy)
* Otherwise, return via fork_trampoline() all the way
* to user mode as init!
*/
- if ((error = execve(td, &args)) == 0) {
+ if ((error = sys_execve(td, &args)) == 0) {
mtx_unlock(&Giant);
return;
}
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index c7ba517..8e5479b 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -193,7 +193,7 @@ SYSCTL_INT(_kern, OID_AUTO, acct_suspended, CTLFLAG_RD, &acct_suspended, 0,
* implementation done by Mark Tinguely.
*/
int
-acct(struct thread *td, struct acct_args *uap)
+sys_acct(struct thread *td, struct acct_args *uap)
{
struct nameidata nd;
int error, flags, vfslocked;
diff --git a/sys/kern/kern_context.c b/sys/kern/kern_context.c
index 9230857..70751d0 100644
--- a/sys/kern/kern_context.c
+++ b/sys/kern/kern_context.c
@@ -60,7 +60,7 @@ struct swapcontext_args {
#endif
int
-getcontext(struct thread *td, struct getcontext_args *uap)
+sys_getcontext(struct thread *td, struct getcontext_args *uap)
{
ucontext_t uc;
int ret;
@@ -79,7 +79,7 @@ getcontext(struct thread *td, struct getcontext_args *uap)
}
int
-setcontext(struct thread *td, struct setcontext_args *uap)
+sys_setcontext(struct thread *td, struct setcontext_args *uap)
{
ucontext_t uc;
int ret;
@@ -100,7 +100,7 @@ setcontext(struct thread *td, struct setcontext_args *uap)
}
int
-swapcontext(struct thread *td, struct swapcontext_args *uap)
+sys_swapcontext(struct thread *td, struct swapcontext_args *uap)
{
ucontext_t uc;
int ret;
diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c
index e1f2801..cee3e81 100644
--- a/sys/kern/kern_cpuset.c
+++ b/sys/kern/kern_cpuset.c
@@ -848,7 +848,7 @@ struct cpuset_args {
};
#endif
int
-cpuset(struct thread *td, struct cpuset_args *uap)
+sys_cpuset(struct thread *td, struct cpuset_args *uap)
{
struct cpuset *root;
struct cpuset *set;
@@ -876,7 +876,7 @@ struct cpuset_setid_args {
};
#endif
int
-cpuset_setid(struct thread *td, struct cpuset_setid_args *uap)
+sys_cpuset_setid(struct thread *td, struct cpuset_setid_args *uap)
{
struct cpuset *set;
int error;
@@ -902,7 +902,7 @@ struct cpuset_getid_args {
cpusetid_t *setid;
#endif
int
-cpuset_getid(struct thread *td, struct cpuset_getid_args *uap)
+sys_cpuset_getid(struct thread *td, struct cpuset_getid_args *uap)
{
struct cpuset *nset;
struct cpuset *set;
@@ -959,7 +959,7 @@ struct cpuset_getaffinity_args {
};
#endif
int
-cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap)
+sys_cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap)
{
struct thread *ttd;
struct cpuset *nset;
@@ -1049,7 +1049,7 @@ struct cpuset_setaffinity_args {
};
#endif
int
-cpuset_setaffinity(struct thread *td, struct cpuset_setaffinity_args *uap)
+sys_cpuset_setaffinity(struct thread *td, struct cpuset_setaffinity_args *uap)
{
struct cpuset *nset;
struct cpuset *set;
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 4aaed1f..a2100e0 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -292,7 +292,7 @@ struct getdtablesize_args {
#endif
/* ARGSUSED */
int
-getdtablesize(struct thread *td, struct getdtablesize_args *uap)
+sys_getdtablesize(struct thread *td, struct getdtablesize_args *uap)
{
struct proc *p = td->td_proc;
uint64_t lim;
@@ -321,7 +321,7 @@ struct dup2_args {
#endif
/* ARGSUSED */
int
-dup2(struct thread *td, struct dup2_args *uap)
+sys_dup2(struct thread *td, struct dup2_args *uap)
{
return (do_dup(td, DUP_FIXED, (int)uap->from, (int)uap->to,
@@ -338,7 +338,7 @@ struct dup_args {
#endif
/* ARGSUSED */
int
-dup(struct thread *td, struct dup_args *uap)
+sys_dup(struct thread *td, struct dup_args *uap)
{
return (do_dup(td, 0, (int)uap->fd, 0, td->td_retval));
@@ -356,7 +356,7 @@ struct fcntl_args {
#endif
/* ARGSUSED */
int
-fcntl(struct thread *td, struct fcntl_args *uap)
+sys_fcntl(struct thread *td, struct fcntl_args *uap)
{
struct flock fl;
struct oflock ofl;
@@ -1170,7 +1170,7 @@ struct close_args {
#endif
/* ARGSUSED */
int
-close(td, uap)
+sys_close(td, uap)
struct thread *td;
struct close_args *uap;
{
@@ -1253,7 +1253,7 @@ struct closefrom_args {
#endif
/* ARGSUSED */
int
-closefrom(struct thread *td, struct closefrom_args *uap)
+sys_closefrom(struct thread *td, struct closefrom_args *uap)
{
struct filedesc *fdp;
int fd;
@@ -1317,7 +1317,7 @@ struct fstat_args {
#endif
/* ARGSUSED */
int
-fstat(struct thread *td, struct fstat_args *uap)
+sys_fstat(struct thread *td, struct fstat_args *uap)
{
struct stat ub;
int error;
@@ -1361,7 +1361,7 @@ struct nfstat_args {
#endif
/* ARGSUSED */
int
-nfstat(struct thread *td, struct nfstat_args *uap)
+sys_nfstat(struct thread *td, struct nfstat_args *uap)
{
struct nstat nub;
struct stat ub;
@@ -1386,7 +1386,7 @@ struct fpathconf_args {
#endif
/* ARGSUSED */
int
-fpathconf(struct thread *td, struct fpathconf_args *uap)
+sys_fpathconf(struct thread *td, struct fpathconf_args *uap)
{
struct file *fp;
struct vnode *vp;
@@ -2602,7 +2602,7 @@ struct flock_args {
#endif
/* ARGSUSED */
int
-flock(struct thread *td, struct flock_args *uap)
+sys_flock(struct thread *td, struct flock_args *uap)
{
struct file *fp;
struct vnode *vp;
diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c
index 16760ce..1e31285 100644
--- a/sys/kern/kern_environment.c
+++ b/sys/kern/kern_environment.c
@@ -77,7 +77,7 @@ int dynamic_kenv = 0;
panic("%s: called before SI_SUB_KMEM", __func__)
int
-kenv(td, uap)
+sys_kenv(td, uap)
struct thread *td;
struct kenv_args /* {
int what;
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index dc11411..925cbec 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -679,7 +679,7 @@ filt_usertouch(struct knote *kn, struct kevent *kev, u_long type)
}
int
-kqueue(struct thread *td, struct kqueue_args *uap)
+sys_kqueue(struct thread *td, struct kqueue_args *uap)
{
struct filedesc *fdp;
struct kqueue *kq;
@@ -722,7 +722,7 @@ struct kevent_args {
};
#endif
int
-kevent(struct thread *td, struct kevent_args *uap)
+sys_kevent(struct thread *td, struct kevent_args *uap)
{
struct timespec ts, *tsp;
struct kevent_copyops k_ops = { uap,
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 1c42420..fe01142 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -192,7 +192,7 @@ struct execve_args {
#endif
int
-execve(td, uap)
+sys_execve(td, uap)
struct thread *td;
struct execve_args /* {
char *fname;
@@ -218,7 +218,7 @@ struct fexecve_args {
}
#endif
int
-fexecve(struct thread *td, struct fexecve_args *uap)
+sys_fexecve(struct thread *td, struct fexecve_args *uap)
{
int error;
struct image_args args;
@@ -242,7 +242,7 @@ struct __mac_execve_args {
#endif
int
-__mac_execve(td, uap)
+sys___mac_execve(td, uap)
struct thread *td;
struct __mac_execve_args /* {
char *fname;
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index e5d6094..9be54de 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -104,7 +104,7 @@ void (*nlminfo_release_p)(struct proc *p);
* exit -- death of process.
*/
void
-sys_exit(struct thread *td, struct sys_exit_args *uap)
+sys_sys_exit(struct thread *td, struct sys_exit_args *uap)
{
exit1(td, W_EXITCODE(uap->rval, 0));
@@ -224,7 +224,7 @@ exit1(struct thread *td, int rv)
q = p->p_peers;
while (q != NULL) {
PROC_LOCK(q);
- psignal(q, SIGKILL);
+ kern_psignal(q, SIGKILL);
PROC_UNLOCK(q);
q = q->p_peers;
}
@@ -421,7 +421,7 @@ exit1(struct thread *td, int rv)
q->p_flag &= ~(P_TRACED | P_STOPPED_TRACE);
FOREACH_THREAD_IN_PROC(q, temp)
temp->td_dbgflags &= ~TDB_SUSPEND;
- psignal(q, SIGKILL);
+ kern_psignal(q, SIGKILL);
}
PROC_UNLOCK(q);
}
@@ -501,12 +501,12 @@ exit1(struct thread *td, int rv)
mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx);
if (p->p_pptr == initproc)
- psignal(p->p_pptr, SIGCHLD);
+ kern_psignal(p->p_pptr, SIGCHLD);
else if (p->p_sigparent != 0) {
if (p->p_sigparent == SIGCHLD)
childproc_exited(p);
else /* LINUX thread */
- psignal(p->p_pptr, p->p_sigparent);
+ kern_psignal(p->p_pptr, p->p_sigparent);
}
#ifdef PROCDESC
} else
@@ -568,7 +568,7 @@ struct abort2_args {
#endif
int
-abort2(struct thread *td, struct abort2_args *uap)
+sys_abort2(struct thread *td, struct abort2_args *uap)
{
struct proc *p = td->td_proc;
struct sbuf *sb;
@@ -656,7 +656,7 @@ owait(struct thread *td, struct owait_args *uap __unused)
* The dirty work is handled by kern_wait().
*/
int
-wait4(struct thread *td, struct wait_args *uap)
+sys_wait4(struct thread *td, struct wait_args *uap)
{
struct rusage ru, *rup;
int error, status;
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 32d0055..df2b725 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -102,7 +102,7 @@ struct fork_args {
/* ARGSUSED */
int
-fork(struct thread *td, struct fork_args *uap)
+sys_fork(struct thread *td, struct fork_args *uap)
{
int error;
struct proc *p2;
@@ -117,7 +117,7 @@ fork(struct thread *td, struct fork_args *uap)
/* ARGUSED */
int
-pdfork(td, uap)
+sys_pdfork(td, uap)
struct thread *td;
struct pdfork_args *uap;
{
@@ -145,7 +145,7 @@ pdfork(td, uap)
/* ARGSUSED */
int
-vfork(struct thread *td, struct vfork_args *uap)
+sys_vfork(struct thread *td, struct vfork_args *uap)
{
int error, flags;
struct proc *p2;
@@ -164,7 +164,7 @@ vfork(struct thread *td, struct vfork_args *uap)
}
int
-rfork(struct thread *td, struct rfork_args *uap)
+sys_rfork(struct thread *td, struct rfork_args *uap)
{
struct proc *p2;
int error;
@@ -559,7 +559,7 @@ do_fork(struct thread *td, int flags, struct proc *p2, struct thread *td2,
* to commit suicide.
*/
PROC_LOCK(p2);
- psignal(p2, SIGKILL);
+ kern_psignal(p2, SIGKILL);
PROC_UNLOCK(p2);
} else
PROC_UNLOCK(p1->p_leader);
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 8ce8327..37a2c59 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -276,7 +276,7 @@ qcmp_v6(const void *ip1, const void *ip2)
* };
*/
int
-jail(struct thread *td, struct jail_args *uap)
+sys_jail(struct thread *td, struct jail_args *uap)
{
uint32_t version;
int error;
@@ -489,7 +489,7 @@ kern_jail(struct thread *td, struct jail *j)
* };
*/
int
-jail_set(struct thread *td, struct jail_set_args *uap)
+sys_jail_set(struct thread *td, struct jail_set_args *uap)
{
struct uio *auio;
int error;
@@ -1819,7 +1819,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
* };
*/
int
-jail_get(struct thread *td, struct jail_get_args *uap)
+sys_jail_get(struct thread *td, struct jail_get_args *uap)
{
struct uio *auio;
int error;
@@ -2119,7 +2119,7 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags)
* };
*/
int
-jail_remove(struct thread *td, struct jail_remove_args *uap)
+sys_jail_remove(struct thread *td, struct jail_remove_args *uap)
{
struct prison *pr, *cpr, *lpr, *tpr;
int descend, error;
@@ -2206,7 +2206,7 @@ prison_remove_one(struct prison *pr)
PROC_LOCK(p);
if (p->p_state != PRS_NEW && p->p_ucred &&
p->p_ucred->cr_prison == pr)
- psignal(p, SIGKILL);
+ kern_psignal(p, SIGKILL);
PROC_UNLOCK(p);
}
sx_sunlock(&allproc_lock);
@@ -2221,7 +2221,7 @@ prison_remove_one(struct prison *pr)
* };
*/
int
-jail_attach(struct thread *td, struct jail_attach_args *uap)
+sys_jail_attach(struct thread *td, struct jail_attach_args *uap)
{
struct prison *pr;
int error;
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 5db5aee..0f1ad91 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -782,7 +782,7 @@ struct ktrace_args {
#endif
/* ARGSUSED */
int
-ktrace(td, uap)
+sys_ktrace(td, uap)
struct thread *td;
register struct ktrace_args *uap;
{
@@ -936,7 +936,7 @@ done:
/* ARGSUSED */
int
-utrace(td, uap)
+sys_utrace(td, uap)
struct thread *td;
register struct utrace_args *uap;
{
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 4337c95..5c5bfbd 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1045,7 +1045,7 @@ done:
}
int
-kldload(struct thread *td, struct kldload_args *uap)
+sys_kldload(struct thread *td, struct kldload_args *uap)
{
char *pathname = NULL;
int error, fileid;
@@ -1125,14 +1125,14 @@ kern_kldunload(struct thread *td, int fileid, int flags)
}
int
-kldunload(struct thread *td, struct kldunload_args *uap)
+sys_kldunload(struct thread *td, struct kldunload_args *uap)
{
return (kern_kldunload(td, uap->fileid, LINKER_UNLOAD_NORMAL));
}
int
-kldunloadf(struct thread *td, struct kldunloadf_args *uap)
+sys_kldunloadf(struct thread *td, struct kldunloadf_args *uap)
{
if (uap->flags != LINKER_UNLOAD_NORMAL &&
@@ -1142,7 +1142,7 @@ kldunloadf(struct thread *td, struct kldunloadf_args *uap)
}
int
-kldfind(struct thread *td, struct kldfind_args *uap)
+sys_kldfind(struct thread *td, struct kldfind_args *uap)
{
char *pathname;
const char *filename;
@@ -1175,7 +1175,7 @@ out:
}
int
-kldnext(struct thread *td, struct kldnext_args *uap)
+sys_kldnext(struct thread *td, struct kldnext_args *uap)
{
linker_file_t lf;
int error = 0;
@@ -1212,7 +1212,7 @@ out:
}
int
-kldstat(struct thread *td, struct kldstat_args *uap)
+sys_kldstat(struct thread *td, struct kldstat_args *uap)
{
struct kld_file_stat stat;
int error, version;
@@ -1274,7 +1274,7 @@ kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat)
}
int
-kldfirstmod(struct thread *td, struct kldfirstmod_args *uap)
+sys_kldfirstmod(struct thread *td, struct kldfirstmod_args *uap)
{
linker_file_t lf;
module_t mp;
@@ -1303,7 +1303,7 @@ kldfirstmod(struct thread *td, struct kldfirstmod_args *uap)
}
int
-kldsym(struct thread *td, struct kldsym_args *uap)
+sys_kldsym(struct thread *td, struct kldsym_args *uap)
{
char *symstr = NULL;
c_linker_sym_t sym;
diff --git a/sys/kern/kern_loginclass.c b/sys/kern/kern_loginclass.c
index d980246..beac93b 100644
--- a/sys/kern/kern_loginclass.c
+++ b/sys/kern/kern_loginclass.c
@@ -152,7 +152,7 @@ struct getloginclass_args {
#endif
/* ARGSUSED */
int
-getloginclass(struct thread *td, struct getloginclass_args *uap)
+sys_getloginclass(struct thread *td, struct getloginclass_args *uap)
{
int error = 0;
size_t lcnamelen;
@@ -184,7 +184,7 @@ struct setloginclass_args {
#endif
/* ARGSUSED */
int
-setloginclass(struct thread *td, struct setloginclass_args *uap)
+sys_setloginclass(struct thread *td, struct setloginclass_args *uap)
{
struct proc *p = td->td_proc;
int error;
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index 98c6962..3f13373 100644
--- a/sys/kern/kern_module.c
+++ b/sys/kern/kern_module.c
@@ -310,7 +310,7 @@ module_file(module_t mod)
* Syscalls.
*/
int
-modnext(struct thread *td, struct modnext_args *uap)
+sys_modnext(struct thread *td, struct modnext_args *uap)
{
module_t mod;
int error = 0;
@@ -341,7 +341,7 @@ done2:
}
int
-modfnext(struct thread *td, struct modfnext_args *uap)
+sys_modfnext(struct thread *td, struct modfnext_args *uap)
{
module_t mod;
int error;
@@ -371,7 +371,7 @@ struct module_stat_v1 {
};
int
-modstat(struct thread *td, struct modstat_args *uap)
+sys_modstat(struct thread *td, struct modstat_args *uap)
{
module_t mod;
modspecific_t data;
@@ -424,7 +424,7 @@ modstat(struct thread *td, struct modstat_args *uap)
}
int
-modfind(struct thread *td, struct modfind_args *uap)
+sys_modfind(struct thread *td, struct modfind_args *uap)
{
int error = 0;
char name[MAXMODNAME];
diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c
index 9ca3690..1e56acf 100644
--- a/sys/kern/kern_ntptime.c
+++ b/sys/kern/kern_ntptime.c
@@ -274,7 +274,7 @@ struct ntp_gettime_args {
#endif
/* ARGSUSED */
int
-ntp_gettime(struct thread *td, struct ntp_gettime_args *uap)
+sys_ntp_gettime(struct thread *td, struct ntp_gettime_args *uap)
{
struct ntptimeval ntv;
@@ -324,7 +324,7 @@ struct ntp_adjtime_args {
#endif
int
-ntp_adjtime(struct thread *td, struct ntp_adjtime_args *uap)
+sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_args *uap)
{
struct timex ntv; /* temporary structure */
long freq; /* frequency ns/s) */
@@ -932,7 +932,7 @@ struct adjtime_args {
#endif
/* ARGSUSED */
int
-adjtime(struct thread *td, struct adjtime_args *uap)
+sys_adjtime(struct thread *td, struct adjtime_args *uap)
{
struct timeval delta, olddelta, *deltap;
int error;
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index c84c5ae..998e7ca 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -608,8 +608,8 @@ orphanpg(pg)
PROC_UNLOCK(p);
LIST_FOREACH(p, &pg->pg_members, p_pglist) {
PROC_LOCK(p);
- psignal(p, SIGHUP);
- psignal(p, SIGCONT);
+ kern_psignal(p, SIGHUP);
+ kern_psignal(p, SIGCONT);
PROC_UNLOCK(p);
}
return;
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 52db659..cf93984 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -99,7 +99,7 @@ struct getpid_args {
#endif
/* ARGSUSED */
int
-getpid(struct thread *td, struct getpid_args *uap)
+sys_getpid(struct thread *td, struct getpid_args *uap)
{
struct proc *p = td->td_proc;
@@ -119,7 +119,7 @@ struct getppid_args {
#endif
/* ARGSUSED */
int
-getppid(struct thread *td, struct getppid_args *uap)
+sys_getppid(struct thread *td, struct getppid_args *uap)
{
struct proc *p = td->td_proc;
@@ -138,7 +138,7 @@ struct getpgrp_args {
};
#endif
int
-getpgrp(struct thread *td, struct getpgrp_args *uap)
+sys_getpgrp(struct thread *td, struct getpgrp_args *uap)
{
struct proc *p = td->td_proc;
@@ -155,7 +155,7 @@ struct getpgid_args {
};
#endif
int
-getpgid(struct thread *td, struct getpgid_args *uap)
+sys_getpgid(struct thread *td, struct getpgid_args *uap)
{
struct proc *p;
int error;
@@ -187,7 +187,7 @@ struct getsid_args {
};
#endif
int
-getsid(struct thread *td, struct getsid_args *uap)
+sys_getsid(struct thread *td, struct getsid_args *uap)
{
struct proc *p;
int error;
@@ -217,7 +217,7 @@ struct getuid_args {
#endif
/* ARGSUSED */
int
-getuid(struct thread *td, struct getuid_args *uap)
+sys_getuid(struct thread *td, struct getuid_args *uap)
{
td->td_retval[0] = td->td_ucred->cr_ruid;
@@ -234,7 +234,7 @@ struct geteuid_args {
#endif
/* ARGSUSED */
int
-geteuid(struct thread *td, struct geteuid_args *uap)
+sys_geteuid(struct thread *td, struct geteuid_args *uap)
{
td->td_retval[0] = td->td_ucred->cr_uid;
@@ -248,7 +248,7 @@ struct getgid_args {
#endif
/* ARGSUSED */
int
-getgid(struct thread *td, struct getgid_args *uap)
+sys_getgid(struct thread *td, struct getgid_args *uap)
{
td->td_retval[0] = td->td_ucred->cr_rgid;
@@ -270,7 +270,7 @@ struct getegid_args {
#endif
/* ARGSUSED */
int
-getegid(struct thread *td, struct getegid_args *uap)
+sys_getegid(struct thread *td, struct getegid_args *uap)
{
td->td_retval[0] = td->td_ucred->cr_groups[0];
@@ -284,7 +284,7 @@ struct getgroups_args {
};
#endif
int
-getgroups(struct thread *td, register struct getgroups_args *uap)
+sys_getgroups(struct thread *td, register struct getgroups_args *uap)
{
gid_t *groups;
u_int ngrp;
@@ -334,7 +334,7 @@ struct setsid_args {
#endif
/* ARGSUSED */
int
-setsid(register struct thread *td, struct setsid_args *uap)
+sys_setsid(register struct thread *td, struct setsid_args *uap)
{
struct pgrp *pgrp;
int error;
@@ -392,7 +392,7 @@ struct setpgid_args {
#endif
/* ARGSUSED */
int
-setpgid(struct thread *td, register struct setpgid_args *uap)
+sys_setpgid(struct thread *td, register struct setpgid_args *uap)
{
struct proc *curp = td->td_proc;
register struct proc *targp; /* target process */
@@ -492,7 +492,7 @@ struct setuid_args {
#endif
/* ARGSUSED */
int
-setuid(struct thread *td, struct setuid_args *uap)
+sys_setuid(struct thread *td, struct setuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -606,7 +606,7 @@ struct seteuid_args {
#endif
/* ARGSUSED */
int
-seteuid(struct thread *td, struct seteuid_args *uap)
+sys_seteuid(struct thread *td, struct seteuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -662,7 +662,7 @@ struct setgid_args {
#endif
/* ARGSUSED */
int
-setgid(struct thread *td, struct setgid_args *uap)
+sys_setgid(struct thread *td, struct setgid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -760,7 +760,7 @@ struct setegid_args {
#endif
/* ARGSUSED */
int
-setegid(struct thread *td, struct setegid_args *uap)
+sys_setegid(struct thread *td, struct setegid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -807,7 +807,7 @@ struct setgroups_args {
#endif
/* ARGSUSED */
int
-setgroups(struct thread *td, struct setgroups_args *uap)
+sys_setgroups(struct thread *td, struct setgroups_args *uap)
{
gid_t *groups = NULL;
int error;
@@ -880,7 +880,7 @@ struct setreuid_args {
#endif
/* ARGSUSED */
int
-setreuid(register struct thread *td, struct setreuid_args *uap)
+sys_setreuid(register struct thread *td, struct setreuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -950,7 +950,7 @@ struct setregid_args {
#endif
/* ARGSUSED */
int
-setregid(register struct thread *td, struct setregid_args *uap)
+sys_setregid(register struct thread *td, struct setregid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -1015,7 +1015,7 @@ struct setresuid_args {
#endif
/* ARGSUSED */
int
-setresuid(register struct thread *td, struct setresuid_args *uap)
+sys_setresuid(register struct thread *td, struct setresuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -1097,7 +1097,7 @@ struct setresgid_args {
#endif
/* ARGSUSED */
int
-setresgid(register struct thread *td, struct setresgid_args *uap)
+sys_setresgid(register struct thread *td, struct setresgid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -1164,7 +1164,7 @@ struct getresuid_args {
#endif
/* ARGSUSED */
int
-getresuid(register struct thread *td, struct getresuid_args *uap)
+sys_getresuid(register struct thread *td, struct getresuid_args *uap)
{
struct ucred *cred;
int error1 = 0, error2 = 0, error3 = 0;
@@ -1191,7 +1191,7 @@ struct getresgid_args {
#endif
/* ARGSUSED */
int
-getresgid(register struct thread *td, struct getresgid_args *uap)
+sys_getresgid(register struct thread *td, struct getresgid_args *uap)
{
struct ucred *cred;
int error1 = 0, error2 = 0, error3 = 0;
@@ -1216,7 +1216,7 @@ struct issetugid_args {
#endif
/* ARGSUSED */
int
-issetugid(register struct thread *td, struct issetugid_args *uap)
+sys_issetugid(register struct thread *td, struct issetugid_args *uap)
{
struct proc *p = td->td_proc;
@@ -1235,7 +1235,7 @@ issetugid(register struct thread *td, struct issetugid_args *uap)
}
int
-__setugid(struct thread *td, struct __setugid_args *uap)
+sys___setugid(struct thread *td, struct __setugid_args *uap)
{
#ifdef REGRESSION
struct proc *p;
@@ -2071,7 +2071,7 @@ struct getlogin_args {
#endif
/* ARGSUSED */
int
-getlogin(struct thread *td, struct getlogin_args *uap)
+sys_getlogin(struct thread *td, struct getlogin_args *uap)
{
int error;
char login[MAXLOGNAME];
@@ -2098,7 +2098,7 @@ struct setlogin_args {
#endif
/* ARGSUSED */
int
-setlogin(struct thread *td, struct setlogin_args *uap)
+sys_setlogin(struct thread *td, struct setlogin_args *uap)
{
struct proc *p = td->td_proc;
int error;
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c
index d60cae4..d5bd010 100644
--- a/sys/kern/kern_rctl.c
+++ b/sys/kern/kern_rctl.c
@@ -377,7 +377,7 @@ rctl_enforce(struct proc *p, int resource, uint64_t amount)
* We're using the fact that RCTL_ACTION_SIG* values
* are equal to their counterparts from sys/signal.h.
*/
- psignal(p, rule->rr_action);
+ kern_psignal(p, rule->rr_action);
link->rrl_exceeded = 1;
continue;
}
@@ -1242,7 +1242,7 @@ rctl_racct_to_sbuf(struct racct *racct, int sloppy)
}
int
-rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
+sys_rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
{
int error;
char *inputstr;
@@ -1338,7 +1338,7 @@ rctl_get_rules_callback(struct racct *racct, void *arg2, void *arg3)
}
int
-rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
+sys_rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
{
int error;
size_t bufsize = RCTL_DEFAULT_BUFSIZE;
@@ -1413,7 +1413,7 @@ again:
}
int
-rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
+sys_rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
{
int error;
size_t bufsize = RCTL_DEFAULT_BUFSIZE;
@@ -1487,7 +1487,7 @@ again:
}
int
-rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
+sys_rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
{
int error;
struct rctl_rule *rule;
@@ -1529,7 +1529,7 @@ out:
}
int
-rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
+sys_rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
{
int error;
struct rctl_rule *filter;
@@ -1801,35 +1801,35 @@ rctl_init(void)
#else /* !RCTL */
int
-rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
+sys_rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
{
return (ENOSYS);
}
int
-rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
+sys_rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
{
return (ENOSYS);
}
int
-rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
+sys_rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
{
return (ENOSYS);
}
int
-rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
+sys_rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
{
return (ENOSYS);
}
int
-rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
+sys_rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
{
return (ENOSYS);
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 78a25eb..e6e8021 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -89,7 +89,7 @@ struct getpriority_args {
};
#endif
int
-getpriority(td, uap)
+sys_getpriority(td, uap)
struct thread *td;
register struct getpriority_args *uap;
{
@@ -174,7 +174,7 @@ struct setpriority_args {
};
#endif
int
-setpriority(td, uap)
+sys_setpriority(td, uap)
struct thread *td;
struct setpriority_args *uap;
{
@@ -284,7 +284,7 @@ struct rtprio_thread_args {
};
#endif
int
-rtprio_thread(struct thread *td, struct rtprio_thread_args *uap)
+sys_rtprio_thread(struct thread *td, struct rtprio_thread_args *uap)
{
struct proc *p;
struct rtprio rtp;
@@ -358,7 +358,7 @@ struct rtprio_args {
};
#endif
int
-rtprio(td, uap)
+sys_rtprio(td, uap)
struct thread *td; /* curthread */
register struct rtprio_args *uap;
{
@@ -592,7 +592,7 @@ struct __setrlimit_args {
};
#endif
int
-setrlimit(td, uap)
+sys_setrlimit(td, uap)
struct thread *td;
register struct __setrlimit_args *uap;
{
@@ -632,7 +632,7 @@ lim_cb(void *arg)
} else {
if (p->p_cpulimit < rlim.rlim_max)
p->p_cpulimit += 5;
- psignal(p, SIGXCPU);
+ kern_psignal(p, SIGXCPU);
}
}
if ((p->p_flag & P_WEXIT) == 0)
@@ -771,7 +771,7 @@ struct __getrlimit_args {
#endif
/* ARGSUSED */
int
-getrlimit(td, uap)
+sys_getrlimit(td, uap)
struct thread *td;
register struct __getrlimit_args *uap;
{
@@ -950,7 +950,7 @@ struct getrusage_args {
};
#endif
int
-getrusage(td, uap)
+sys_getrusage(td, uap)
register struct thread *td;
register struct getrusage_args *uap;
{
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index c1e3dda..039ca7e 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -172,7 +172,7 @@ SYSINIT(shutdown_conf, SI_SUB_INTRINSIC, SI_ORDER_ANY, shutdown_conf, NULL);
*/
/* ARGSUSED */
int
-reboot(struct thread *td, struct reboot_args *uap)
+sys_reboot(struct thread *td, struct reboot_args *uap)
{
int error;
@@ -204,7 +204,7 @@ shutdown_nice(int howto)
/* Send a signal to init(8) and have it shutdown the world */
if (initproc != NULL) {
PROC_LOCK(initproc);
- psignal(initproc, SIGINT);
+ kern_psignal(initproc, SIGINT);
PROC_UNLOCK(initproc);
} else {
/* No init(8) running, so simply reboot */
@@ -327,7 +327,7 @@ kern_reboot(int howto)
#ifdef SW_WATCHDOG
wdog_kern_pat(WD_LASTVAL);
#endif
- sync(curthread, NULL);
+ sys_sync(curthread, NULL);
/*
* With soft updates, some buffers that are
@@ -355,7 +355,7 @@ kern_reboot(int howto)
#ifdef SW_WATCHDOG
wdog_kern_pat(WD_LASTVAL);
#endif
- sync(curthread, NULL);
+ sys_sync(curthread, NULL);
#ifdef PREEMPTION
/*
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 26ef0d7..8622b41 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -784,7 +784,7 @@ struct sigaction_args {
};
#endif
int
-sigaction(td, uap)
+sys_sigaction(td, uap)
struct thread *td;
register struct sigaction_args *uap;
{
@@ -1035,7 +1035,7 @@ struct sigprocmask_args {
};
#endif
int
-sigprocmask(td, uap)
+sys_sigprocmask(td, uap)
register struct thread *td;
struct sigprocmask_args *uap;
{
@@ -1080,7 +1080,7 @@ osigprocmask(td, uap)
#endif /* COMPAT_43 */
int
-sigwait(struct thread *td, struct sigwait_args *uap)
+sys_sigwait(struct thread *td, struct sigwait_args *uap)
{
ksiginfo_t ksi;
sigset_t set;
@@ -1106,7 +1106,7 @@ sigwait(struct thread *td, struct sigwait_args *uap)
}
int
-sigtimedwait(struct thread *td, struct sigtimedwait_args *uap)
+sys_sigtimedwait(struct thread *td, struct sigtimedwait_args *uap)
{
struct timespec ts;
struct timespec *timeout;
@@ -1140,7 +1140,7 @@ sigtimedwait(struct thread *td, struct sigtimedwait_args *uap)
}
int
-sigwaitinfo(struct thread *td, struct sigwaitinfo_args *uap)
+sys_sigwaitinfo(struct thread *td, struct sigwaitinfo_args *uap)
{
ksiginfo_t ksi;
sigset_t set;
@@ -1282,7 +1282,7 @@ struct sigpending_args {
};
#endif
int
-sigpending(td, uap)
+sys_sigpending(td, uap)
struct thread *td;
struct sigpending_args *uap;
{
@@ -1414,7 +1414,7 @@ struct sigsuspend_args {
#endif
/* ARGSUSED */
int
-sigsuspend(td, uap)
+sys_sigsuspend(td, uap)
struct thread *td;
struct sigsuspend_args *uap;
{
@@ -1533,7 +1533,7 @@ struct sigaltstack_args {
#endif
/* ARGSUSED */
int
-sigaltstack(td, uap)
+sys_sigaltstack(td, uap)
struct thread *td;
register struct sigaltstack_args *uap;
{
@@ -1660,7 +1660,7 @@ struct kill_args {
#endif
/* ARGSUSED */
int
-kill(struct thread *td, struct kill_args *uap)
+sys_kill(struct thread *td, struct kill_args *uap)
{
ksiginfo_t ksi;
struct proc *p;
@@ -1702,7 +1702,7 @@ kill(struct thread *td, struct kill_args *uap)
}
int
-pdkill(td, uap)
+sys_pdkill(td, uap)
struct thread *td;
struct pdkill_args *uap;
{
@@ -1721,7 +1721,7 @@ pdkill(td, uap)
AUDIT_ARG_PROCESS(p);
error = p_cansignal(td, p, uap->signum);
if (error == 0 && uap->signum)
- psignal(p, uap->signum);
+ kern_psignal(p, uap->signum);
PROC_UNLOCK(p);
return (error);
#else
@@ -1764,7 +1764,7 @@ struct sigqueue_args {
};
#endif
int
-sigqueue(struct thread *td, struct sigqueue_args *uap)
+sys_sigqueue(struct thread *td, struct sigqueue_args *uap)
{
ksiginfo_t ksi;
struct proc *p;
@@ -1952,7 +1952,7 @@ sigtd(struct proc *p, int sig, int prop)
* side effects of this unwise possibility.
*/
void
-psignal(struct proc *p, int sig)
+kern_psignal(struct proc *p, int sig)
{
ksiginfo_t ksi;
@@ -2826,7 +2826,7 @@ killproc(p, why)
log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, p->p_comm,
p->p_ucred ? p->p_ucred->cr_uid : -1, why);
p->p_flag |= P_WKILLED;
- psignal(p, SIGKILL);
+ kern_psignal(p, SIGKILL);
}
/*
@@ -3309,7 +3309,7 @@ nosys(td, args)
struct proc *p = td->td_proc;
PROC_LOCK(p);
- psignal(p, SIGSYS);
+ kern_psignal(p, SIGSYS);
PROC_UNLOCK(p);
return (ENOSYS);
}
@@ -3339,7 +3339,7 @@ pgsigio(sigiop, sig, checkctty)
if (sigio->sio_pgid > 0) {
PROC_LOCK(sigio->sio_proc);
if (CANSIGIO(sigio->sio_ucred, sigio->sio_proc->p_ucred))
- psignal(sigio->sio_proc, sig);
+ kern_psignal(sigio->sio_proc, sig);
PROC_UNLOCK(sigio->sio_proc);
} else if (sigio->sio_pgid < 0) {
struct proc *p;
@@ -3350,7 +3350,7 @@ pgsigio(sigiop, sig, checkctty)
if (p->p_state == PRS_NORMAL &&
CANSIGIO(sigio->sio_ucred, p->p_ucred) &&
(checkctty == 0 || (p->p_flag & P_CONTROLT)))
- psignal(p, sig);
+ kern_psignal(p, sig);
PROC_UNLOCK(p);
}
PGRP_UNLOCK(sigio->sio_pgrp);
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 05fb4a1..a2c26ae 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -573,7 +573,7 @@ kern_yield(int prio)
* General purpose yield system call.
*/
int
-yield(struct thread *td, struct yield_args *uap)
+sys_yield(struct thread *td, struct yield_args *uap)
{
thread_lock(td);
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 956bf0c..97d03a3 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1530,7 +1530,7 @@ struct sysctl_args {
};
#endif
int
-__sysctl(struct thread *td, struct sysctl_args *uap)
+sys___sysctl(struct thread *td, struct sysctl_args *uap)
{
int error, i, name[CTL_MAXNAME];
size_t j;
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 94e41e2..e997e48 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -97,7 +97,7 @@ static int create_thread(struct thread *td, mcontext_t *ctx,
* System call interface.
*/
int
-thr_create(struct thread *td, struct thr_create_args *uap)
+sys_thr_create(struct thread *td, struct thr_create_args *uap)
/* ucontext_t *ctx, long *id, int flags */
{
ucontext_t ctx;
@@ -112,7 +112,7 @@ thr_create(struct thread *td, struct thr_create_args *uap)
}
int
-thr_new(struct thread *td, struct thr_new_args *uap)
+sys_thr_new(struct thread *td, struct thr_new_args *uap)
/* struct thr_param * */
{
struct thr_param param;
@@ -288,7 +288,7 @@ fail:
}
int
-thr_self(struct thread *td, struct thr_self_args *uap)
+sys_thr_self(struct thread *td, struct thr_self_args *uap)
/* long *id */
{
int error;
@@ -300,7 +300,7 @@ thr_self(struct thread *td, struct thr_self_args *uap)
}
int
-thr_exit(struct thread *td, struct thr_exit_args *uap)
+sys_thr_exit(struct thread *td, struct thr_exit_args *uap)
/* long *state */
{
struct proc *p;
@@ -337,7 +337,7 @@ thr_exit(struct thread *td, struct thr_exit_args *uap)
}
int
-thr_kill(struct thread *td, struct thr_kill_args *uap)
+sys_thr_kill(struct thread *td, struct thr_kill_args *uap)
/* long id, int sig */
{
ksiginfo_t ksi;
@@ -384,7 +384,7 @@ thr_kill(struct thread *td, struct thr_kill_args *uap)
}
int
-thr_kill2(struct thread *td, struct thr_kill2_args *uap)
+sys_thr_kill2(struct thread *td, struct thr_kill2_args *uap)
/* pid_t pid, long id, int sig */
{
ksiginfo_t ksi;
@@ -441,7 +441,7 @@ thr_kill2(struct thread *td, struct thr_kill2_args *uap)
}
int
-thr_suspend(struct thread *td, struct thr_suspend_args *uap)
+sys_thr_suspend(struct thread *td, struct thr_suspend_args *uap)
/* const struct timespec *timeout */
{
struct timespec ts, *tsp;
@@ -506,7 +506,7 @@ kern_thr_suspend(struct thread *td, struct timespec *tsp)
}
int
-thr_wake(struct thread *td, struct thr_wake_args *uap)
+sys_thr_wake(struct thread *td, struct thr_wake_args *uap)
/* long id */
{
struct proc *p;
@@ -530,7 +530,7 @@ thr_wake(struct thread *td, struct thr_wake_args *uap)
}
int
-thr_set_name(struct thread *td, struct thr_set_name_args *uap)
+sys_thr_set_name(struct thread *td, struct thr_set_name_args *uap)
{
struct proc *p;
char name[MAXCOMLEN + 1];
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index a153fbc..4ba6117 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -172,7 +172,7 @@ struct clock_gettime_args {
#endif
/* ARGSUSED */
int
-clock_gettime(struct thread *td, struct clock_gettime_args *uap)
+sys_clock_gettime(struct thread *td, struct clock_gettime_args *uap)
{
struct timespec ats;
int error;
@@ -255,7 +255,7 @@ struct clock_settime_args {
#endif
/* ARGSUSED */
int
-clock_settime(struct thread *td, struct clock_settime_args *uap)
+sys_clock_settime(struct thread *td, struct clock_settime_args *uap)
{
struct timespec ats;
int error;
@@ -290,7 +290,7 @@ struct clock_getres_args {
};
#endif
int
-clock_getres(struct thread *td, struct clock_getres_args *uap)
+sys_clock_getres(struct thread *td, struct clock_getres_args *uap)
{
struct timespec ts;
int error;
@@ -394,7 +394,7 @@ struct nanosleep_args {
#endif
/* ARGSUSED */
int
-nanosleep(struct thread *td, struct nanosleep_args *uap)
+sys_nanosleep(struct thread *td, struct nanosleep_args *uap)
{
struct timespec rmt, rqt;
int error;
@@ -425,7 +425,7 @@ struct gettimeofday_args {
#endif
/* ARGSUSED */
int
-gettimeofday(struct thread *td, struct gettimeofday_args *uap)
+sys_gettimeofday(struct thread *td, struct gettimeofday_args *uap)
{
struct timeval atv;
struct timezone rtz;
@@ -451,7 +451,7 @@ struct settimeofday_args {
#endif
/* ARGSUSED */
int
-settimeofday(struct thread *td, struct settimeofday_args *uap)
+sys_settimeofday(struct thread *td, struct settimeofday_args *uap)
{
struct timeval atv, *tvp;
struct timezone atz, *tzp;
@@ -523,7 +523,7 @@ struct getitimer_args {
};
#endif
int
-getitimer(struct thread *td, struct getitimer_args *uap)
+sys_getitimer(struct thread *td, struct getitimer_args *uap)
{
struct itimerval aitv;
int error;
@@ -575,14 +575,14 @@ struct setitimer_args {
};
#endif
int
-setitimer(struct thread *td, struct setitimer_args *uap)
+sys_setitimer(struct thread *td, struct setitimer_args *uap)
{
struct itimerval aitv, oitv;
int error;
if (uap->itv == NULL) {
uap->itv = uap->oitv;
- return (getitimer(td, (struct getitimer_args *)uap));
+ return (sys_getitimer(td, (struct getitimer_args *)uap));
}
if ((error = copyin(uap->itv, &aitv, sizeof(struct itimerval))))
@@ -660,7 +660,7 @@ realitexpire(void *arg)
p = (struct proc *)arg;
PROC_LOCK(p);
- psignal(p, SIGALRM);
+ kern_psignal(p, SIGALRM);
if (!timevalisset(&p->p_realtimer.it_interval)) {
timevalclear(&p->p_realtimer.it_value);
if (p->p_flag & P_WEXIT)
@@ -923,7 +923,7 @@ struct ktimer_create_args {
};
#endif
int
-ktimer_create(struct thread *td, struct ktimer_create_args *uap)
+sys_ktimer_create(struct thread *td, struct ktimer_create_args *uap)
{
struct sigevent *evp1, ev;
int id;
@@ -1062,7 +1062,7 @@ struct ktimer_delete_args {
};
#endif
int
-ktimer_delete(struct thread *td, struct ktimer_delete_args *uap)
+sys_ktimer_delete(struct thread *td, struct ktimer_delete_args *uap)
{
return (kern_timer_delete(td, uap->timerid));
}
@@ -1127,7 +1127,7 @@ struct ktimer_settime_args {
};
#endif
int
-ktimer_settime(struct thread *td, struct ktimer_settime_args *uap)
+sys_ktimer_settime(struct thread *td, struct ktimer_settime_args *uap)
{
struct proc *p = td->td_proc;
struct itimer *it;
@@ -1168,7 +1168,7 @@ struct ktimer_gettime_args {
};
#endif
int
-ktimer_gettime(struct thread *td, struct ktimer_gettime_args *uap)
+sys_ktimer_gettime(struct thread *td, struct ktimer_gettime_args *uap)
{
struct proc *p = td->td_proc;
struct itimer *it;
@@ -1199,7 +1199,7 @@ struct timer_getoverrun_args {
};
#endif
int
-ktimer_getoverrun(struct thread *td, struct ktimer_getoverrun_args *uap)
+sys_ktimer_getoverrun(struct thread *td, struct ktimer_getoverrun_args *uap)
{
struct proc *p = td->td_proc;
struct itimer *it;
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index 1edff74..dfd6b12 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -2885,14 +2885,14 @@ do_sem_wake(struct thread *td, struct _usem *sem)
}
int
-_umtx_lock(struct thread *td, struct _umtx_lock_args *uap)
+sys__umtx_lock(struct thread *td, struct _umtx_lock_args *uap)
/* struct umtx *umtx */
{
return _do_lock_umtx(td, uap->umtx, td->td_tid, 0);
}
int
-_umtx_unlock(struct thread *td, struct _umtx_unlock_args *uap)
+sys__umtx_unlock(struct thread *td, struct _umtx_unlock_args *uap)
/* struct umtx *umtx */
{
return do_unlock_umtx(td, uap->umtx, td->td_tid);
@@ -3239,7 +3239,7 @@ static _umtx_op_func op_table[] = {
};
int
-_umtx_op(struct thread *td, struct _umtx_op_args *uap)
+sys__umtx_op(struct thread *td, struct _umtx_op_args *uap)
{
if ((unsigned)uap->op < UMTX_OP_MAX)
return (*op_table[uap->op])(td, uap);
diff --git a/sys/kern/kern_uuid.c b/sys/kern/kern_uuid.c
index 8c083f4..693bb25 100644
--- a/sys/kern/kern_uuid.c
+++ b/sys/kern/kern_uuid.c
@@ -187,7 +187,7 @@ struct uuidgen_args {
};
#endif
int
-uuidgen(struct thread *td, struct uuidgen_args *uap)
+sys_uuidgen(struct thread *td, struct uuidgen_args *uap)
{
struct uuid *store;
size_t count;
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh
index 835ffb2..d1162b5 100644
--- a/sys/kern/makesyscalls.sh
+++ b/sys/kern/makesyscalls.sh
@@ -424,8 +424,16 @@ s/\$//g
printf("struct %s {\n\tregister_t dummy;\n};\n",
argalias) > sysarg
if (!flag("NOPROTO") && !flag("NODEF")) {
- printf("%s\t%s(struct thread *, struct %s *)",
- rettype, funcname, argalias) > sysdcl
+ if (funcname == "nosys" || funcname == "lkmnosys" ||
+ funcname == "sysarch" || funcname ~ /^freebsd/ ||
+ funcname ~ /^linux/ || funcname ~ /^svr4/ ||
+ funcname ~ /^ibcs2/ || funcname ~ /^xenix/) {
+ printf("%s\t%s(struct thread *, struct %s *)",
+ rettype, funcname, argalias) > sysdcl
+ } else {
+ printf("%s\tsys_%s(struct thread *, struct %s *)",
+ rettype, funcname, argalias) > sysdcl
+ }
printf(";\n") > sysdcl
printf("#define\t%sAUE_%s\t%s\n", syscallprefix,
funcalias, auditev) > sysaue
@@ -436,8 +444,16 @@ s/\$//g
printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT") > sysent
column = column + length("lkmressys") + length("AUE_NULL") + 3
} else {
- printf("%s, %s, NULL, 0, 0, %s, %s },", funcname, auditev, flags, thr_flag) > sysent
- column = column + length(funcname) + length(auditev) + length(flags) + 3
+ if (funcname == "nosys" || funcname == "sysarch" ||
+ funcname == "lkmnosys" || funcname ~ /^freebsd/ ||
+ funcname ~ /^linux/ || funcname ~ /^svr4/ ||
+ funcname ~ /^ibcs2/ || funcname ~ /^xenix/) {
+ printf("%s, %s, NULL, 0, 0, %s, %s },", funcname, auditev, flags, thr_flag) > sysent
+ column = column + length(funcname) + length(auditev) + length(flags) + 3
+ } else {
+ printf("sys_%s, %s, NULL, 0, 0, %s, %s },", funcname, auditev, flags, thr_flag) > sysent
+ column = column + length(funcname) + length(auditev) + length(flags) + 3 + 4
+ }
}
align_sysent_comment(column)
printf("/* %d = %s */\n", syscall, funcalias) > sysent
diff --git a/sys/kern/p1003_1b.c b/sys/kern/p1003_1b.c
index 9620a36..fb89efc 100644
--- a/sys/kern/p1003_1b.c
+++ b/sys/kern/p1003_1b.c
@@ -108,7 +108,7 @@ sched_attach(void)
}
int
-sched_setparam(struct thread *td, struct sched_setparam_args *uap)
+sys_sched_setparam(struct thread *td, struct sched_setparam_args *uap)
{
struct thread *targettd;
struct proc *targetp;
@@ -140,7 +140,7 @@ sched_setparam(struct thread *td, struct sched_setparam_args *uap)
}
int
-sched_getparam(struct thread *td, struct sched_getparam_args *uap)
+sys_sched_getparam(struct thread *td, struct sched_getparam_args *uap)
{
int e;
struct sched_param sched_param;
@@ -170,7 +170,7 @@ sched_getparam(struct thread *td, struct sched_getparam_args *uap)
}
int
-sched_setscheduler(struct thread *td, struct sched_setscheduler_args *uap)
+sys_sched_setscheduler(struct thread *td, struct sched_setscheduler_args *uap)
{
int e;
struct sched_param sched_param;
@@ -207,7 +207,7 @@ sched_setscheduler(struct thread *td, struct sched_setscheduler_args *uap)
}
int
-sched_getscheduler(struct thread *td, struct sched_getscheduler_args *uap)
+sys_sched_getscheduler(struct thread *td, struct sched_getscheduler_args *uap)
{
int e, policy;
struct thread *targettd;
@@ -235,7 +235,7 @@ sched_getscheduler(struct thread *td, struct sched_getscheduler_args *uap)
}
int
-sched_yield(struct thread *td, struct sched_yield_args *uap)
+sys_sched_yield(struct thread *td, struct sched_yield_args *uap)
{
sched_relinquish(curthread);
@@ -243,7 +243,7 @@ sched_yield(struct thread *td, struct sched_yield_args *uap)
}
int
-sched_get_priority_max(struct thread *td,
+sys_sched_get_priority_max(struct thread *td,
struct sched_get_priority_max_args *uap)
{
int error, prio;
@@ -254,7 +254,7 @@ sched_get_priority_max(struct thread *td,
}
int
-sched_get_priority_min(struct thread *td,
+sys_sched_get_priority_min(struct thread *td,
struct sched_get_priority_min_args *uap)
{
int error, prio;
@@ -265,7 +265,7 @@ sched_get_priority_min(struct thread *td,
}
int
-sched_rr_get_interval(struct thread *td,
+sys_sched_rr_get_interval(struct thread *td,
struct sched_rr_get_interval_args *uap)
{
struct timespec timespec;
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index c947735..e688ca0 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -574,7 +574,7 @@ devctl_queue_data_f(char *data, int flags)
p = devsoftc.async_proc;
if (p != NULL) {
PROC_LOCK(p);
- psignal(p, SIGIO);
+ kern_psignal(p, SIGIO);
PROC_UNLOCK(p);
}
return;
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c
index be98d44..7ff5414 100644
--- a/sys/kern/subr_prof.c
+++ b/sys/kern/subr_prof.c
@@ -223,8 +223,8 @@ kmstartup(dummy)
startguprof(p);
for (i = 0; i < CALIB_SCALE; i++)
- MCOUNT_OVERHEAD(profil);
- mcount_overhead = KCOUNT(p, PC_TO_I(p, profil));
+ MCOUNT_OVERHEAD(sys_profil);
+ mcount_overhead = KCOUNT(p, PC_TO_I(p, sys_profil));
startguprof(p);
for (i = 0; i < CALIB_SCALE; i++)
@@ -404,7 +404,7 @@ struct profil_args {
#endif
/* ARGSUSED */
int
-profil(struct thread *td, struct profil_args *uap)
+sys_profil(struct thread *td, struct profil_args *uap)
{
struct uprof *upp;
struct proc *p;
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 42adf80..d13e487 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -192,12 +192,12 @@ ast(struct trapframe *framep)
}
if (flags & TDF_ALRMPEND) {
PROC_LOCK(p);
- psignal(p, SIGVTALRM);
+ kern_psignal(p, SIGVTALRM);
PROC_UNLOCK(p);
}
if (flags & TDF_PROFPEND) {
PROC_LOCK(p);
- psignal(p, SIGPROF);
+ kern_psignal(p, SIGPROF);
PROC_UNLOCK(p);
}
#ifdef MAC
diff --git a/sys/kern/sys_capability.c b/sys/kern/sys_capability.c
index 318ffe4..2318b12 100644
--- a/sys/kern/sys_capability.c
+++ b/sys/kern/sys_capability.c
@@ -82,7 +82,7 @@ FEATURE(security_capability_mode, "Capsicum Capability Mode");
* System call to enter capability mode for the process.
*/
int
-cap_enter(struct thread *td, struct cap_enter_args *uap)
+sys_cap_enter(struct thread *td, struct cap_enter_args *uap)
{
struct ucred *newcred, *oldcred;
struct proc *p;
@@ -106,7 +106,7 @@ cap_enter(struct thread *td, struct cap_enter_args *uap)
* System call to query whether the process is in capability mode.
*/
int
-cap_getmode(struct thread *td, struct cap_getmode_args *uap)
+sys_cap_getmode(struct thread *td, struct cap_getmode_args *uap)
{
u_int i;
@@ -117,14 +117,14 @@ cap_getmode(struct thread *td, struct cap_getmode_args *uap)
#else /* !CAPABILITY_MODE */
int
-cap_enter(struct thread *td, struct cap_enter_args *uap)
+sys_cap_enter(struct thread *td, struct cap_enter_args *uap)
{
return (ENOSYS);
}
int
-cap_getmode(struct thread *td, struct cap_getmode_args *uap)
+sys_cap_getmode(struct thread *td, struct cap_getmode_args *uap)
{
return (ENOSYS);
@@ -239,7 +239,7 @@ cap_rights(struct file *fp_cap)
* file object or an an existing capability.
*/
int
-cap_new(struct thread *td, struct cap_new_args *uap)
+sys_cap_new(struct thread *td, struct cap_new_args *uap)
{
int error, capfd;
int fd = uap->fd;
@@ -269,7 +269,7 @@ cap_new(struct thread *td, struct cap_new_args *uap)
* System call to query the rights mask associated with a capability.
*/
int
-cap_getrights(struct thread *td, struct cap_getrights_args *uap)
+sys_cap_getrights(struct thread *td, struct cap_getrights_args *uap)
{
struct capability *cp;
struct file *fp;
@@ -513,14 +513,14 @@ capability_chown(struct file *fp, uid_t uid, gid_t gid,
* into the kernel.
*/
int
-cap_new(struct thread *td, struct cap_new_args *uap)
+sys_cap_new(struct thread *td, struct cap_new_args *uap)
{
return (ENOSYS);
}
int
-cap_getrights(struct thread *td, struct cap_getrights_args *uap)
+sys_cap_getrights(struct thread *td, struct cap_getrights_args *uap)
{
return (ENOSYS);
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 7b45efa..8d4ba09 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -137,7 +137,7 @@ struct read_args {
};
#endif
int
-read(td, uap)
+sys_read(td, uap)
struct thread *td;
struct read_args *uap;
{
@@ -170,7 +170,7 @@ struct pread_args {
};
#endif
int
-pread(td, uap)
+sys_pread(td, uap)
struct thread *td;
struct pread_args *uap;
{
@@ -201,7 +201,7 @@ freebsd6_pread(td, uap)
oargs.buf = uap->buf;
oargs.nbyte = uap->nbyte;
oargs.offset = uap->offset;
- return (pread(td, &oargs));
+ return (sys_pread(td, &oargs));
}
/*
@@ -215,7 +215,7 @@ struct readv_args {
};
#endif
int
-readv(struct thread *td, struct readv_args *uap)
+sys_readv(struct thread *td, struct readv_args *uap)
{
struct uio *auio;
int error;
@@ -254,7 +254,7 @@ struct preadv_args {
};
#endif
int
-preadv(struct thread *td, struct preadv_args *uap)
+sys_preadv(struct thread *td, struct preadv_args *uap)
{
struct uio *auio;
int error;
@@ -346,7 +346,7 @@ struct write_args {
};
#endif
int
-write(td, uap)
+sys_write(td, uap)
struct thread *td;
struct write_args *uap;
{
@@ -379,7 +379,7 @@ struct pwrite_args {
};
#endif
int
-pwrite(td, uap)
+sys_pwrite(td, uap)
struct thread *td;
struct pwrite_args *uap;
{
@@ -410,7 +410,7 @@ freebsd6_pwrite(td, uap)
oargs.buf = uap->buf;
oargs.nbyte = uap->nbyte;
oargs.offset = uap->offset;
- return (pwrite(td, &oargs));
+ return (sys_pwrite(td, &oargs));
}
/*
@@ -424,7 +424,7 @@ struct writev_args {
};
#endif
int
-writev(struct thread *td, struct writev_args *uap)
+sys_writev(struct thread *td, struct writev_args *uap)
{
struct uio *auio;
int error;
@@ -463,7 +463,7 @@ struct pwritev_args {
};
#endif
int
-pwritev(struct thread *td, struct pwritev_args *uap)
+sys_pwritev(struct thread *td, struct pwritev_args *uap)
{
struct uio *auio;
int error;
@@ -589,7 +589,7 @@ struct ftruncate_args {
};
#endif
int
-ftruncate(td, uap)
+sys_ftruncate(td, uap)
struct thread *td;
struct ftruncate_args *uap;
{
@@ -623,7 +623,7 @@ struct ioctl_args {
#endif
/* ARGSUSED */
int
-ioctl(struct thread *td, struct ioctl_args *uap)
+sys_ioctl(struct thread *td, struct ioctl_args *uap)
{
u_long com;
int arg, error;
@@ -755,7 +755,7 @@ poll_no_poll(int events)
}
int
-pselect(struct thread *td, struct pselect_args *uap)
+sys_pselect(struct thread *td, struct pselect_args *uap)
{
struct timespec ts;
struct timeval tv, *tvp;
@@ -814,7 +814,7 @@ struct select_args {
};
#endif
int
-select(struct thread *td, struct select_args *uap)
+sys_select(struct thread *td, struct select_args *uap)
{
struct timeval tv, *tvp;
int error;
@@ -1178,7 +1178,7 @@ struct poll_args {
};
#endif
int
-poll(td, uap)
+sys_poll(td, uap)
struct thread *td;
struct poll_args *uap;
{
@@ -1396,11 +1396,11 @@ struct openbsd_poll_args {
};
#endif
int
-openbsd_poll(td, uap)
+sys_openbsd_poll(td, uap)
register struct thread *td;
register struct openbsd_poll_args *uap;
{
- return (poll(td, (struct poll_args *)uap));
+ return (sys_poll(td, (struct poll_args *)uap));
}
/*
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index c44a2c9..b7ae521 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -385,7 +385,7 @@ kern_pipe(struct thread *td, int fildes[2])
/* ARGSUSED */
int
-pipe(struct thread *td, struct pipe_args *uap)
+sys_pipe(struct thread *td, struct pipe_args *uap)
{
int error;
int fildes[2];
diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c
index 9993732..08d345f 100644
--- a/sys/kern/sys_procdesc.c
+++ b/sys/kern/sys_procdesc.c
@@ -206,7 +206,7 @@ out:
* System call to return the pid of a process given its process descriptor.
*/
int
-pdgetpid(struct thread *td, struct pdgetpid_args *uap)
+sys_pdgetpid(struct thread *td, struct pdgetpid_args *uap)
{
pid_t pid;
int error;
@@ -387,7 +387,7 @@ procdesc_close(struct file *fp, struct thread *td)
p->p_sigparent = SIGCHLD;
proc_reparent(p, initproc);
if ((pd->pd_flags & PD_DAEMON) == 0)
- psignal(p, SIGKILL);
+ kern_psignal(p, SIGKILL);
PROC_UNLOCK(p);
sx_xunlock(&proctree_lock);
}
@@ -515,7 +515,7 @@ procdesc_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
#else /* !PROCDESC */
int
-pdgetpid(struct thread *td, struct pdgetpid_args *uap)
+sys_pdgetpid(struct thread *td, struct pdgetpid_args *uap)
{
return (ENOSYS);
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index ee36b35..4510380 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -515,7 +515,7 @@ struct ptrace_args {
#define COPYOUT(k, u, s) copyout(k, u, s)
#endif
int
-ptrace(struct thread *td, struct ptrace_args *uap)
+sys_ptrace(struct thread *td, struct ptrace_args *uap)
{
/*
* XXX this obfuscation is to reduce stack usage, but the register
@@ -972,7 +972,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
PROC_SUNLOCK(p);
} else {
if (data)
- psignal(p, data);
+ kern_psignal(p, data);
}
break;
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index ffd8580..d58cb7e 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -81,6 +81,7 @@ static int msginit(void);
static int msgunload(void);
static int sysvmsg_modload(struct module *, int, void *);
+
#ifdef MSG_DEBUG
#define DPRINTF(a) printf a
#else
@@ -163,7 +164,7 @@ static struct syscall_helper_data msg_syscalls[] = {
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
SYSCALL_INIT_HELPER(msgsys),
- SYSCALL_INIT_HELPER(freebsd7_msgctl),
+ SYSCALL_INIT_HELPER_COMPAT(freebsd7_msgctl),
#endif
SYSCALL_INIT_LAST
};
@@ -180,7 +181,7 @@ static struct syscall_helper_data msg32_syscalls[] = {
SYSCALL32_INIT_HELPER(freebsd32_msgctl),
SYSCALL32_INIT_HELPER(freebsd32_msgsnd),
SYSCALL32_INIT_HELPER(freebsd32_msgrcv),
- SYSCALL32_INIT_HELPER(msgget),
+ SYSCALL32_INIT_HELPER_COMPAT(msgget),
SYSCALL32_INIT_HELPER(freebsd32_msgsys),
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
@@ -379,7 +380,7 @@ struct msgctl_args {
};
#endif
int
-msgctl(td, uap)
+sys_msgctl(td, uap)
struct thread *td;
register struct msgctl_args *uap;
{
@@ -555,8 +556,9 @@ struct msgget_args {
int msgflg;
};
#endif
+
int
-msgget(td, uap)
+sys_msgget(td, uap)
struct thread *td;
register struct msgget_args *uap;
{
@@ -1011,7 +1013,7 @@ done2:
}
int
-msgsnd(td, uap)
+sys_msgsnd(td, uap)
struct thread *td;
register struct msgsnd_args *uap;
{
@@ -1296,7 +1298,7 @@ done2:
}
int
-msgrcv(td, uap)
+sys_msgrcv(td, uap)
struct thread *td;
register struct msgrcv_args *uap;
{
@@ -1356,7 +1358,7 @@ freebsd32_msgsys(struct thread *td, struct freebsd32_msgsys_args *uap)
return (freebsd32_msgrcv(td,
(struct freebsd32_msgrcv_args *)&uap->a2));
default:
- return (msgsys(td, (struct msgsys_args *)uap));
+ return (sys_msgsys(td, (struct msgsys_args *)uap));
}
#else
return (nosys(td, NULL));
@@ -1494,15 +1496,15 @@ freebsd32_msgrcv(struct thread *td, struct freebsd32_msgrcv_args *uap)
/* XXX casting to (sy_call_t *) is bogus, as usual. */
static sy_call_t *msgcalls[] = {
- (sy_call_t *)freebsd7_msgctl, (sy_call_t *)msgget,
- (sy_call_t *)msgsnd, (sy_call_t *)msgrcv
+ (sy_call_t *)freebsd7_msgctl, (sy_call_t *)sys_msgget,
+ (sy_call_t *)sys_msgsnd, (sy_call_t *)sys_msgrcv
};
/*
* Entry point for all MSG calls.
*/
int
-msgsys(td, uap)
+sys_msgsys(td, uap)
struct thread *td;
/* XXX actually varargs. */
struct msgsys_args /* {
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index 4a4c479..f9ff217 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -218,7 +218,7 @@ static struct syscall_helper_data sem_syscalls[] = {
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
SYSCALL_INIT_HELPER(semsys),
- SYSCALL_INIT_HELPER(freebsd7___semctl),
+ SYSCALL_INIT_HELPER_COMPAT(freebsd7___semctl),
#endif
SYSCALL_INIT_LAST
};
@@ -233,8 +233,8 @@ static struct syscall_helper_data sem_syscalls[] = {
static struct syscall_helper_data sem32_syscalls[] = {
SYSCALL32_INIT_HELPER(freebsd32_semctl),
- SYSCALL32_INIT_HELPER(semget),
- SYSCALL32_INIT_HELPER(semop),
+ SYSCALL32_INIT_HELPER_COMPAT(semget),
+ SYSCALL32_INIT_HELPER_COMPAT(semop),
SYSCALL32_INIT_HELPER(freebsd32_semsys),
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
@@ -518,7 +518,7 @@ struct __semctl_args {
};
#endif
int
-__semctl(struct thread *td, struct __semctl_args *uap)
+sys___semctl(struct thread *td, struct __semctl_args *uap)
{
struct semid_ds dsbuf;
union semun arg, semun;
@@ -856,7 +856,7 @@ struct semget_args {
};
#endif
int
-semget(struct thread *td, struct semget_args *uap)
+sys_semget(struct thread *td, struct semget_args *uap)
{
int semid, error = 0;
int key = uap->key;
@@ -980,7 +980,7 @@ struct semop_args {
};
#endif
int
-semop(struct thread *td, struct semop_args *uap)
+sys_semop(struct thread *td, struct semop_args *uap)
{
#define SMALL_SOPS 8
struct sembuf small_sops[SMALL_SOPS];
@@ -1382,15 +1382,15 @@ sysctl_sema(SYSCTL_HANDLER_ARGS)
/* XXX casting to (sy_call_t *) is bogus, as usual. */
static sy_call_t *semcalls[] = {
- (sy_call_t *)freebsd7___semctl, (sy_call_t *)semget,
- (sy_call_t *)semop
+ (sy_call_t *)freebsd7___semctl, (sy_call_t *)sys_semget,
+ (sy_call_t *)sys_semop
};
/*
* Entry point for all SEM calls.
*/
int
-semsys(td, uap)
+sys_semsys(td, uap)
struct thread *td;
/* XXX actually varargs. */
struct semsys_args /* {
@@ -1510,7 +1510,7 @@ freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap)
return (freebsd7_freebsd32_semctl(td,
(struct freebsd7_freebsd32_semctl_args *)&uap->a2));
default:
- return (semsys(td, (struct semsys_args *)uap));
+ return (sys_semsys(td, (struct semsys_args *)uap));
}
#else
return (nosys(td, NULL));
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index 1741a21..2bad484 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -284,7 +284,7 @@ struct shmdt_args {
};
#endif
int
-shmdt(td, uap)
+sys_shmdt(td, uap)
struct thread *td;
struct shmdt_args *uap;
{
@@ -434,7 +434,7 @@ done2:
}
int
-shmat(td, uap)
+sys_shmat(td, uap)
struct thread *td;
struct shmat_args *uap;
{
@@ -559,7 +559,7 @@ struct shmctl_args {
};
#endif
int
-shmctl(td, uap)
+sys_shmctl(td, uap)
struct thread *td;
struct shmctl_args *uap;
{
@@ -750,7 +750,7 @@ struct shmget_args {
};
#endif
int
-shmget(td, uap)
+sys_shmget(td, uap)
struct thread *td;
struct shmget_args *uap;
{
@@ -851,7 +851,7 @@ static struct syscall_helper_data shm_syscalls[] = {
SYSCALL_INIT_HELPER(shmget),
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
- SYSCALL_INIT_HELPER(freebsd7_shmctl),
+ SYSCALL_INIT_HELPER_COMPAT(freebsd7_shmctl),
#endif
#if defined(__i386__) && (defined(COMPAT_FREEBSD4) || defined(COMPAT_43))
SYSCALL_INIT_HELPER(shmsys),
@@ -868,9 +868,9 @@ static struct syscall_helper_data shm_syscalls[] = {
#include <compat/freebsd32/freebsd32_util.h>
static struct syscall_helper_data shm32_syscalls[] = {
- SYSCALL32_INIT_HELPER(shmat),
- SYSCALL32_INIT_HELPER(shmdt),
- SYSCALL32_INIT_HELPER(shmget),
+ SYSCALL32_INIT_HELPER_COMPAT(shmat),
+ SYSCALL32_INIT_HELPER_COMPAT(shmdt),
+ SYSCALL32_INIT_HELPER_COMPAT(shmget),
SYSCALL32_INIT_HELPER(freebsd32_shmsys),
SYSCALL32_INIT_HELPER(freebsd32_shmctl),
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
@@ -1040,13 +1040,13 @@ done2:
/* XXX casting to (sy_call_t *) is bogus, as usual. */
static sy_call_t *shmcalls[] = {
- (sy_call_t *)shmat, (sy_call_t *)oshmctl,
- (sy_call_t *)shmdt, (sy_call_t *)shmget,
+ (sy_call_t *)sys_shmat, (sy_call_t *)oshmctl,
+ (sy_call_t *)sys_shmdt, (sy_call_t *)sys_shmget,
(sy_call_t *)freebsd7_shmctl
};
int
-shmsys(td, uap)
+sys_shmsys(td, uap)
struct thread *td;
/* XXX actually varargs. */
struct shmsys_args /* {
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index b5fcba9..01ac809 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1264,7 +1264,7 @@ tty_signal_sessleader(struct tty *tp, int sig)
if (tp->t_session != NULL && tp->t_session->s_leader != NULL) {
p = tp->t_session->s_leader;
PROC_LOCK(p);
- psignal(p, sig);
+ kern_psignal(p, sig);
PROC_UNLOCK(p);
}
}
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c
index f2f5c4e..4c272ad 100644
--- a/sys/kern/tty_pts.c
+++ b/sys/kern/tty_pts.c
@@ -816,7 +816,7 @@ pts_alloc_external(int fflags, struct thread *td, struct file *fp,
#endif /* PTS_EXTERNAL */
int
-posix_openpt(struct thread *td, struct posix_openpt_args *uap)
+sys_posix_openpt(struct thread *td, struct posix_openpt_args *uap)
{
int error, fd;
struct file *fp;
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index b91b890..8a3ea79 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -2045,7 +2045,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode,
* Syscall to open a message queue.
*/
int
-kmq_open(struct thread *td, struct kmq_open_args *uap)
+sys_kmq_open(struct thread *td, struct kmq_open_args *uap)
{
struct mq_attr attr;
int flags, error;
@@ -2066,7 +2066,7 @@ kmq_open(struct thread *td, struct kmq_open_args *uap)
* Syscall to unlink a message queue.
*/
int
-kmq_unlink(struct thread *td, struct kmq_unlink_args *uap)
+sys_kmq_unlink(struct thread *td, struct kmq_unlink_args *uap)
{
char path[MQFS_NAMELEN+1];
struct mqfs_node *pn;
@@ -2169,7 +2169,7 @@ kern_kmq_setattr(struct thread *td, int mqd, const struct mq_attr *attr,
}
int
-kmq_setattr(struct thread *td, struct kmq_setattr_args *uap)
+sys_kmq_setattr(struct thread *td, struct kmq_setattr_args *uap)
{
struct mq_attr attr, oattr;
int error;
@@ -2189,7 +2189,7 @@ kmq_setattr(struct thread *td, struct kmq_setattr_args *uap)
}
int
-kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap)
+sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap)
{
struct mqueue *mq;
struct file *fp;
@@ -2215,7 +2215,7 @@ kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap)
}
int
-kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap)
+sys_kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap)
{
struct mqueue *mq;
struct file *fp;
@@ -2240,7 +2240,7 @@ kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap)
}
int
-kmq_notify(struct thread *td, struct kmq_notify_args *uap)
+sys_kmq_notify(struct thread *td, struct kmq_notify_args *uap)
{
struct sigevent ev;
struct filedesc *fdp;
@@ -2770,8 +2770,8 @@ static struct syscall_helper_data mq32_syscalls[] = {
SYSCALL32_INIT_HELPER(freebsd32_kmq_setattr),
SYSCALL32_INIT_HELPER(freebsd32_kmq_timedsend),
SYSCALL32_INIT_HELPER(freebsd32_kmq_timedreceive),
- SYSCALL32_INIT_HELPER(kmq_notify),
- SYSCALL32_INIT_HELPER(kmq_unlink),
+ SYSCALL32_INIT_HELPER_COMPAT(kmq_notify),
+ SYSCALL32_INIT_HELPER_COMPAT(kmq_unlink),
SYSCALL_INIT_LAST
};
#endif
diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c
index f77bf3b..c219844 100644
--- a/sys/kern/uipc_sem.c
+++ b/sys/kern/uipc_sem.c
@@ -618,7 +618,7 @@ struct ksem_init_args {
};
#endif
int
-ksem_init(struct thread *td, struct ksem_init_args *uap)
+sys_ksem_init(struct thread *td, struct ksem_init_args *uap)
{
return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value,
@@ -635,7 +635,7 @@ struct ksem_open_args {
};
#endif
int
-ksem_open(struct thread *td, struct ksem_open_args *uap)
+sys_ksem_open(struct thread *td, struct ksem_open_args *uap)
{
DP((">>> ksem_open start, pid=%d\n", (int)td->td_proc->p_pid));
@@ -652,7 +652,7 @@ struct ksem_unlink_args {
};
#endif
int
-ksem_unlink(struct thread *td, struct ksem_unlink_args *uap)
+sys_ksem_unlink(struct thread *td, struct ksem_unlink_args *uap)
{
char *path;
Fnv32_t fnv;
@@ -680,7 +680,7 @@ struct ksem_close_args {
};
#endif
int
-ksem_close(struct thread *td, struct ksem_close_args *uap)
+sys_ksem_close(struct thread *td, struct ksem_close_args *uap)
{
struct ksem *ks;
struct file *fp;
@@ -706,7 +706,7 @@ struct ksem_post_args {
};
#endif
int
-ksem_post(struct thread *td, struct ksem_post_args *uap)
+sys_ksem_post(struct thread *td, struct ksem_post_args *uap)
{
struct file *fp;
struct ksem *ks;
@@ -744,7 +744,7 @@ struct ksem_wait_args {
};
#endif
int
-ksem_wait(struct thread *td, struct ksem_wait_args *uap)
+sys_ksem_wait(struct thread *td, struct ksem_wait_args *uap)
{
return (kern_sem_wait(td, uap->id, 0, NULL));
@@ -757,7 +757,7 @@ struct ksem_timedwait_args {
};
#endif
int
-ksem_timedwait(struct thread *td, struct ksem_timedwait_args *uap)
+sys_ksem_timedwait(struct thread *td, struct ksem_timedwait_args *uap)
{
struct timespec abstime;
struct timespec *ts;
@@ -785,7 +785,7 @@ struct ksem_trywait_args {
};
#endif
int
-ksem_trywait(struct thread *td, struct ksem_trywait_args *uap)
+sys_ksem_trywait(struct thread *td, struct ksem_trywait_args *uap)
{
return (kern_sem_wait(td, uap->id, 1, NULL));
@@ -862,7 +862,7 @@ struct ksem_getvalue_args {
};
#endif
int
-ksem_getvalue(struct thread *td, struct ksem_getvalue_args *uap)
+sys_ksem_getvalue(struct thread *td, struct ksem_getvalue_args *uap)
{
struct file *fp;
struct ksem *ks;
@@ -896,7 +896,7 @@ struct ksem_destroy_args {
};
#endif
int
-ksem_destroy(struct thread *td, struct ksem_destroy_args *uap)
+sys_ksem_destroy(struct thread *td, struct ksem_destroy_args *uap)
{
struct file *fp;
struct ksem *ks;
@@ -994,14 +994,14 @@ freebsd32_ksem_timedwait(struct thread *td,
static struct syscall_helper_data ksem32_syscalls[] = {
SYSCALL32_INIT_HELPER(freebsd32_ksem_init),
SYSCALL32_INIT_HELPER(freebsd32_ksem_open),
- SYSCALL32_INIT_HELPER(ksem_unlink),
- SYSCALL32_INIT_HELPER(ksem_close),
- SYSCALL32_INIT_HELPER(ksem_post),
- SYSCALL32_INIT_HELPER(ksem_wait),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_unlink),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_close),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_post),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_wait),
SYSCALL32_INIT_HELPER(freebsd32_ksem_timedwait),
- SYSCALL32_INIT_HELPER(ksem_trywait),
- SYSCALL32_INIT_HELPER(ksem_getvalue),
- SYSCALL32_INIT_HELPER(ksem_destroy),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_trywait),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_getvalue),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_destroy),
SYSCALL_INIT_LAST
};
#endif
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c
index f9fc3ca..8469f67 100644
--- a/sys/kern/uipc_shm.c
+++ b/sys/kern/uipc_shm.c
@@ -486,7 +486,7 @@ shm_remove(char *path, Fnv32_t fnv, struct ucred *ucred)
/* System calls. */
int
-shm_open(struct thread *td, struct shm_open_args *uap)
+sys_shm_open(struct thread *td, struct shm_open_args *uap)
{
struct filedesc *fdp;
struct shmfd *shmfd;
@@ -620,7 +620,7 @@ shm_open(struct thread *td, struct shm_open_args *uap)
}
int
-shm_unlink(struct thread *td, struct shm_unlink_args *uap)
+sys_shm_unlink(struct thread *td, struct shm_unlink_args *uap)
{
char *path;
Fnv32_t fnv;
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 0e5efe6..3b83e1c 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -171,7 +171,7 @@ getsock_cap(struct filedesc *fdp, int fd, cap_rights_t rights,
#endif
int
-socket(td, uap)
+sys_socket(td, uap)
struct thread *td;
struct socket_args /* {
int domain;
@@ -210,7 +210,7 @@ socket(td, uap)
/* ARGSUSED */
int
-bind(td, uap)
+sys_bind(td, uap)
struct thread *td;
struct bind_args /* {
int s;
@@ -259,7 +259,7 @@ kern_bind(td, fd, sa)
/* ARGSUSED */
int
-listen(td, uap)
+sys_listen(td, uap)
struct thread *td;
struct listen_args /* {
int s;
@@ -495,7 +495,7 @@ done:
}
int
-accept(td, uap)
+sys_accept(td, uap)
struct thread *td;
struct accept_args *uap;
{
@@ -516,7 +516,7 @@ oaccept(td, uap)
/* ARGSUSED */
int
-connect(td, uap)
+sys_connect(td, uap)
struct thread *td;
struct connect_args /* {
int s;
@@ -664,7 +664,7 @@ free1:
}
int
-socketpair(struct thread *td, struct socketpair_args *uap)
+sys_socketpair(struct thread *td, struct socketpair_args *uap)
{
int error, sv[2];
@@ -834,7 +834,7 @@ bad:
}
int
-sendto(td, uap)
+sys_sendto(td, uap)
struct thread *td;
struct sendto_args /* {
int s;
@@ -918,7 +918,7 @@ osendmsg(td, uap)
#endif
int
-sendmsg(td, uap)
+sys_sendmsg(td, uap)
struct thread *td;
struct sendmsg_args /* {
int s;
@@ -1128,7 +1128,7 @@ recvit(td, s, mp, namelenp)
}
int
-recvfrom(td, uap)
+sys_recvfrom(td, uap)
struct thread *td;
struct recvfrom_args /* {
int s;
@@ -1171,7 +1171,7 @@ orecvfrom(td, uap)
{
uap->flags |= MSG_COMPAT;
- return (recvfrom(td, uap));
+ return (sys_recvfrom(td, uap));
}
#endif
@@ -1238,7 +1238,7 @@ orecvmsg(td, uap)
#endif
int
-recvmsg(td, uap)
+sys_recvmsg(td, uap)
struct thread *td;
struct recvmsg_args /* {
int s;
@@ -1273,7 +1273,7 @@ recvmsg(td, uap)
/* ARGSUSED */
int
-shutdown(td, uap)
+sys_shutdown(td, uap)
struct thread *td;
struct shutdown_args /* {
int s;
@@ -1297,7 +1297,7 @@ shutdown(td, uap)
/* ARGSUSED */
int
-setsockopt(td, uap)
+sys_setsockopt(td, uap)
struct thread *td;
struct setsockopt_args /* {
int s;
@@ -1360,7 +1360,7 @@ kern_setsockopt(td, s, level, name, val, valseg, valsize)
/* ARGSUSED */
int
-getsockopt(td, uap)
+sys_getsockopt(td, uap)
struct thread *td;
struct getsockopt_args /* {
int s;
@@ -1519,7 +1519,7 @@ bad:
}
int
-getsockname(td, uap)
+sys_getsockname(td, uap)
struct thread *td;
struct getsockname_args *uap;
{
@@ -1624,7 +1624,7 @@ done:
}
int
-getpeername(td, uap)
+sys_getpeername(td, uap)
struct thread *td;
struct getpeername_args *uap;
{
@@ -1764,7 +1764,7 @@ sf_buf_mext(void *addr, void *args)
* specified, write the total number of bytes sent into *sbytes.
*/
int
-sendfile(struct thread *td, struct sendfile_args *uap)
+sys_sendfile(struct thread *td, struct sendfile_args *uap)
{
return (do_sendfile(td, uap, 0));
@@ -2300,7 +2300,7 @@ out:
* XXX: We should make this loadable one day.
*/
int
-sctp_peeloff(td, uap)
+sys_sctp_peeloff(td, uap)
struct thread *td;
struct sctp_peeloff_args /* {
int sd;
@@ -2387,7 +2387,7 @@ done2:
}
int
-sctp_generic_sendmsg (td, uap)
+sys_sctp_generic_sendmsg (td, uap)
struct thread *td;
struct sctp_generic_sendmsg_args /* {
int sd,
@@ -2494,7 +2494,7 @@ sctp_bad2:
}
int
-sctp_generic_sendmsg_iov(td, uap)
+sys_sctp_generic_sendmsg_iov(td, uap)
struct thread *td;
struct sctp_generic_sendmsg_iov_args /* {
int sd,
@@ -2616,7 +2616,7 @@ sctp_bad2:
}
int
-sctp_generic_recvmsg(td, uap)
+sys_sctp_generic_recvmsg(td, uap)
struct thread *td;
struct sctp_generic_recvmsg_args /* {
int sd,
diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c
index 9010a50..2516d5c 100644
--- a/sys/kern/vfs_acl.c
+++ b/sys/kern/vfs_acl.c
@@ -324,7 +324,7 @@ out:
* Given a file path, get an ACL for it
*/
int
-__acl_get_file(struct thread *td, struct __acl_get_file_args *uap)
+sys___acl_get_file(struct thread *td, struct __acl_get_file_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -344,7 +344,7 @@ __acl_get_file(struct thread *td, struct __acl_get_file_args *uap)
* Given a file path, get an ACL for it; don't follow links.
*/
int
-__acl_get_link(struct thread *td, struct __acl_get_link_args *uap)
+sys___acl_get_link(struct thread *td, struct __acl_get_link_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -364,7 +364,7 @@ __acl_get_link(struct thread *td, struct __acl_get_link_args *uap)
* Given a file path, set an ACL for it.
*/
int
-__acl_set_file(struct thread *td, struct __acl_set_file_args *uap)
+sys___acl_set_file(struct thread *td, struct __acl_set_file_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -384,7 +384,7 @@ __acl_set_file(struct thread *td, struct __acl_set_file_args *uap)
* Given a file path, set an ACL for it; don't follow links.
*/
int
-__acl_set_link(struct thread *td, struct __acl_set_link_args *uap)
+sys___acl_set_link(struct thread *td, struct __acl_set_link_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -404,7 +404,7 @@ __acl_set_link(struct thread *td, struct __acl_set_link_args *uap)
* Given a file descriptor, get an ACL for it.
*/
int
-__acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap)
+sys___acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap)
{
struct file *fp;
int vfslocked, error;
@@ -423,7 +423,7 @@ __acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap)
* Given a file descriptor, set an ACL for it.
*/
int
-__acl_set_fd(struct thread *td, struct __acl_set_fd_args *uap)
+sys___acl_set_fd(struct thread *td, struct __acl_set_fd_args *uap)
{
struct file *fp;
int vfslocked, error;
@@ -442,7 +442,7 @@ __acl_set_fd(struct thread *td, struct __acl_set_fd_args *uap)
* Given a file path, delete an ACL from it.
*/
int
-__acl_delete_file(struct thread *td, struct __acl_delete_file_args *uap)
+sys___acl_delete_file(struct thread *td, struct __acl_delete_file_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -462,7 +462,7 @@ __acl_delete_file(struct thread *td, struct __acl_delete_file_args *uap)
* Given a file path, delete an ACL from it; don't follow links.
*/
int
-__acl_delete_link(struct thread *td, struct __acl_delete_link_args *uap)
+sys___acl_delete_link(struct thread *td, struct __acl_delete_link_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -482,7 +482,7 @@ __acl_delete_link(struct thread *td, struct __acl_delete_link_args *uap)
* Given a file path, delete an ACL from it.
*/
int
-__acl_delete_fd(struct thread *td, struct __acl_delete_fd_args *uap)
+sys___acl_delete_fd(struct thread *td, struct __acl_delete_fd_args *uap)
{
struct file *fp;
int vfslocked, error;
@@ -502,7 +502,7 @@ __acl_delete_fd(struct thread *td, struct __acl_delete_fd_args *uap)
* Given a file path, check an ACL for it.
*/
int
-__acl_aclcheck_file(struct thread *td, struct __acl_aclcheck_file_args *uap)
+sys___acl_aclcheck_file(struct thread *td, struct __acl_aclcheck_file_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -522,7 +522,7 @@ __acl_aclcheck_file(struct thread *td, struct __acl_aclcheck_file_args *uap)
* Given a file path, check an ACL for it; don't follow links.
*/
int
-__acl_aclcheck_link(struct thread *td, struct __acl_aclcheck_link_args *uap)
+sys___acl_aclcheck_link(struct thread *td, struct __acl_aclcheck_link_args *uap)
{
struct nameidata nd;
int vfslocked, error;
@@ -542,7 +542,7 @@ __acl_aclcheck_link(struct thread *td, struct __acl_aclcheck_link_args *uap)
* Given a file descriptor, check an ACL for it.
*/
int
-__acl_aclcheck_fd(struct thread *td, struct __acl_aclcheck_fd_args *uap)
+sys___acl_aclcheck_fd(struct thread *td, struct __acl_aclcheck_fd_args *uap)
{
struct file *fp;
int vfslocked, error;
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index aedbdd0..7af9f55 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -943,7 +943,7 @@ aio_process(struct aiocblist *aiocbe)
}
if (sigpipe) {
PROC_LOCK(aiocbe->userproc);
- psignal(aiocbe->userproc, SIGPIPE);
+ kern_psignal(aiocbe->userproc, SIGPIPE);
PROC_UNLOCK(aiocbe->userproc);
}
}
@@ -1057,7 +1057,7 @@ aio_daemon(void *_id)
aiop->aiothreadflags = 0;
/* The daemon resides in its own pgrp. */
- setsid(td, NULL);
+ sys_setsid(td, NULL);
/*
* Wakeup parent process. (Parent sleeps to keep from blasting away
@@ -1867,7 +1867,7 @@ kern_aio_return(struct thread *td, struct aiocb *uaiocb, struct aiocb_ops *ops)
}
int
-aio_return(struct thread *td, struct aio_return_args *uap)
+sys_aio_return(struct thread *td, struct aio_return_args *uap)
{
return (kern_aio_return(td, uap->aiocbp, &aiocb_ops));
@@ -1936,7 +1936,7 @@ RETURN:
}
int
-aio_suspend(struct thread *td, struct aio_suspend_args *uap)
+sys_aio_suspend(struct thread *td, struct aio_suspend_args *uap)
{
struct timespec ts, *tsp;
struct aiocb **ujoblist;
@@ -1966,7 +1966,7 @@ aio_suspend(struct thread *td, struct aio_suspend_args *uap)
* progress.
*/
int
-aio_cancel(struct thread *td, struct aio_cancel_args *uap)
+sys_aio_cancel(struct thread *td, struct aio_cancel_args *uap)
{
struct proc *p = td->td_proc;
struct kaioinfo *ki;
@@ -2106,7 +2106,7 @@ kern_aio_error(struct thread *td, struct aiocb *aiocbp, struct aiocb_ops *ops)
}
int
-aio_error(struct thread *td, struct aio_error_args *uap)
+sys_aio_error(struct thread *td, struct aio_error_args *uap)
{
return (kern_aio_error(td, uap->aiocbp, &aiocb_ops));
@@ -2114,7 +2114,7 @@ aio_error(struct thread *td, struct aio_error_args *uap)
/* syscall - asynchronous read from a file (REALTIME) */
int
-oaio_read(struct thread *td, struct oaio_read_args *uap)
+sys_oaio_read(struct thread *td, struct oaio_read_args *uap)
{
return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ,
@@ -2122,7 +2122,7 @@ oaio_read(struct thread *td, struct oaio_read_args *uap)
}
int
-aio_read(struct thread *td, struct aio_read_args *uap)
+sys_aio_read(struct thread *td, struct aio_read_args *uap)
{
return (aio_aqueue(td, uap->aiocbp, NULL, LIO_READ, &aiocb_ops));
@@ -2130,7 +2130,7 @@ aio_read(struct thread *td, struct aio_read_args *uap)
/* syscall - asynchronous write to a file (REALTIME) */
int
-oaio_write(struct thread *td, struct oaio_write_args *uap)
+sys_oaio_write(struct thread *td, struct oaio_write_args *uap)
{
return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE,
@@ -2138,7 +2138,7 @@ oaio_write(struct thread *td, struct oaio_write_args *uap)
}
int
-aio_write(struct thread *td, struct aio_write_args *uap)
+sys_aio_write(struct thread *td, struct aio_write_args *uap)
{
return (aio_aqueue(td, uap->aiocbp, NULL, LIO_WRITE, &aiocb_ops));
@@ -2281,7 +2281,7 @@ kern_lio_listio(struct thread *td, int mode, struct aiocb * const *uacb_list,
/* syscall - list directed I/O (REALTIME) */
int
-olio_listio(struct thread *td, struct olio_listio_args *uap)
+sys_olio_listio(struct thread *td, struct olio_listio_args *uap)
{
struct aiocb **acb_list;
struct sigevent *sigp, sig;
@@ -2318,7 +2318,7 @@ olio_listio(struct thread *td, struct olio_listio_args *uap)
/* syscall - list directed I/O (REALTIME) */
int
-lio_listio(struct thread *td, struct lio_listio_args *uap)
+sys_lio_listio(struct thread *td, struct lio_listio_args *uap)
{
struct aiocb **acb_list;
struct sigevent *sigp, sig;
@@ -2465,7 +2465,7 @@ kern_aio_waitcomplete(struct thread *td, struct aiocb **aiocbp,
}
int
-aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap)
+sys_aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap)
{
struct timespec ts, *tsp;
int error;
@@ -2498,7 +2498,7 @@ kern_aio_fsync(struct thread *td, int op, struct aiocb *aiocbp,
}
int
-aio_fsync(struct thread *td, struct aio_fsync_args *uap)
+sys_aio_fsync(struct thread *td, struct aio_fsync_args *uap)
{
return (kern_aio_fsync(td, uap->op, uap->aiocbp, &aiocb_ops));
@@ -2836,7 +2836,7 @@ int
freebsd32_aio_cancel(struct thread *td, struct freebsd32_aio_cancel_args *uap)
{
- return (aio_cancel(td, (struct aio_cancel_args *)uap));
+ return (sys_aio_cancel(td, (struct aio_cancel_args *)uap));
}
int
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 30fb28b..ee4bf3c 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -925,7 +925,7 @@ SYSCTL_INT(_debug, OID_AUTO, disablecwd, CTLFLAG_RW, &disablecwd, 0,
/* Implementation of the getcwd syscall. */
int
-__getcwd(td, uap)
+sys___getcwd(td, uap)
struct thread *td;
struct __getcwd_args *uap;
{
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index b8b9cdf..7732a94 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");
* Currently this is used only by UFS1 extended attributes.
*/
int
-extattrctl(td, uap)
+sys_extattrctl(td, uap)
struct thread *td;
struct extattrctl_args /* {
const char *path;
@@ -210,7 +210,7 @@ done:
}
int
-extattr_set_fd(td, uap)
+sys_extattr_set_fd(td, uap)
struct thread *td;
struct extattr_set_fd_args /* {
int fd;
@@ -245,7 +245,7 @@ extattr_set_fd(td, uap)
}
int
-extattr_set_file(td, uap)
+sys_extattr_set_file(td, uap)
struct thread *td;
struct extattr_set_file_args /* {
const char *path;
@@ -282,7 +282,7 @@ extattr_set_file(td, uap)
}
int
-extattr_set_link(td, uap)
+sys_extattr_set_link(td, uap)
struct thread *td;
struct extattr_set_link_args /* {
const char *path;
@@ -390,7 +390,7 @@ done:
}
int
-extattr_get_fd(td, uap)
+sys_extattr_get_fd(td, uap)
struct thread *td;
struct extattr_get_fd_args /* {
int fd;
@@ -425,7 +425,7 @@ extattr_get_fd(td, uap)
}
int
-extattr_get_file(td, uap)
+sys_extattr_get_file(td, uap)
struct thread *td;
struct extattr_get_file_args /* {
const char *path;
@@ -462,7 +462,7 @@ extattr_get_file(td, uap)
}
int
-extattr_get_link(td, uap)
+sys_extattr_get_link(td, uap)
struct thread *td;
struct extattr_get_link_args /* {
const char *path;
@@ -542,7 +542,7 @@ done:
}
int
-extattr_delete_fd(td, uap)
+sys_extattr_delete_fd(td, uap)
struct thread *td;
struct extattr_delete_fd_args /* {
int fd;
@@ -575,7 +575,7 @@ extattr_delete_fd(td, uap)
}
int
-extattr_delete_file(td, uap)
+sys_extattr_delete_file(td, uap)
struct thread *td;
struct extattr_delete_file_args /* {
const char *path;
@@ -608,7 +608,7 @@ extattr_delete_file(td, uap)
}
int
-extattr_delete_link(td, uap)
+sys_extattr_delete_link(td, uap)
struct thread *td;
struct extattr_delete_link_args /* {
const char *path;
@@ -707,7 +707,7 @@ done:
int
-extattr_list_fd(td, uap)
+sys_extattr_list_fd(td, uap)
struct thread *td;
struct extattr_list_fd_args /* {
int fd;
@@ -735,7 +735,7 @@ extattr_list_fd(td, uap)
}
int
-extattr_list_file(td, uap)
+sys_extattr_list_file(td, uap)
struct thread*td;
struct extattr_list_file_args /* {
const char *path;
@@ -765,7 +765,7 @@ extattr_list_file(td, uap)
}
int
-extattr_list_link(td, uap)
+sys_extattr_list_link(td, uap)
struct thread*td;
struct extattr_list_link_args /* {
const char *path;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 5d6892c..d106c76 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -365,7 +365,7 @@ vfs_mergeopts(struct vfsoptlist *toopts, struct vfsoptlist *oldopts)
* Mount a filesystem.
*/
int
-nmount(td, uap)
+sys_nmount(td, uap)
struct thread *td;
struct nmount_args /* {
struct iovec *iovp;
@@ -682,7 +682,7 @@ struct mount_args {
#endif
/* ARGSUSED */
int
-mount(td, uap)
+sys_mount(td, uap)
struct thread *td;
struct mount_args /* {
char *type;
@@ -1097,7 +1097,7 @@ struct unmount_args {
#endif
/* ARGSUSED */
int
-unmount(td, uap)
+sys_unmount(td, uap)
struct thread *td;
register struct unmount_args /* {
char *path;
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index c0ae0a7..ec5ad06 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -125,7 +125,7 @@ struct sync_args {
#endif
/* ARGSUSED */
int
-sync(td, uap)
+sys_sync(td, uap)
struct thread *td;
struct sync_args *uap;
{
@@ -176,7 +176,7 @@ struct quotactl_args {
};
#endif
int
-quotactl(td, uap)
+sys_quotactl(td, uap)
struct thread *td;
register struct quotactl_args /* {
char *path;
@@ -266,7 +266,7 @@ struct statfs_args {
};
#endif
int
-statfs(td, uap)
+sys_statfs(td, uap)
struct thread *td;
register struct statfs_args /* {
char *path;
@@ -346,7 +346,7 @@ struct fstatfs_args {
};
#endif
int
-fstatfs(td, uap)
+sys_fstatfs(td, uap)
struct thread *td;
register struct fstatfs_args /* {
int fd;
@@ -437,7 +437,7 @@ struct getfsstat_args {
};
#endif
int
-getfsstat(td, uap)
+sys_getfsstat(td, uap)
struct thread *td;
register struct getfsstat_args /* {
struct statfs *buf;
@@ -732,7 +732,7 @@ struct fchdir_args {
};
#endif
int
-fchdir(td, uap)
+sys_fchdir(td, uap)
struct thread *td;
struct fchdir_args /* {
int fd;
@@ -797,7 +797,7 @@ struct chdir_args {
};
#endif
int
-chdir(td, uap)
+sys_chdir(td, uap)
struct thread *td;
struct chdir_args /* {
char *path;
@@ -889,7 +889,7 @@ struct chroot_args {
};
#endif
int
-chroot(td, uap)
+sys_chroot(td, uap)
struct thread *td;
struct chroot_args /* {
char *path;
@@ -1038,7 +1038,7 @@ struct open_args {
};
#endif
int
-open(td, uap)
+sys_open(td, uap)
struct thread *td;
register struct open_args /* {
char *path;
@@ -1059,7 +1059,7 @@ struct openat_args {
};
#endif
int
-openat(struct thread *td, struct openat_args *uap)
+sys_openat(struct thread *td, struct openat_args *uap)
{
return (kern_openat(td, uap->fd, uap->path, UIO_USERSPACE, uap->flag,
@@ -1279,7 +1279,7 @@ struct mknod_args {
};
#endif
int
-mknod(td, uap)
+sys_mknod(td, uap)
struct thread *td;
register struct mknod_args /* {
char *path;
@@ -1300,7 +1300,7 @@ struct mknodat_args {
};
#endif
int
-mknodat(struct thread *td, struct mknodat_args *uap)
+sys_mknodat(struct thread *td, struct mknodat_args *uap)
{
return (kern_mknodat(td, uap->fd, uap->path, UIO_USERSPACE, uap->mode,
@@ -1432,7 +1432,7 @@ struct mkfifo_args {
};
#endif
int
-mkfifo(td, uap)
+sys_mkfifo(td, uap)
struct thread *td;
register struct mkfifo_args /* {
char *path;
@@ -1451,7 +1451,7 @@ struct mkfifoat_args {
};
#endif
int
-mkfifoat(struct thread *td, struct mkfifoat_args *uap)
+sys_mkfifoat(struct thread *td, struct mkfifoat_args *uap)
{
return (kern_mkfifoat(td, uap->fd, uap->path, UIO_USERSPACE,
@@ -1533,7 +1533,7 @@ struct link_args {
};
#endif
int
-link(td, uap)
+sys_link(td, uap)
struct thread *td;
register struct link_args /* {
char *path;
@@ -1554,7 +1554,7 @@ struct linkat_args {
};
#endif
int
-linkat(struct thread *td, struct linkat_args *uap)
+sys_linkat(struct thread *td, struct linkat_args *uap)
{
int flag;
@@ -1685,7 +1685,7 @@ struct symlink_args {
};
#endif
int
-symlink(td, uap)
+sys_symlink(td, uap)
struct thread *td;
register struct symlink_args /* {
char *path;
@@ -1704,7 +1704,7 @@ struct symlinkat_args {
};
#endif
int
-symlinkat(struct thread *td, struct symlinkat_args *uap)
+sys_symlinkat(struct thread *td, struct symlinkat_args *uap)
{
return (kern_symlinkat(td, uap->path1, uap->fd, uap->path2,
@@ -1792,7 +1792,7 @@ out:
* Delete a whiteout from the filesystem.
*/
int
-undelete(td, uap)
+sys_undelete(td, uap)
struct thread *td;
register struct undelete_args /* {
char *path;
@@ -1848,7 +1848,7 @@ struct unlink_args {
};
#endif
int
-unlink(td, uap)
+sys_unlink(td, uap)
struct thread *td;
struct unlink_args /* {
char *path;
@@ -1866,7 +1866,7 @@ struct unlinkat_args {
};
#endif
int
-unlinkat(struct thread *td, struct unlinkat_args *uap)
+sys_unlinkat(struct thread *td, struct unlinkat_args *uap)
{
int flag = uap->flag;
int fd = uap->fd;
@@ -1970,7 +1970,7 @@ struct lseek_args {
};
#endif
int
-lseek(td, uap)
+sys_lseek(td, uap)
struct thread *td;
register struct lseek_args /* {
int fd;
@@ -2084,7 +2084,7 @@ olseek(td, uap)
nuap.fd = uap->fd;
nuap.offset = uap->offset;
nuap.whence = uap->whence;
- return (lseek(td, &nuap));
+ return (sys_lseek(td, &nuap));
}
#endif /* COMPAT_43 */
@@ -2099,7 +2099,7 @@ freebsd6_lseek(td, uap)
ouap.fd = uap->fd;
ouap.offset = uap->offset;
ouap.whence = uap->whence;
- return (lseek(td, &ouap));
+ return (sys_lseek(td, &ouap));
}
/*
@@ -2146,7 +2146,7 @@ struct access_args {
};
#endif
int
-access(td, uap)
+sys_access(td, uap)
struct thread *td;
register struct access_args /* {
char *path;
@@ -2166,7 +2166,7 @@ struct faccessat_args {
}
#endif
int
-faccessat(struct thread *td, struct faccessat_args *uap)
+sys_faccessat(struct thread *td, struct faccessat_args *uap)
{
if (uap->flag & ~AT_EACCESS)
@@ -2234,7 +2234,7 @@ struct eaccess_args {
};
#endif
int
-eaccess(td, uap)
+sys_eaccess(td, uap)
struct thread *td;
register struct eaccess_args /* {
char *path;
@@ -2351,7 +2351,7 @@ struct stat_args {
};
#endif
int
-stat(td, uap)
+sys_stat(td, uap)
struct thread *td;
register struct stat_args /* {
char *path;
@@ -2376,7 +2376,7 @@ struct fstatat_args {
}
#endif
int
-fstatat(struct thread *td, struct fstatat_args *uap)
+sys_fstatat(struct thread *td, struct fstatat_args *uap)
{
struct stat sb;
int error;
@@ -2453,7 +2453,7 @@ struct lstat_args {
};
#endif
int
-lstat(td, uap)
+sys_lstat(td, uap)
struct thread *td;
register struct lstat_args /* {
char *path;
@@ -2511,7 +2511,7 @@ struct nstat_args {
};
#endif
int
-nstat(td, uap)
+sys_nstat(td, uap)
struct thread *td;
register struct nstat_args /* {
char *path;
@@ -2540,7 +2540,7 @@ struct lstat_args {
};
#endif
int
-nlstat(td, uap)
+sys_nlstat(td, uap)
struct thread *td;
register struct nlstat_args /* {
char *path;
@@ -2569,7 +2569,7 @@ struct pathconf_args {
};
#endif
int
-pathconf(td, uap)
+sys_pathconf(td, uap)
struct thread *td;
register struct pathconf_args /* {
char *path;
@@ -2587,7 +2587,7 @@ struct lpathconf_args {
};
#endif
int
-lpathconf(td, uap)
+sys_lpathconf(td, uap)
struct thread *td;
register struct lpathconf_args /* {
char *path;
@@ -2633,7 +2633,7 @@ struct readlink_args {
};
#endif
int
-readlink(td, uap)
+sys_readlink(td, uap)
struct thread *td;
register struct readlink_args /* {
char *path;
@@ -2654,7 +2654,7 @@ struct readlinkat_args {
};
#endif
int
-readlinkat(struct thread *td, struct readlinkat_args *uap)
+sys_readlinkat(struct thread *td, struct readlinkat_args *uap)
{
return (kern_readlinkat(td, uap->fd, uap->path, UIO_USERSPACE,
@@ -2770,7 +2770,7 @@ struct chflags_args {
};
#endif
int
-chflags(td, uap)
+sys_chflags(td, uap)
struct thread *td;
register struct chflags_args /* {
char *path;
@@ -2798,7 +2798,7 @@ chflags(td, uap)
* Same as chflags() but doesn't follow symlinks.
*/
int
-lchflags(td, uap)
+sys_lchflags(td, uap)
struct thread *td;
register struct lchflags_args /* {
char *path;
@@ -2832,7 +2832,7 @@ struct fchflags_args {
};
#endif
int
-fchflags(td, uap)
+sys_fchflags(td, uap)
struct thread *td;
register struct fchflags_args /* {
int fd;
@@ -2899,7 +2899,7 @@ struct chmod_args {
};
#endif
int
-chmod(td, uap)
+sys_chmod(td, uap)
struct thread *td;
register struct chmod_args /* {
char *path;
@@ -2919,7 +2919,7 @@ struct fchmodat_args {
}
#endif
int
-fchmodat(struct thread *td, struct fchmodat_args *uap)
+sys_fchmodat(struct thread *td, struct fchmodat_args *uap)
{
int flag = uap->flag;
int fd = uap->fd;
@@ -2949,7 +2949,7 @@ struct lchmod_args {
};
#endif
int
-lchmod(td, uap)
+sys_lchmod(td, uap)
struct thread *td;
register struct lchmod_args /* {
char *path;
@@ -2995,7 +2995,7 @@ struct fchmod_args {
};
#endif
int
-fchmod(struct thread *td, struct fchmod_args *uap)
+sys_fchmod(struct thread *td, struct fchmod_args *uap)
{
struct file *fp;
int error;
@@ -3054,7 +3054,7 @@ struct chown_args {
};
#endif
int
-chown(td, uap)
+sys_chown(td, uap)
struct thread *td;
register struct chown_args /* {
char *path;
@@ -3076,7 +3076,7 @@ struct fchownat_args {
};
#endif
int
-fchownat(struct thread *td, struct fchownat_args *uap)
+sys_fchownat(struct thread *td, struct fchownat_args *uap)
{
int flag;
@@ -3129,7 +3129,7 @@ struct lchown_args {
};
#endif
int
-lchown(td, uap)
+sys_lchown(td, uap)
struct thread *td;
register struct lchown_args /* {
char *path;
@@ -3161,7 +3161,7 @@ struct fchown_args {
};
#endif
int
-fchown(td, uap)
+sys_fchown(td, uap)
struct thread *td;
register struct fchown_args /* {
int fd;
@@ -3268,7 +3268,7 @@ struct utimes_args {
};
#endif
int
-utimes(td, uap)
+sys_utimes(td, uap)
struct thread *td;
register struct utimes_args /* {
char *path;
@@ -3288,7 +3288,7 @@ struct futimesat_args {
};
#endif
int
-futimesat(struct thread *td, struct futimesat_args *uap)
+sys_futimesat(struct thread *td, struct futimesat_args *uap)
{
return (kern_utimesat(td, uap->fd, uap->path, UIO_USERSPACE,
@@ -3336,7 +3336,7 @@ struct lutimes_args {
};
#endif
int
-lutimes(td, uap)
+sys_lutimes(td, uap)
struct thread *td;
register struct lutimes_args /* {
char *path;
@@ -3380,7 +3380,7 @@ struct futimes_args {
};
#endif
int
-futimes(td, uap)
+sys_futimes(td, uap)
struct thread *td;
register struct futimes_args /* {
int fd;
@@ -3429,7 +3429,7 @@ struct truncate_args {
};
#endif
int
-truncate(td, uap)
+sys_truncate(td, uap)
struct thread *td;
register struct truncate_args /* {
char *path;
@@ -3509,7 +3509,7 @@ otruncate(td, uap)
nuap.path = uap->path;
nuap.length = uap->length;
- return (truncate(td, &nuap));
+ return (sys_truncate(td, &nuap));
}
#endif /* COMPAT_43 */
@@ -3521,7 +3521,7 @@ freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap)
ouap.path = uap->path;
ouap.length = uap->length;
- return (truncate(td, &ouap));
+ return (sys_truncate(td, &ouap));
}
int
@@ -3531,7 +3531,7 @@ freebsd6_ftruncate(struct thread *td, struct freebsd6_ftruncate_args *uap)
ouap.fd = uap->fd;
ouap.length = uap->length;
- return (ftruncate(td, &ouap));
+ return (sys_ftruncate(td, &ouap));
}
/*
@@ -3543,7 +3543,7 @@ struct fsync_args {
};
#endif
int
-fsync(td, uap)
+sys_fsync(td, uap)
struct thread *td;
struct fsync_args /* {
int fd;
@@ -3597,7 +3597,7 @@ struct rename_args {
};
#endif
int
-rename(td, uap)
+sys_rename(td, uap)
struct thread *td;
register struct rename_args /* {
char *from;
@@ -3617,7 +3617,7 @@ struct renameat_args {
};
#endif
int
-renameat(struct thread *td, struct renameat_args *uap)
+sys_renameat(struct thread *td, struct renameat_args *uap)
{
return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new,
@@ -3753,7 +3753,7 @@ struct mkdir_args {
};
#endif
int
-mkdir(td, uap)
+sys_mkdir(td, uap)
struct thread *td;
register struct mkdir_args /* {
char *path;
@@ -3772,7 +3772,7 @@ struct mkdirat_args {
};
#endif
int
-mkdirat(struct thread *td, struct mkdirat_args *uap)
+sys_mkdirat(struct thread *td, struct mkdirat_args *uap)
{
return (kern_mkdirat(td, uap->fd, uap->path, UIO_USERSPACE, uap->mode));
@@ -3860,7 +3860,7 @@ struct rmdir_args {
};
#endif
int
-rmdir(td, uap)
+sys_rmdir(td, uap)
struct thread *td;
struct rmdir_args /* {
char *path;
@@ -4109,7 +4109,7 @@ struct getdirentries_args {
};
#endif
int
-getdirentries(td, uap)
+sys_getdirentries(td, uap)
struct thread *td;
register struct getdirentries_args /* {
int fd;
@@ -4212,7 +4212,7 @@ struct getdents_args {
};
#endif
int
-getdents(td, uap)
+sys_getdents(td, uap)
struct thread *td;
register struct getdents_args /* {
int fd;
@@ -4225,7 +4225,7 @@ getdents(td, uap)
ap.buf = uap->buf;
ap.count = uap->count;
ap.basep = NULL;
- return (getdirentries(td, &ap));
+ return (sys_getdirentries(td, &ap));
}
/*
@@ -4237,7 +4237,7 @@ struct umask_args {
};
#endif
int
-umask(td, uap)
+sys_umask(td, uap)
struct thread *td;
struct umask_args /* {
int newmask;
@@ -4263,7 +4263,7 @@ struct revoke_args {
};
#endif
int
-revoke(td, uap)
+sys_revoke(td, uap)
struct thread *td;
register struct revoke_args /* {
char *path;
@@ -4361,7 +4361,7 @@ struct lgetfh_args {
};
#endif
int
-lgetfh(td, uap)
+sys_lgetfh(td, uap)
struct thread *td;
register struct lgetfh_args *uap;
{
@@ -4400,7 +4400,7 @@ struct getfh_args {
};
#endif
int
-getfh(td, uap)
+sys_getfh(td, uap)
struct thread *td;
register struct getfh_args *uap;
{
@@ -4446,7 +4446,7 @@ struct fhopen_args {
};
#endif
int
-fhopen(td, uap)
+sys_fhopen(td, uap)
struct thread *td;
struct fhopen_args /* {
const struct fhandle *u_fhp;
@@ -4637,7 +4637,7 @@ struct fhstat_args {
};
#endif
int
-fhstat(td, uap)
+sys_fhstat(td, uap)
struct thread *td;
register struct fhstat_args /* {
struct fhandle *u_fhp;
@@ -4685,7 +4685,7 @@ struct fhstatfs_args {
};
#endif
int
-fhstatfs(td, uap)
+sys_fhstatfs(td, uap)
struct thread *td;
struct fhstatfs_args /* {
struct fhandle *u_fhp;
@@ -4840,7 +4840,7 @@ kern_posix_fallocate(struct thread *td, int fd, off_t offset, off_t len)
}
int
-posix_fallocate(struct thread *td, struct posix_fallocate_args *uap)
+sys_posix_fallocate(struct thread *td, struct posix_fallocate_args *uap)
{
return (kern_posix_fallocate(td, uap->fd, uap->offset, uap->len));
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 92fb0d9..17dc5e7 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1356,7 +1356,7 @@ vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio,
PROC_LOCK(td->td_proc);
if ((uoff_t)uio->uio_offset + uio->uio_resid >
lim_cur(td->td_proc, RLIMIT_FSIZE)) {
- psignal(td->td_proc, SIGXFSZ);
+ kern_psignal(td->td_proc, SIGXFSZ);
PROC_UNLOCK(td->td_proc);
return (EFBIG);
}
OpenPOWER on IntegriCloud