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)
This commit is contained in:
Kip Macy 2011-09-16 13:58:51 +00:00
parent 45f3db2122
commit 8451d0dd78
118 changed files with 869 additions and 825 deletions

View File

@ -421,7 +421,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
* MPSAFE
*/
int
sigreturn(td, uap)
sys_sigreturn(td, uap)
struct thread *td;
struct sigreturn_args /* {
const struct __ucontext *sigcntxp;
@ -517,7 +517,7 @@ int
freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap)
{
return sigreturn(td, (struct sigreturn_args *)uap);
return sys_sigreturn(td, (struct sigreturn_args *)uap);
}
#endif

View File

@ -658,7 +658,7 @@ linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
(void *)bsd_args.addr, (int)bsd_args.len, bsd_args.prot,
bsd_args.flags, bsd_args.fd, (int)bsd_args.pos);
#endif
error = mmap(td, &bsd_args);
error = sys_mmap(td, &bsd_args);
#ifdef DEBUG
if (ldebug(mmap))
printf("-> %s() return: 0x%x (0x%08x)\n",
@ -677,7 +677,7 @@ linux_mprotect(struct thread *td, struct linux_mprotect_args *uap)
bsd_args.prot = uap->prot;
if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
bsd_args.prot |= PROT_READ | PROT_EXEC;
return (mprotect(td, &bsd_args));
return (sys_mprotect(td, &bsd_args));
}
int
@ -863,7 +863,7 @@ linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args)
sa.fd = args->fd;
sa.length = args->length;
return ftruncate(td, &sa);
return sys_ftruncate(td, &sa);
}
int

View File

@ -605,7 +605,7 @@ set_mcontext(struct thread *td, const mcontext_t *mcp)
* MPSAFE
*/
int
sigreturn(td, uap)
sys_sigreturn(td, uap)
struct thread *td;
struct sigreturn_args /* {
const struct __ucontext *sigcntxp;

View File

@ -5669,7 +5669,7 @@ dtrace_action_raise(uint64_t sig)
#else
struct proc *p = curproc;
PROC_LOCK(p);
psignal(p, sig);
kern_psignal(p, sig);
PROC_UNLOCK(p);
#endif
}
@ -5689,7 +5689,7 @@ dtrace_action_stop(void)
#else
struct proc *p = curproc;
PROC_LOCK(p);
psignal(p, SIGSTOP);
kern_psignal(p, SIGSTOP);
PROC_UNLOCK(p);
#endif
}

View File

@ -1474,7 +1474,7 @@ fasttrap_getreg(struct regs *rp, uint_t reg)
* If the copy in failed, the process will be in a irrecoverable
* state, and we have no choice but to kill it.
*/
psignal(ttoproc(curthread), SIGILL);
kern_psignal(ttoproc(curthread), SIGILL);
return (0);
}
@ -1593,5 +1593,5 @@ fasttrap_putreg(struct regs *rp, uint_t reg, ulong_t value)
* If we couldn't record this register's value, the process is in an
* irrecoverable state and we have no choice but to euthanize it.
*/
psignal(ttoproc(curthread), SIGILL);
kern_psignal(ttoproc(curthread), SIGILL);
}

View File

@ -396,7 +396,7 @@ freebsd32_ioctl(struct thread *td, struct freebsd32_ioctl_args *uap)
ap.fd = uap->fd;
ap.com = uap->com;
PTRIN_CP(*uap, ap, data);
return ioctl(td, &ap);
return sys_ioctl(td, &ap);
}
fdrop(fp, td);

View File

@ -425,7 +425,7 @@ freebsd32_mmap_partial(struct thread *td, vm_offset_t start, vm_offset_t end,
r.buf = (void *) start;
r.nbyte = end - start;
r.offset = pos;
return (pread(td, &r));
return (sys_pread(td, &r));
} else {
while (start < end) {
subyte((void *) start, 0);
@ -500,7 +500,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
r.buf = (void *) start;
r.nbyte = end - start;
r.offset = pos;
error = pread(td, &r);
error = sys_pread(td, &r);
if (error)
return (error);
@ -527,7 +527,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
ap.fd = fd;
ap.pos = pos;
return (mmap(td, &ap));
return (sys_mmap(td, &ap));
}
#ifdef COMPAT_FREEBSD6
@ -1401,7 +1401,7 @@ freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap)
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
return (pread(td, &ap));
return (sys_pread(td, &ap));
}
int
@ -1413,7 +1413,7 @@ freebsd32_pwrite(struct thread *td, struct freebsd32_pwrite_args *uap)
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
return (pwrite(td, &ap));
return (sys_pwrite(td, &ap));
}
#ifdef COMPAT_43
@ -1425,7 +1425,7 @@ ofreebsd32_lseek(struct thread *td, struct ofreebsd32_lseek_args *uap)
nuap.fd = uap->fd;
nuap.offset = uap->offset;
nuap.whence = uap->whence;
return (lseek(td, &nuap));
return (sys_lseek(td, &nuap));
}
#endif
@ -1439,7 +1439,7 @@ freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap)
ap.fd = uap->fd;
ap.offset = PAIR32TO64(off_t,uap->offset);
ap.whence = uap->whence;
error = lseek(td, &ap);
error = sys_lseek(td, &ap);
/* Expand the quad return into two parts for eax and edx */
pos = *(off_t *)(td->td_retval);
td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */
@ -1454,7 +1454,7 @@ freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap)
ap.path = uap->path;
ap.length = PAIR32TO64(off_t,uap->length);
return (truncate(td, &ap));
return (sys_truncate(td, &ap));
}
int
@ -1464,7 +1464,7 @@ freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap)
ap.fd = uap->fd;
ap.length = PAIR32TO64(off_t,uap->length);
return (ftruncate(td, &ap));
return (sys_ftruncate(td, &ap));
}
#ifdef COMPAT_43
@ -1519,7 +1519,7 @@ freebsd6_freebsd32_pread(struct thread *td, struct freebsd6_freebsd32_pread_args
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
return (pread(td, &ap));
return (sys_pread(td, &ap));
}
int
@ -1531,7 +1531,7 @@ freebsd6_freebsd32_pwrite(struct thread *td, struct freebsd6_freebsd32_pwrite_ar
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
ap.offset = PAIR32TO64(off_t,uap->offset);
return (pwrite(td, &ap));
return (sys_pwrite(td, &ap));
}
int
@ -1544,7 +1544,7 @@ freebsd6_freebsd32_lseek(struct thread *td, struct freebsd6_freebsd32_lseek_args
ap.fd = uap->fd;
ap.offset = PAIR32TO64(off_t,uap->offset);
ap.whence = uap->whence;
error = lseek(td, &ap);
error = sys_lseek(td, &ap);
/* Expand the quad return into two parts for eax and edx */
pos = *(off_t *)(td->td_retval);
td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */
@ -1559,7 +1559,7 @@ freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncat
ap.path = uap->path;
ap.length = PAIR32TO64(off_t,uap->length);
return (truncate(td, &ap));
return (sys_truncate(td, &ap));
}
int
@ -1569,7 +1569,7 @@ freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftrunc
ap.fd = uap->fd;
ap.length = PAIR32TO64(off_t,uap->length);
return (ftruncate(td, &ap));
return (sys_ftruncate(td, &ap));
}
#endif /* COMPAT_FREEBSD6 */
@ -2409,7 +2409,7 @@ freebsd32_cpuset_setid(struct thread *td,
ap.id = PAIR32TO64(id_t,uap->id);
ap.setid = uap->setid;
return (cpuset_setid(td, &ap));
return (sys_cpuset_setid(td, &ap));
}
int
@ -2423,7 +2423,7 @@ freebsd32_cpuset_getid(struct thread *td,
ap.id = PAIR32TO64(id_t,uap->id);
ap.setid = uap->setid;
return (cpuset_getid(td, &ap));
return (sys_cpuset_getid(td, &ap));
}
int
@ -2438,7 +2438,7 @@ freebsd32_cpuset_getaffinity(struct thread *td,
ap.cpusetsize = uap->cpusetsize;
ap.mask = uap->mask;
return (cpuset_getaffinity(td, &ap));
return (sys_cpuset_getaffinity(td, &ap));
}
int
@ -2453,7 +2453,7 @@ freebsd32_cpuset_setaffinity(struct thread *td,
ap.cpusetsize = uap->cpusetsize;
ap.mask = uap->mask;
return (cpuset_setaffinity(td, &ap));
return (sys_cpuset_setaffinity(td, &ap));
}
int
@ -2813,5 +2813,5 @@ freebsd32_posix_fallocate(struct thread *td,
ap.fd = uap->fd;
ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
ap.len = (uap->lenlo | ((off_t)uap->lenhi << 32));
return (posix_fallocate(td, &ap));
return (sys_posix_fallocate(td, &ap));
}

View File

@ -88,6 +88,15 @@ SYSCALL32_MODULE(syscallname, \
.syscall_no = FREEBSD32_SYS_##syscallname \
}
#define SYSCALL32_INIT_HELPER_COMPAT(syscallname) { \
.new_sysent = { \
.sy_narg = (sizeof(struct syscallname ## _args ) \
/ sizeof(register_t)), \
.sy_call = (sy_call_t *)& sys_ ## syscallname, \
}, \
.syscall_no = FREEBSD32_SYS_##syscallname \
}
int syscall32_register(int *offset, struct sysent *new_sysent,
struct sysent *old_sysent);
int syscall32_deregister(int *offset, struct sysent *old_sysent);

View File

@ -244,7 +244,7 @@ linux_proc_exit(void *arg __unused, struct proc *p)
KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid));
PROC_LOCK(q);
if ((q->p_flag & P_WEXIT) == 0 && em->pdeath_signal != 0) {
psignal(q, em->pdeath_signal);
kern_psignal(q, em->pdeath_signal);
}
PROC_UNLOCK(q);
EMUL_UNLOCK(&emul_lock);
@ -362,7 +362,7 @@ linux_kill_threads(struct thread *td, int sig)
sp = pfind(em->pid);
if ((sp->p_flag & P_WEXIT) == 0)
psignal(sp, sig);
kern_psignal(sp, sig);
PROC_UNLOCK(sp);
#ifdef DEBUG
printf(LMSG("linux_kill_threads: kill PID %d\n"), em->pid);

View File

@ -232,7 +232,7 @@ linux_lseek(struct thread *td, struct linux_lseek_args *args)
tmp_args.fd = args->fdes;
tmp_args.offset = (off_t)args->off;
tmp_args.whence = args->whence;
error = lseek(td, &tmp_args);
error = sys_lseek(td, &tmp_args);
return error;
}
@ -254,7 +254,7 @@ linux_llseek(struct thread *td, struct linux_llseek_args *args)
bsd_args.offset = off;
bsd_args.whence = args->whence;
if ((error = lseek(td, &bsd_args)))
if ((error = sys_lseek(td, &bsd_args)))
return error;
if ((error = copyout(td->td_retval, args->res, sizeof (off_t))))
@ -951,7 +951,7 @@ linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args)
nuap.fd = args->fd;
nuap.length = args->length;
return (ftruncate(td, &nuap));
return (sys_ftruncate(td, &nuap));
}
int
@ -1021,7 +1021,7 @@ linux_fdatasync(td, uap)
struct fsync_args bsd;
bsd.fd = uap->fd;
return fsync(td, &bsd);
return sys_fsync(td, &bsd);
}
int
@ -1038,7 +1038,7 @@ linux_pread(td, uap)
bsd.nbyte = uap->nbyte;
bsd.offset = uap->offset;
error = pread(td, &bsd);
error = sys_pread(td, &bsd);
if (error == 0) {
/* This seems to violate POSIX but linux does it */
@ -1065,7 +1065,7 @@ linux_pwrite(td, uap)
bsd.buf = uap->buf;
bsd.nbyte = uap->nbyte;
bsd.offset = uap->offset;
return pwrite(td, &bsd);
return sys_pwrite(td, &bsd);
}
int
@ -1163,7 +1163,7 @@ linux_umount(struct thread *td, struct linux_umount_args *args)
bsd.path = args->path;
bsd.flags = args->flags; /* XXX correct? */
return (unmount(td, &bsd));
return (sys_unmount(td, &bsd));
}
/*

View File

@ -803,7 +803,7 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
wr.fd = args->fd;
wr.buf = &c;
wr.nbyte = sizeof(c);
return (write(td, &wr));
return (sys_write(td, &wr));
} else
return (0);
}
@ -812,7 +812,7 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
return (EINVAL);
}
args->arg = 0;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
}
@ -838,27 +838,27 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCEXCL:
args->cmd = TIOCEXCL;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCNXCL:
args->cmd = TIOCNXCL;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSCTTY:
args->cmd = TIOCSCTTY;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCGPGRP:
args->cmd = TIOCGPGRP;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSPGRP:
args->cmd = TIOCSPGRP;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_TIOCOUTQ */
@ -866,32 +866,32 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCGWINSZ:
args->cmd = TIOCGWINSZ;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSWINSZ:
args->cmd = TIOCSWINSZ;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMGET:
args->cmd = TIOCMGET;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMBIS:
args->cmd = TIOCMBIS;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMBIC:
args->cmd = TIOCMBIC;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCMSET:
args->cmd = TIOCMSET;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* TIOCGSOFTCAR */
@ -899,14 +899,14 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_FIONREAD: /* LINUX_TIOCINQ */
args->cmd = FIONREAD;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_TIOCLINUX */
case LINUX_TIOCCONS:
args->cmd = TIOCCONS;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCGSERIAL: {
@ -932,17 +932,17 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCPKT:
args->cmd = TIOCPKT;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_FIONBIO:
args->cmd = FIONBIO;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCNOTTY:
args->cmd = TIOCNOTTY;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCSETD: {
@ -996,17 +996,17 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_FIONCLEX:
args->cmd = FIONCLEX;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_FIOCLEX:
args->cmd = FIOCLEX;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_FIOASYNC:
args->cmd = FIOASYNC;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_TIOCSERCONFIG */
@ -1017,12 +1017,12 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
case LINUX_TIOCSBRK:
args->cmd = TIOCSBRK;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCCBRK:
args->cmd = TIOCCBRK;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_TIOCGPTN: {
int nb;
@ -1447,22 +1447,22 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args)
case LINUX_CDROMPAUSE:
args->cmd = CDIOCPAUSE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMRESUME:
args->cmd = CDIOCRESUME;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMPLAYMSF:
args->cmd = CDIOCPLAYMSF;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMPLAYTRKIND:
args->cmd = CDIOCPLAYTRACKS;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMREADTOCHDR: {
@ -1501,17 +1501,17 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args)
case LINUX_CDROMSTOP:
args->cmd = CDIOCSTOP;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMSTART:
args->cmd = CDIOCSTART;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_CDROMEJECT:
args->cmd = CDIOCEJECT;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_CDROMVOLCTRL */
@ -1555,7 +1555,7 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args)
case LINUX_CDROMRESET:
args->cmd = CDIOCRESET;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
/* LINUX_CDROMVOLREAD */
@ -1689,71 +1689,71 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SOUND_MIXER_WRITE_VOLUME:
args->cmd = SETDIR(SOUND_MIXER_WRITE_VOLUME);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_BASS:
args->cmd = SETDIR(SOUND_MIXER_WRITE_BASS);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_TREBLE:
args->cmd = SETDIR(SOUND_MIXER_WRITE_TREBLE);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_SYNTH:
args->cmd = SETDIR(SOUND_MIXER_WRITE_SYNTH);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_PCM:
args->cmd = SETDIR(SOUND_MIXER_WRITE_PCM);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_SPEAKER:
args->cmd = SETDIR(SOUND_MIXER_WRITE_SPEAKER);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_MIC:
args->cmd = SETDIR(SOUND_MIXER_WRITE_MIC);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_CD:
args->cmd = SETDIR(SOUND_MIXER_WRITE_CD);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_IMIX:
args->cmd = SETDIR(SOUND_MIXER_WRITE_IMIX);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_ALTPCM:
args->cmd = SETDIR(SOUND_MIXER_WRITE_ALTPCM);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_RECLEV:
args->cmd = SETDIR(SOUND_MIXER_WRITE_RECLEV);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_IGAIN:
args->cmd = SETDIR(SOUND_MIXER_WRITE_IGAIN);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_OGAIN:
args->cmd = SETDIR(SOUND_MIXER_WRITE_OGAIN);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE1:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE1);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE2:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE2);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_LINE3:
args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE3);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_INFO: {
/* Key on encoded length */
@ -1787,167 +1787,167 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SOUND_MIXER_READ_STEREODEVS:
args->cmd = SOUND_MIXER_READ_STEREODEVS;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_READ_CAPS:
args->cmd = SOUND_MIXER_READ_CAPS;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_READ_RECMASK:
args->cmd = SOUND_MIXER_READ_RECMASK;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_READ_DEVMASK:
args->cmd = SOUND_MIXER_READ_DEVMASK;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_MIXER_WRITE_RECSRC:
args->cmd = SETDIR(SOUND_MIXER_WRITE_RECSRC);
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_RESET:
args->cmd = SNDCTL_DSP_RESET;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SYNC:
args->cmd = SNDCTL_DSP_SYNC;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SPEED:
args->cmd = SNDCTL_DSP_SPEED;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_STEREO:
args->cmd = SNDCTL_DSP_STEREO;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETBLKSIZE: /* LINUX_SNDCTL_DSP_SETBLKSIZE */
args->cmd = SNDCTL_DSP_GETBLKSIZE;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETFMT:
args->cmd = SNDCTL_DSP_SETFMT;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_PCM_WRITE_CHANNELS:
args->cmd = SOUND_PCM_WRITE_CHANNELS;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SOUND_PCM_WRITE_FILTER:
args->cmd = SOUND_PCM_WRITE_FILTER;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_POST:
args->cmd = SNDCTL_DSP_POST;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SUBDIVIDE:
args->cmd = SNDCTL_DSP_SUBDIVIDE;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETFRAGMENT:
args->cmd = SNDCTL_DSP_SETFRAGMENT;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETFMTS:
args->cmd = SNDCTL_DSP_GETFMTS;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETOSPACE:
args->cmd = SNDCTL_DSP_GETOSPACE;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETISPACE:
args->cmd = SNDCTL_DSP_GETISPACE;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_NONBLOCK:
args->cmd = SNDCTL_DSP_NONBLOCK;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETCAPS:
args->cmd = SNDCTL_DSP_GETCAPS;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETTRIGGER: /* LINUX_SNDCTL_GETTRIGGER */
args->cmd = SNDCTL_DSP_SETTRIGGER;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETIPTR:
args->cmd = SNDCTL_DSP_GETIPTR;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETOPTR:
args->cmd = SNDCTL_DSP_GETOPTR;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_SETDUPLEX:
args->cmd = SNDCTL_DSP_SETDUPLEX;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_DSP_GETODELAY:
args->cmd = SNDCTL_DSP_GETODELAY;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_RESET:
args->cmd = SNDCTL_SEQ_RESET;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_SYNC:
args->cmd = SNDCTL_SEQ_SYNC;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SYNTH_INFO:
args->cmd = SNDCTL_SYNTH_INFO;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_CTRLRATE:
args->cmd = SNDCTL_SEQ_CTRLRATE;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_GETOUTCOUNT:
args->cmd = SNDCTL_SEQ_GETOUTCOUNT;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_GETINCOUNT:
args->cmd = SNDCTL_SEQ_GETINCOUNT;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_PERCMODE:
args->cmd = SNDCTL_SEQ_PERCMODE;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_FM_LOAD_INSTR:
args->cmd = SNDCTL_FM_LOAD_INSTR;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_TESTMIDI:
args->cmd = SNDCTL_SEQ_TESTMIDI;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_RESETSAMPLES:
args->cmd = SNDCTL_SEQ_RESETSAMPLES;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_NRSYNTHS:
args->cmd = SNDCTL_SEQ_NRSYNTHS;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_NRMIDIS:
args->cmd = SNDCTL_SEQ_NRMIDIS;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_MIDI_INFO:
args->cmd = SNDCTL_MIDI_INFO;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SEQ_TRESHOLD:
args->cmd = SNDCTL_SEQ_TRESHOLD;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
case LINUX_SNDCTL_SYNTH_MEMAVL:
args->cmd = SNDCTL_SYNTH_MEMAVL;
return (ioctl(td, (struct ioctl_args *)args));
return (sys_ioctl(td, (struct ioctl_args *)args));
}
@ -1972,37 +1972,37 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args)
case LINUX_KIOCSOUND:
args->cmd = KIOCSOUND;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDMKTONE:
args->cmd = KDMKTONE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDGETLED:
args->cmd = KDGETLED;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDSETLED:
args->cmd = KDSETLED;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDSETMODE:
args->cmd = KDSETMODE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDGETMODE:
args->cmd = KDGETMODE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDGKBMODE:
args->cmd = KDGKBMODE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_KDSKBMODE: {
@ -2028,12 +2028,12 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args)
case LINUX_VT_OPENQRY:
args->cmd = VT_OPENQRY;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_GETMODE:
args->cmd = VT_GETMODE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_SETMODE: {
@ -2045,28 +2045,28 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args)
if ((error = copyout(&mode, (void *)args->arg, sizeof(mode))))
break;
args->cmd = VT_SETMODE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
}
case LINUX_VT_GETSTATE:
args->cmd = VT_GETACTIVE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_RELDISP:
args->cmd = VT_RELDISP;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_ACTIVATE:
args->cmd = VT_ACTIVATE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_VT_WAITACTIVE:
args->cmd = VT_WAITACTIVE;
error = (ioctl(td, (struct ioctl_args *)args));
error = (sys_ioctl(td, (struct ioctl_args *)args));
break;
default:
@ -2440,27 +2440,27 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_FIOSETOWN:
args->cmd = FIOSETOWN;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSPGRP:
args->cmd = SIOCSPGRP;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_FIOGETOWN:
args->cmd = FIOGETOWN;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGPGRP:
args->cmd = SIOCGPGRP;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCATMARK:
args->cmd = SIOCATMARK;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
/* LINUX_SIOCGSTAMP */
@ -2476,31 +2476,31 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCGIFADDR:
args->cmd = SIOCGIFADDR;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
case LINUX_SIOCSIFADDR:
/* XXX probably doesn't work, included for completeness */
args->cmd = SIOCSIFADDR;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFDSTADDR:
args->cmd = SIOCGIFDSTADDR;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
case LINUX_SIOCGIFBRDADDR:
args->cmd = SIOCGIFBRDADDR;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
case LINUX_SIOCGIFNETMASK:
args->cmd = SIOCGIFNETMASK;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
bsd_to_linux_ifreq((struct ifreq *)args->arg);
break;
@ -2510,12 +2510,12 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCGIFMTU:
args->cmd = SIOCGIFMTU;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSIFMTU:
args->cmd = SIOCSIFMTU;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSIFNAME:
@ -2532,17 +2532,17 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCADDMULTI:
args->cmd = SIOCADDMULTI;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCDELMULTI:
args->cmd = SIOCDELMULTI;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFINDEX:
args->cmd = SIOCGIFINDEX;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFCOUNT:
@ -2555,12 +2555,12 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
*/
case LINUX_SIOCDEVPRIVATE:
args->cmd = SIOCGPRIVATE_0;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCDEVPRIVATE+1:
args->cmd = SIOCGPRIVATE_1;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
}
@ -2599,7 +2599,7 @@ static int
linux_ioctl_drm(struct thread *td, struct linux_ioctl_args *args)
{
args->cmd = SETDIR(args->cmd);
return ioctl(td, (struct ioctl_args *)args);
return sys_ioctl(td, (struct ioctl_args *)args);
}
static int
@ -2971,7 +2971,7 @@ linux_ioctl_v4l(struct thread *td, struct linux_ioctl_args *args)
default: return (ENOIOCTL);
}
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
return (error);
}
@ -2986,15 +2986,15 @@ linux_ioctl_special(struct thread *td, struct linux_ioctl_args *args)
switch (args->cmd) {
case LINUX_SIOCGIFADDR:
args->cmd = SIOCGIFADDR;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCSIFADDR:
args->cmd = SIOCSIFADDR;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
case LINUX_SIOCGIFFLAGS:
args->cmd = SIOCGIFFLAGS;
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
break;
default:
error = ENOIOCTL;
@ -3295,7 +3295,7 @@ linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args)
default: return (ENOIOCTL);
}
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
return (error);
}
@ -3411,7 +3411,7 @@ linux_ioctl_fbsd_usb(struct thread *td, struct linux_ioctl_args *args)
error = ENOIOCTL;
}
if (error != ENOIOCTL)
error = ioctl(td, (struct ioctl_args *)args);
error = sys_ioctl(td, (struct ioctl_args *)args);
return (error);
}

View File

@ -496,7 +496,7 @@ linux_semop(struct thread *td, struct linux_semop_args *args)
bsd_args.semid = args->semid;
bsd_args.sops = PTRIN(args->tsops);
bsd_args.nsops = args->nsops;
return (semop(td, &bsd_args));
return (sys_semop(td, &bsd_args));
}
int
@ -513,7 +513,7 @@ linux_semget(struct thread *td, struct linux_semget_args *args)
bsd_args.key = args->key;
bsd_args.nsems = args->nsems;
bsd_args.semflg = args->semflg;
return (semget(td, &bsd_args));
return (sys_semget(td, &bsd_args));
}
int
@ -661,7 +661,7 @@ linux_msgget(struct thread *td, struct linux_msgget_args *args)
bsd_args.key = args->key;
bsd_args.msgflg = args->msgflg;
return (msgget(td, &bsd_args));
return (sys_msgget(td, &bsd_args));
}
int
@ -753,7 +753,7 @@ linux_shmat(struct thread *td, struct linux_shmat_args *args)
bsd_args.shmid = args->shmid;
bsd_args.shmaddr = PTRIN(args->shmaddr);
bsd_args.shmflg = args->shmflg;
if ((error = shmat(td, &bsd_args)))
if ((error = sys_shmat(td, &bsd_args)))
return (error);
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
addr = td->td_retval[0];
@ -772,7 +772,7 @@ linux_shmdt(struct thread *td, struct linux_shmdt_args *args)
} */ bsd_args;
bsd_args.shmaddr = PTRIN(args->shmaddr);
return (shmdt(td, &bsd_args));
return (sys_shmdt(td, &bsd_args));
}
int
@ -787,7 +787,7 @@ linux_shmget(struct thread *td, struct linux_shmget_args *args)
bsd_args.key = args->key;
bsd_args.size = args->size;
bsd_args.shmflg = args->shmflg;
return (shmget(td, &bsd_args));
return (sys_shmget(td, &bsd_args));
}
int

View File

@ -209,7 +209,7 @@ linux_brk(struct thread *td, struct linux_brk_args *args)
old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize);
new = (vm_offset_t)args->dsend;
tmp.nsize = (char *)new;
if (((caddr_t)new > vm->vm_daddr) && !obreak(td, &tmp))
if (((caddr_t)new > vm->vm_daddr) && !sys_obreak(td, &tmp))
td->td_retval[0] = (long)new;
else
td->td_retval[0] = (long)old;
@ -609,7 +609,7 @@ linux_mremap(struct thread *td, struct linux_mremap_args *args)
bsd_args.addr =
(caddr_t)((uintptr_t)args->addr + args->new_len);
bsd_args.len = args->old_len - args->new_len;
error = munmap(td, &bsd_args);
error = sys_munmap(td, &bsd_args);
}
td->td_retval[0] = error ? 0 : (uintptr_t)args->addr;
@ -629,7 +629,7 @@ linux_msync(struct thread *td, struct linux_msync_args *args)
bsd_args.len = (uintptr_t)args->len;
bsd_args.flags = args->fl & ~LINUX_MS_SYNC;
return (msync(td, &bsd_args));
return (sys_msync(td, &bsd_args));
}
int
@ -1085,7 +1085,7 @@ linux_nice(struct thread *td, struct linux_nice_args *args)
bsd_args.which = PRIO_PROCESS;
bsd_args.who = 0; /* current process */
bsd_args.prio = args->inc;
return (setpriority(td, &bsd_args));
return (sys_setpriority(td, &bsd_args));
}
int
@ -1317,7 +1317,7 @@ linux_sched_setscheduler(struct thread *td,
bsd.pid = args->pid;
bsd.param = (struct sched_param *)args->param;
return (sched_setscheduler(td, &bsd));
return (sys_sched_setscheduler(td, &bsd));
}
int
@ -1333,7 +1333,7 @@ linux_sched_getscheduler(struct thread *td,
#endif
bsd.pid = args->pid;
error = sched_getscheduler(td, &bsd);
error = sys_sched_getscheduler(td, &bsd);
switch (td->td_retval[0]) {
case SCHED_OTHER:
@ -1374,7 +1374,7 @@ linux_sched_get_priority_max(struct thread *td,
default:
return (EINVAL);
}
return (sched_get_priority_max(td, &bsd));
return (sys_sched_get_priority_max(td, &bsd));
}
int
@ -1401,7 +1401,7 @@ linux_sched_get_priority_min(struct thread *td,
default:
return (EINVAL);
}
return (sched_get_priority_min(td, &bsd));
return (sys_sched_get_priority_min(td, &bsd));
}
#define REBOOT_CAD_ON 0x89abcdef
@ -1454,7 +1454,7 @@ linux_reboot(struct thread *td, struct linux_reboot_args *args)
default:
return (EINVAL);
}
return (reboot(td, &bsd_args));
return (sys_reboot(td, &bsd_args));
}
@ -1592,7 +1592,7 @@ linux_getsid(struct thread *td, struct linux_getsid_args *args)
#endif
bsd.pid = args->pid;
return (getsid(td, &bsd));
return (sys_getsid(td, &bsd));
}
int
@ -1615,7 +1615,7 @@ linux_getpriority(struct thread *td, struct linux_getpriority_args *args)
bsd_args.which = args->which;
bsd_args.who = args->who;
error = getpriority(td, &bsd_args);
error = sys_getpriority(td, &bsd_args);
td->td_retval[0] = 20 - td->td_retval[0];
return (error);
}
@ -1893,7 +1893,7 @@ linux_sched_getaffinity(struct thread *td,
cga.cpusetsize = sizeof(cpuset_t);
cga.mask = (cpuset_t *) args->user_mask_ptr;
if ((error = cpuset_getaffinity(td, &cga)) == 0)
if ((error = sys_cpuset_getaffinity(td, &cga)) == 0)
td->td_retval[0] = sizeof(cpuset_t);
return (error);
@ -1922,5 +1922,5 @@ linux_sched_setaffinity(struct thread *td,
csa.cpusetsize = sizeof(cpuset_t);
csa.mask = (cpuset_t *) args->user_mask_ptr;
return (cpuset_setaffinity(td, &csa));
return (sys_cpuset_setaffinity(td, &csa));
}

View File

@ -533,7 +533,7 @@ linux_kill(struct thread *td, struct linux_kill_args *args)
tmp.signum = args->signum;
tmp.pid = args->pid;
return (kill(td, &tmp));
return (sys_kill(td, &tmp));
}
static int

View File

@ -643,7 +643,7 @@ linux_socket(struct thread *td, struct linux_socket_args *args)
if (bsd_args.domain == -1)
return (EAFNOSUPPORT);
retval_socket = socket(td, &bsd_args);
retval_socket = sys_socket(td, &bsd_args);
if (retval_socket)
return (retval_socket);
@ -774,7 +774,7 @@ linux_listen(struct thread *td, struct linux_listen_args *args)
bsd_args.s = args->s;
bsd_args.backlog = args->backlog;
return (listen(td, &bsd_args));
return (sys_listen(td, &bsd_args));
}
static int
@ -795,7 +795,7 @@ linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
/* XXX: */
bsd_args.name = (struct sockaddr * __restrict)PTRIN(addr);
bsd_args.anamelen = PTRIN(namelen);/* XXX */
error = accept(td, &bsd_args);
error = sys_accept(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.name);
if (error) {
if (error == EFAULT && namelen != sizeof(struct sockaddr_in))
@ -874,7 +874,7 @@ linux_getsockname(struct thread *td, struct linux_getsockname_args *args)
/* XXX: */
bsd_args.asa = (struct sockaddr * __restrict)PTRIN(args->addr);
bsd_args.alen = PTRIN(args->namelen); /* XXX */
error = getsockname(td, &bsd_args);
error = sys_getsockname(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa);
if (error)
return (error);
@ -903,7 +903,7 @@ linux_getpeername(struct thread *td, struct linux_getpeername_args *args)
bsd_args.fdes = args->s;
bsd_args.asa = (struct sockaddr *)PTRIN(args->addr);
bsd_args.alen = (int *)PTRIN(args->namelen);
error = getpeername(td, &bsd_args);
error = sys_getpeername(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa);
if (error)
return (error);
@ -1001,7 +1001,7 @@ linux_send(struct thread *td, struct linux_send_args *args)
bsd_args.flags = args->flags;
bsd_args.to = NULL;
bsd_args.tolen = 0;
return sendto(td, &bsd_args);
return sys_sendto(td, &bsd_args);
}
struct linux_recv_args {
@ -1029,7 +1029,7 @@ linux_recv(struct thread *td, struct linux_recv_args *args)
bsd_args.flags = linux_to_bsd_msg_flags(args->flags);
bsd_args.from = NULL;
bsd_args.fromlenaddr = 0;
return (recvfrom(td, &bsd_args));
return (sys_recvfrom(td, &bsd_args));
}
static int
@ -1091,7 +1091,7 @@ linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args)
bsd_args.fromlenaddr = PTRIN(args->fromlen);/* XXX */
linux_to_bsd_sockaddr((struct sockaddr *)bsd_args.from, len);
error = recvfrom(td, &bsd_args);
error = sys_recvfrom(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.from);
if (error)
@ -1438,7 +1438,7 @@ linux_shutdown(struct thread *td, struct linux_shutdown_args *args)
bsd_args.s = args->s;
bsd_args.how = args->how;
return (shutdown(td, &bsd_args));
return (sys_shutdown(td, &bsd_args));
}
struct linux_setsockopt_args {
@ -1507,10 +1507,10 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args)
if (name == IPV6_NEXTHOP) {
linux_to_bsd_sockaddr((struct sockaddr *)bsd_args.val,
bsd_args.valsize);
error = setsockopt(td, &bsd_args);
error = sys_setsockopt(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.val);
} else
error = setsockopt(td, &bsd_args);
error = sys_setsockopt(td, &bsd_args);
return (error);
}
@ -1600,10 +1600,10 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args)
bsd_args.avalsize = PTRIN(args->optlen);
if (name == IPV6_NEXTHOP) {
error = getsockopt(td, &bsd_args);
error = sys_getsockopt(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.val);
} else
error = getsockopt(td, &bsd_args);
error = sys_getsockopt(td, &bsd_args);
return (error);
}

View File

@ -234,7 +234,7 @@ linux_getegid16(struct thread *td, struct linux_getegid16_args *args)
{
struct getegid_args bsd;
return (getegid(td, &bsd));
return (sys_getegid(td, &bsd));
}
int
@ -242,7 +242,7 @@ linux_geteuid16(struct thread *td, struct linux_geteuid16_args *args)
{
struct geteuid_args bsd;
return (geteuid(td, &bsd));
return (sys_geteuid(td, &bsd));
}
int
@ -251,7 +251,7 @@ linux_setgid16(struct thread *td, struct linux_setgid16_args *args)
struct setgid_args bsd;
bsd.gid = args->gid;
return (setgid(td, &bsd));
return (sys_setgid(td, &bsd));
}
int
@ -260,7 +260,7 @@ linux_setuid16(struct thread *td, struct linux_setuid16_args *args)
struct setuid_args bsd;
bsd.uid = args->uid;
return (setuid(td, &bsd));
return (sys_setuid(td, &bsd));
}
int
@ -270,7 +270,7 @@ linux_setregid16(struct thread *td, struct linux_setregid16_args *args)
bsd.rgid = CAST_NOCHG(args->rgid);
bsd.egid = CAST_NOCHG(args->egid);
return (setregid(td, &bsd));
return (sys_setregid(td, &bsd));
}
int
@ -280,7 +280,7 @@ linux_setreuid16(struct thread *td, struct linux_setreuid16_args *args)
bsd.ruid = CAST_NOCHG(args->ruid);
bsd.euid = CAST_NOCHG(args->euid);
return (setreuid(td, &bsd));
return (sys_setreuid(td, &bsd));
}
int
@ -291,7 +291,7 @@ linux_setresgid16(struct thread *td, struct linux_setresgid16_args *args)
bsd.rgid = CAST_NOCHG(args->rgid);
bsd.egid = CAST_NOCHG(args->egid);
bsd.sgid = CAST_NOCHG(args->sgid);
return (setresgid(td, &bsd));
return (sys_setresgid(td, &bsd));
}
int
@ -302,5 +302,5 @@ linux_setresuid16(struct thread *td, struct linux_setresuid16_args *args)
bsd.ruid = CAST_NOCHG(args->ruid);
bsd.euid = CAST_NOCHG(args->euid);
bsd.suid = CAST_NOCHG(args->suid);
return (setresuid(td, &bsd));
return (sys_setresuid(td, &bsd));
}

View File

@ -368,7 +368,7 @@ fd_truncate(td, fd, flp)
ft.fd = fd;
ft.length = start;
error = ftruncate(td, &ft);
error = sys_ftruncate(td, &ft);
fdrop(fp, td);
return (error);
@ -476,7 +476,7 @@ svr4_sys_llseek(td, uap)
#endif
ap.whence = uap->whence;
return lseek(td, &ap);
return sys_lseek(td, &ap);
}
int

View File

@ -75,7 +75,7 @@ svr4_sys_poll(td, uap)
siz = uap->nfds * sizeof(struct pollfd);
pfd = (struct pollfd *)malloc(siz, M_TEMP, M_WAITOK);
error = poll(td, (struct poll_args *)uap);
error = sys_poll(td, (struct poll_args *)uap);
if ((cerr = copyin(uap->fds, pfd, siz)) != 0) {
error = cerr;

View File

@ -292,7 +292,7 @@ svr4_semget(td, v)
ap.nsems = uap->nsems;
ap.semflg = uap->semflg;
return semget(td, &ap);
return sys_semget(td, &ap);
}
struct svr4_sys_semop_args {
@ -315,7 +315,7 @@ svr4_semop(td, v)
ap.sops = (struct sembuf *) uap->sops;
ap.nsops = uap->nsops;
return semop(td, &ap);
return sys_semop(td, &ap);
}
int
@ -400,7 +400,7 @@ svr4_msgsnd(td, v)
ap.msgsz = uap->msgsz;
ap.msgflg = uap->msgflg;
return msgsnd(td, &ap);
return sys_msgsnd(td, &ap);
}
struct svr4_sys_msgrcv_args {
@ -426,7 +426,7 @@ svr4_msgrcv(td, v)
ap.msgtyp = uap->msgtyp;
ap.msgflg = uap->msgflg;
return msgrcv(td, &ap);
return sys_msgrcv(td, &ap);
}
struct svr4_sys_msgget_args {
@ -446,7 +446,7 @@ svr4_msgget(td, v)
ap.key = uap->key;
ap.msgflg = uap->msgflg;
return msgget(td, &ap);
return sys_msgget(td, &ap);
}
struct svr4_sys_msgctl_args {
@ -569,7 +569,7 @@ svr4_shmat(td, v)
ap.shmaddr = uap->shmaddr;
ap.shmflg = uap->shmflg;
return shmat(td, &ap);
return sys_shmat(td, &ap);
}
struct svr4_sys_shmdt_args {
@ -587,7 +587,7 @@ svr4_shmdt(td, v)
ap.shmaddr = uap->shmaddr;
return shmdt(td, &ap);
return sys_shmdt(td, &ap);
}
struct svr4_sys_shmget_args {
@ -609,7 +609,7 @@ svr4_shmget(td, v)
ap.size = uap->size;
ap.shmflg = uap->shmflg;
return shmget(td, &ap);
return sys_shmget(td, &ap);
}
struct svr4_sys_shmctl_args {

View File

@ -569,7 +569,7 @@ svr4_sys_mmap(td, uap)
mm.addr = uap->addr;
mm.pos = uap->pos;
return mmap(td, &mm);
return sys_mmap(td, &mm);
}
int
@ -602,7 +602,7 @@ svr4_sys_mmap64(td, uap)
mm.addr != 0 && (void *)mm.addr < rp)
mm.addr = rp;
return mmap(td, &mm);
return sys_mmap(td, &mm);
}
@ -844,7 +844,7 @@ svr4_sys_break(td, uap)
struct obreak_args ap;
ap.nsize = uap->nsize;
return (obreak(td, &ap));
return (sys_obreak(td, &ap));
}
static __inline clock_t
@ -990,7 +990,7 @@ svr4_sys_pgrpsys(td, uap)
* setsid() for SVR4. (Under BSD, the difference is that
* a setpgid(0,0) will not create a new session.)
*/
setsid(td, NULL);
sys_setsid(td, NULL);
/*FALLTHROUGH*/
case 0: /* getpgrp() */
@ -1013,7 +1013,7 @@ svr4_sys_pgrpsys(td, uap)
return 0;
case 3: /* setsid() */
return setsid(td, NULL);
return sys_setsid(td, NULL);
case 4: /* getpgid(pid) */
@ -1032,7 +1032,7 @@ svr4_sys_pgrpsys(td, uap)
sa.pid = uap->pid;
sa.pgid = uap->pgid;
return setpgid(td, &sa);
return sys_setpgid(td, &sa);
}
default:
@ -1598,7 +1598,7 @@ svr4_sys_memcntl(td, uap)
msa.len = uap->len;
msa.flags = (int)uap->arg;
return msync(td, &msa);
return sys_msync(td, &msa);
}
case SVR4_MC_ADVISE:
{
@ -1608,7 +1608,7 @@ svr4_sys_memcntl(td, uap)
maa.len = uap->len;
maa.behav = (int)uap->arg;
return madvise(td, &maa);
return sys_madvise(td, &maa);
}
case SVR4_MC_LOCK:
case SVR4_MC_UNLOCK:
@ -1633,11 +1633,11 @@ svr4_sys_nice(td, uap)
ap.who = 0;
ap.prio = uap->prio;
if ((error = setpriority(td, &ap)) != 0)
if ((error = sys_setpriority(td, &ap)) != 0)
return error;
/* the cast is stupid, but the structures are the same */
if ((error = getpriority(td, (struct getpriority_args *)&ap)) != 0)
if ((error = sys_getpriority(td, (struct getpriority_args *)&ap)) != 0)
return error;
return 0;

View File

@ -519,7 +519,7 @@ svr4_sys_kill(td, uap)
return (EINVAL);
ka.pid = uap->pid;
ka.signum = SVR4_SVR42BSD_SIG(uap->signum);
return kill(td, &ka);
return sys_kill(td, &ka);
}

View File

@ -238,5 +238,5 @@ svr4_sys_socket(td, uap)
default:
return EINVAL;
}
return socket(td, (struct socket_args *)uap);
return sys_socket(td, (struct socket_args *)uap);
}

View File

@ -694,6 +694,6 @@ svr4_sys_fpathconf(td, uap)
*retval = 0;
return 0;
default:
return fpathconf(td, (struct fpathconf_args *)uap);
return sys_fpathconf(td, (struct fpathconf_args *)uap);
}
}

View File

@ -523,7 +523,7 @@ si_listen(fp, fd, ioc, td)
DPRINTF(("SI_LISTEN: fileno %d backlog = %d\n", fd, 5));
la.backlog = 5;
if ((error = listen(td, &la)) != 0) {
if ((error = sys_listen(td, &la)) != 0) {
DPRINTF(("SI_LISTEN: listen failed %d\n", error));
return error;
}
@ -637,7 +637,7 @@ si_shutdown(fp, fd, ioc, td)
ap.s = fd;
return shutdown(td, &ap);
return sys_shutdown(td, &ap);
}
@ -1056,7 +1056,7 @@ i_fdinsert(fp, td, retval, fd, cmd, dat)
d2p.from = st->s_afd;
d2p.to = fdi.fd;
if ((error = dup2(td, &d2p)) != 0) {
if ((error = sys_dup2(td, &d2p)) != 0) {
DPRINTF(("fdinsert: dup2(%d, %d) failed %d\n",
st->s_afd, fdi.fd, error));
mtx_unlock(&Giant);
@ -1099,7 +1099,7 @@ _i_bind_rsvd(fp, td, retval, fd, cmd, dat)
ap.path = dat;
ap.mode = S_IFIFO;
return mkfifo(td, &ap);
return sys_mkfifo(td, &ap);
}
static int
@ -1119,7 +1119,7 @@ _i_rele_rsvd(fp, td, retval, fd, cmd, dat)
*/
ap.path = dat;
return unlink(td, &ap);
return sys_unlink(td, &ap);
}
static int
@ -1539,7 +1539,7 @@ svr4_do_putmsg(td, uap, fp)
wa.fd = uap->fd;
wa.buf = dat.buf;
wa.nbyte = dat.len;
return write(td, &wa);
return sys_write(td, &wa);
}
DPRINTF(("putmsg: Invalid inet length %ld\n", sc.len));
return EINVAL;
@ -1926,7 +1926,7 @@ svr4_do_getmsg(td, uap, fp)
ra.fd = uap->fd;
ra.buf = dat.buf;
ra.nbyte = dat.maxlen;
if ((error = read(td, &ra)) != 0) {
if ((error = sys_read(td, &ra)) != 0) {
mtx_unlock(&Giant);
return error;
}
@ -1995,7 +1995,7 @@ int svr4_sys_send(td, uap)
sta.to = NULL;
sta.tolen = 0;
return (sendto(td, &sta));
return (sys_sendto(td, &sta));
}
int svr4_sys_recv(td, uap)
@ -2011,7 +2011,7 @@ int svr4_sys_recv(td, uap)
rfa.from = NULL;
rfa.fromlenaddr = NULL;
return (recvfrom(td, &rfa));
return (sys_recvfrom(td, &rfa));
}
/*
@ -2033,6 +2033,6 @@ svr4_sys_sendto(td, uap)
sa.tolen = uap->tolen;
DPRINTF(("calling sendto()\n"));
return sendto(td, &sa);
return sys_sendto(td, &sa);
}

View File

@ -918,7 +918,7 @@ common_bktr_intr( void *arg )
if (bktr->proc != NULL) {
PROC_LOCK(bktr->proc);
psignal( bktr->proc, bktr->signal);
kern_psignal( bktr->proc, bktr->signal);
PROC_UNLOCK(bktr->proc);
}

View File

@ -324,7 +324,7 @@ pmclog_loop(void *arg)
/* XXX some errors are recoverable */
/* send a SIGIO to the owner and exit */
PROC_LOCK(p);
psignal(p, SIGIO);
kern_psignal(p, SIGIO);
PROC_UNLOCK(p);
mtx_lock(&pmc_kthread_mtx);

View File

@ -889,7 +889,7 @@ pmc_unlink_target_process(struct pmc *pm, struct pmc_process *pp)
if (LIST_EMPTY(&pm->pm_targets)) {
p = pm->pm_owner->po_owner;
PROC_LOCK(p);
psignal(p, SIGIO);
kern_psignal(p, SIGIO);
PROC_UNLOCK(p);
PMCDBG(PRC,SIG,2, "signalling proc=%p signal=%d", p,
@ -4812,7 +4812,7 @@ pmc_cleanup(void)
po->po_owner->p_comm);
PROC_LOCK(po->po_owner);
psignal(po->po_owner, SIGBUS);
kern_psignal(po->po_owner, SIGBUS);
PROC_UNLOCK(po->po_owner);
pmc_destroy_owner_descriptor(po);

View File

@ -628,7 +628,7 @@ isc_in(void *vp)
sp->flags, so->so_count, so->so_state, error, sp->proc);
if((sp->proc != NULL) && sp->signal) {
PROC_LOCK(sp->proc);
psignal(sp->proc, sp->signal);
kern_psignal(sp->proc, sp->signal);
PROC_UNLOCK(sp->proc);
sp->flags |= ISC_SIGNALED;
sdebug(2, "pid=%d signaled(%d)", sp->proc->p_pid, sp->signal);

View File

@ -1174,7 +1174,7 @@ mfi_aen_complete(struct mfi_command *cm)
TAILQ_REMOVE(&sc->mfi_aen_pids, mfi_aen_entry,
aen_link);
PROC_LOCK(mfi_aen_entry->p);
psignal(mfi_aen_entry->p, SIGIO);
kern_psignal(mfi_aen_entry->p, SIGIO);
PROC_UNLOCK(mfi_aen_entry->p);
free(mfi_aen_entry, M_MFIBUF);
}

View File

@ -562,7 +562,7 @@ midi_in(struct snd_midi *m, MIDI_TYPE *buf, int size)
selwakeup(&m->rsel);
if (m->async) {
PROC_LOCK(m->async);
psignal(m->async, SIGIO);
kern_psignal(m->async, SIGIO);
PROC_UNLOCK(m->async);
}
#if 0
@ -604,7 +604,7 @@ midi_out(struct snd_midi *m, MIDI_TYPE *buf, int size)
selwakeup(&m->wsel);
if (m->async) {
PROC_LOCK(m->async);
psignal(m->async, SIGIO);
kern_psignal(m->async, SIGIO);
PROC_UNLOCK(m->async);
}
}

View File

@ -811,7 +811,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
if (p1)
PROC_UNLOCK(p1);
} else {
psignal(cur_scp->mouse_proc, cur_scp->mouse_signal);
kern_psignal(cur_scp->mouse_proc, cur_scp->mouse_signal);
PROC_UNLOCK(cur_scp->mouse_proc);
break;
}
@ -871,7 +871,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
if (p1)
PROC_UNLOCK(p1);
} else {
psignal(cur_scp->mouse_proc, cur_scp->mouse_signal);
kern_psignal(cur_scp->mouse_proc, cur_scp->mouse_signal);
PROC_UNLOCK(cur_scp->mouse_proc);
break;
}

View File

@ -2508,7 +2508,7 @@ signal_vt_rel(scr_stat *scp)
return FALSE;
scp->status |= SWITCH_WAIT_REL;
PROC_LOCK(scp->proc);
psignal(scp->proc, scp->smode.relsig);
kern_psignal(scp->proc, scp->smode.relsig);
PROC_UNLOCK(scp->proc);
DPRINTF(5, ("sending relsig to %d\n", scp->pid));
return TRUE;
@ -2523,7 +2523,7 @@ signal_vt_acq(scr_stat *scp)
cnavailable(sc_consptr, FALSE);
scp->status |= SWITCH_WAIT_ACQ;
PROC_LOCK(scp->proc);
psignal(scp->proc, scp->smode.acqsig);
kern_psignal(scp->proc, scp->smode.acqsig);
PROC_UNLOCK(scp->proc);
DPRINTF(5, ("sending acqsig to %d\n", scp->pid));
return TRUE;

View File

@ -768,7 +768,7 @@ usb_fifo_close(struct usb_fifo *f, int fflags)
/* check if a thread wants SIGIO */
if (f->async_p != NULL) {
PROC_LOCK(f->async_p);
psignal(f->async_p, SIGIO);
kern_psignal(f->async_p, SIGIO);
PROC_UNLOCK(f->async_p);
f->async_p = NULL;
}
@ -1582,7 +1582,7 @@ usb_fifo_wakeup(struct usb_fifo *f)
}
if (f->async_p != NULL) {
PROC_LOCK(f->async_p);
psignal(f->async_p, SIGIO);
kern_psignal(f->async_p, SIGIO);
PROC_UNLOCK(f->async_p);
}
}

View File

@ -3230,7 +3230,7 @@ nfsrv_backupstable(void)
procp->p_stats->p_start.tv_usec ==
nfsd_master_start.tv_usec &&
strcmp(procp->p_comm, nfsd_master_comm) == 0)
psignal(procp, SIGUSR2);
kern_psignal(procp, SIGUSR2);
else
nfsd_master_proc = NULL;

View File

@ -147,7 +147,7 @@ procfs_control(struct thread *td, struct proc *p, int op)
p->p_oppid = p->p_pptr->p_pid;
proc_reparent(p, td->td_proc);
}
psignal(p, SIGSTOP);
kern_psignal(p, SIGSTOP);
out:
PROC_UNLOCK(p);
sx_xunlock(&proctree_lock);
@ -348,7 +348,7 @@ procfs_doprocctl(PFS_FILL_ARGS)
thread_unsuspend(p);
PROC_SUNLOCK(p);
} else
psignal(p, nm->nm_val);
kern_psignal(p, nm->nm_val);
PROC_UNLOCK(p);
error = 0;
}

View File

@ -188,10 +188,10 @@ procfs_ioctl(PFS_IOCTL_ARGS)
thread_unsuspend(p);
PROC_SUNLOCK(p);
} else if (sig)
psignal(p, sig);
kern_psignal(p, sig);
#else
if (sig)
psignal(p, sig);
kern_psignal(p, sig);
p->p_step = 0;
wakeup(&p->p_step);
#endif

View File

@ -1000,7 +1000,7 @@ freebsd4_sigreturn(td, uap)
* MPSAFE
*/
int
sigreturn(td, uap)
sys_sigreturn(td, uap)
struct thread *td;
struct sigreturn_args /* {
const struct __ucontext *sigcntxp;

View File

@ -612,7 +612,7 @@ trap(struct trapframe *frame)
PCPU_GET(curpcb)->pcb_gs = 0;
#if 0
PROC_LOCK(p);
psignal(p, SIGBUS);
kern_psignal(p, SIGBUS);
PROC_UNLOCK(p);
#endif
goto out;

View File

@ -499,12 +499,12 @@ ibcs2_ioctl(td, uap)
case IBCS2_TIOCGWINSZ:
uap->cmd = TIOCGWINSZ;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_TIOCSWINSZ:
uap->cmd = TIOCSWINSZ;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_TIOCGPGRP:
@ -525,7 +525,7 @@ ibcs2_ioctl(td, uap)
sa.pid = 0;
sa.pgid = (int)uap->data;
error = setpgid(td, &sa);
error = sys_setpgid(td, &sa);
break;
}
@ -565,103 +565,103 @@ ibcs2_ioctl(td, uap)
case IBCS2_KDGKBMODE: /* get keyboard translation mode */
uap->cmd = KDGKBMODE;
/* printf("ioctl KDGKBMODE = %x\n", uap->cmd);*/
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDSKBMODE: /* set keyboard translation mode */
uap->cmd = KDSKBMODE;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDMKTONE: /* sound tone */
uap->cmd = KDMKTONE;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDGETMODE: /* get text/graphics mode */
uap->cmd = KDGETMODE;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDSETMODE: /* set text/graphics mode */
uap->cmd = KDSETMODE;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDSBORDER: /* set ega color border */
uap->cmd = KDSBORDER;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDGKBSTATE:
uap->cmd = KDGKBSTATE;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDSETRAD:
uap->cmd = KDSETRAD;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDENABIO: /* enable direct I/O to ports */
uap->cmd = KDENABIO;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDDISABIO: /* disable direct I/O to ports */
uap->cmd = KDDISABIO;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KIOCSOUND: /* start sound generation */
uap->cmd = KIOCSOUND;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDGKBTYPE: /* get keyboard type */
uap->cmd = KDGKBTYPE;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDGETLED: /* get keyboard LED status */
uap->cmd = KDGETLED;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_KDSETLED: /* set keyboard LED status */
uap->cmd = KDSETLED;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
/* Xenix keyboard and display ioctl's from sys/kd.h -- type 'k' */
case IBCS2_GETFKEY: /* Get function key */
uap->cmd = GETFKEY;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_SETFKEY: /* Set function key */
uap->cmd = SETFKEY;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_GIO_SCRNMAP: /* Get screen output map table */
uap->cmd = GIO_SCRNMAP;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_PIO_SCRNMAP: /* Set screen output map table */
uap->cmd = PIO_SCRNMAP;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_GIO_KEYMAP: /* Get keyboard map table */
uap->cmd = OGIO_KEYMAP;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
case IBCS2_PIO_KEYMAP: /* Set keyboard map table */
uap->cmd = OPIO_KEYMAP;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
/* socksys */
@ -672,7 +672,7 @@ ibcs2_ioctl(td, uap)
case IBCS2_FIONREAD:
case IBCS2_I_NREAD: /* STREAMS */
uap->cmd = FIONREAD;
error = ioctl(td, (struct ioctl_args *)uap);
error = sys_ioctl(td, (struct ioctl_args *)uap);
break;
default:

View File

@ -118,7 +118,7 @@ ibcs2_msgget(struct thread *td, void *v)
ap.key = uap->key;
ap.msgflg = uap->msgflg;
return msgget(td, &ap);
return sys_msgget(td, &ap);
}
struct ibcs2_msgctl_args {
@ -176,7 +176,7 @@ ibcs2_msgrcv(struct thread *td, void *v)
ap.msgsz = uap->msgsz;
ap.msgtyp = uap->msgtyp;
ap.msgflg = uap->msgflg;
return (msgrcv(td, &ap));
return (sys_msgrcv(td, &ap));
}
struct ibcs2_msgsnd_args {
@ -197,7 +197,7 @@ ibcs2_msgsnd(struct thread *td, void *v)
ap.msgp = uap->msgp;
ap.msgsz = uap->msgsz;
ap.msgflg = uap->msgflg;
return (msgsnd(td, &ap));
return (sys_msgsnd(td, &ap));
}
int
@ -363,7 +363,7 @@ ibcs2_semget(struct thread *td, void *v)
ap.key = uap->key;
ap.nsems = uap->nsems;
ap.semflg = uap->semflg;
return (semget(td, &ap));
return (sys_semget(td, &ap));
}
struct ibcs2_semop_args {
@ -382,7 +382,7 @@ ibcs2_semop(struct thread *td, void *v)
ap.semid = uap->semid;
ap.sops = uap->sops;
ap.nsops = uap->nsops;
return (semop(td, &ap));
return (sys_semop(td, &ap));
}
int
@ -459,7 +459,7 @@ ibcs2_shmat(struct thread *td, void *v)
ap.shmid = uap->shmid;
ap.shmaddr = uap->shmaddr;
ap.shmflg = uap->shmflg;
return (shmat(td, &ap));
return (sys_shmat(td, &ap));
}
struct ibcs2_shmctl_args {
@ -514,7 +514,7 @@ ibcs2_shmdt(struct thread *td, void *v)
struct shmdt_args ap;
ap.shmaddr = uap->shmaddr;
return (shmdt(td, &ap));
return (sys_shmdt(td, &ap));
}
struct ibcs2_shmget_args {
@ -533,7 +533,7 @@ ibcs2_shmget(struct thread *td, void *v)
ap.key = uap->key;
ap.size = uap->size;
ap.shmflg = uap->shmflg;
return (shmget(td, &ap));
return (sys_shmget(td, &ap));
}
int

View File

@ -240,7 +240,7 @@ ibcs2_umount(td, uap)
um.path = uap->name;
um.flags = 0;
return unmount(td, &um);
return sys_unmount(td, &um);
}
int
@ -497,7 +497,7 @@ ibcs2_read(td, uap)
if ((error = getvnode(td->td_proc->p_fd, uap->fd,
CAP_READ | CAP_SEEK, &fp)) != 0) {
if (error == EINVAL)
return read(td, (struct read_args *)uap);
return sys_read(td, (struct read_args *)uap);
else
return error;
}
@ -510,7 +510,7 @@ ibcs2_read(td, uap)
if (vp->v_type != VDIR) {
VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
return read(td, (struct read_args *)uap);
return sys_read(td, (struct read_args *)uap);
}
off = fp->f_offset;
@ -731,7 +731,7 @@ ibcs2_setuid(td, uap)
struct setuid_args sa;
sa.uid = (uid_t)uap->uid;
return setuid(td, &sa);
return sys_setuid(td, &sa);
}
int
@ -742,7 +742,7 @@ ibcs2_setgid(td, uap)
struct setgid_args sa;
sa.gid = (gid_t)uap->gid;
return setgid(td, &sa);
return sys_setgid(td, &sa);
}
int
@ -782,7 +782,7 @@ ibcs2_fpathconf(td, uap)
struct ibcs2_fpathconf_args *uap;
{
uap->name++; /* iBCS2 _PC_* defines are offset by one */
return fpathconf(td, (struct fpathconf_args *)uap);
return sys_fpathconf(td, (struct fpathconf_args *)uap);
}
int
@ -961,7 +961,7 @@ ibcs2_nice(td, uap)
sa.which = PRIO_PROCESS;
sa.who = 0;
sa.prio = td->td_proc->p_nice + uap->incr;
if ((error = setpriority(td, &sa)) != 0)
if ((error = sys_setpriority(td, &sa)) != 0)
return EPERM;
td->td_retval[0] = td->td_proc->p_nice;
return 0;
@ -990,7 +990,7 @@ ibcs2_pgrpsys(td, uap)
sa.pid = 0;
sa.pgid = 0;
setpgid(td, &sa);
sys_setpgid(td, &sa);
PROC_LOCK(p);
td->td_retval[0] = p->p_pgrp->pg_id;
PROC_UNLOCK(p);
@ -1003,11 +1003,11 @@ ibcs2_pgrpsys(td, uap)
sa.pid = uap->pid;
sa.pgid = uap->pgid;
return setpgid(td, &sa);
return sys_setpgid(td, &sa);
}
case 3: /* setsid */
return setsid(td, NULL);
return sys_setsid(td, NULL);
default:
return EINVAL;
@ -1082,11 +1082,11 @@ ibcs2_uadmin(td, uap)
case SCO_AD_PWRDOWN:
case SCO_AD_PWRNAP:
r.opt = RB_HALT;
return (reboot(td, &r));
return (sys_reboot(td, &r));
case SCO_AD_BOOT:
case SCO_AD_IBOOT:
r.opt = RB_AUTOBOOT;
return (reboot(td, &r));
return (sys_reboot(td, &r));
}
return EINVAL;
case SCO_A_REMOUNT:

View File

@ -75,7 +75,7 @@ ibcs2_lseek(struct thread *td, register struct ibcs2_lseek_args *uap)
largs.fd = uap->fd;
largs.offset = uap->offset;
largs.whence = uap->whence;
error = lseek(td, &largs);
error = sys_lseek(td, &largs);
return (error);
}
@ -95,7 +95,7 @@ spx_open(struct thread *td)
sock.domain = AF_UNIX;
sock.type = SOCK_STREAM;
sock.protocol = 0;
error = socket(td, &sock);
error = sys_socket(td, &sock);
if (error)
return error;
fd = td->td_retval[0];

View File

@ -437,5 +437,5 @@ ibcs2_kill(td, uap)
return (EINVAL);
ka.pid = uap->pid;
ka.signum = ibcs2_to_bsd_sig[_SIG_IDX(uap->signo)];
return kill(td, &ka);
return sys_kill(td, &ka);
}

View File

@ -81,55 +81,55 @@ ibcs2_socksys(td, uap)
passargs = (void *)(realargs + 1);
switch (realargs[0]) {
case SOCKSYS_ACCEPT:
return accept(td, passargs);
return sys_accept(td, passargs);
case SOCKSYS_BIND:
return bind(td, passargs);
return sys_bind(td, passargs);
case SOCKSYS_CONNECT:
return connect(td, passargs);
return sys_connect(td, passargs);
case SOCKSYS_GETPEERNAME:
return getpeername(td, passargs);
return sys_getpeername(td, passargs);
case SOCKSYS_GETSOCKNAME:
return getsockname(td, passargs);
return sys_getsockname(td, passargs);
case SOCKSYS_GETSOCKOPT:
return getsockopt(td, passargs);
return sys_getsockopt(td, passargs);
case SOCKSYS_LISTEN:
return listen(td, passargs);
return sys_listen(td, passargs);
case SOCKSYS_RECV:
realargs[5] = realargs[6] = 0;
/* FALLTHROUGH */
case SOCKSYS_RECVFROM:
return recvfrom(td, passargs);
return sys_recvfrom(td, passargs);
case SOCKSYS_SEND:
realargs[5] = realargs[6] = 0;
/* FALLTHROUGH */
case SOCKSYS_SENDTO:
return sendto(td, passargs);
return sys_sendto(td, passargs);
case SOCKSYS_SETSOCKOPT:
return setsockopt(td, passargs);
return sys_setsockopt(td, passargs);
case SOCKSYS_SHUTDOWN:
return shutdown(td, passargs);
return sys_shutdown(td, passargs);
case SOCKSYS_SOCKET:
return socket(td, passargs);
return sys_socket(td, passargs);
case SOCKSYS_SELECT:
return select(td, passargs);
return sys_select(td, passargs);
case SOCKSYS_GETIPDOMAIN:
return ibcs2_getipdomainname(td, passargs);
case SOCKSYS_SETIPDOMAIN:
return ibcs2_setipdomainname(td, passargs);
case SOCKSYS_ADJTIME:
return adjtime(td, passargs);
return sys_adjtime(td, passargs);
case SOCKSYS_SETREUID:
return setreuid(td, passargs);
return sys_setreuid(td, passargs);
case SOCKSYS_SETREGID:
return setregid(td, passargs);
return sys_setregid(td, passargs);
case SOCKSYS_GETTIME:
return gettimeofday(td, passargs);
return sys_gettimeofday(td, passargs);
case SOCKSYS_SETTIME:
return settimeofday(td, passargs);
return sys_settimeofday(td, passargs);
case SOCKSYS_GETITIMER:
return getitimer(td, passargs);
return sys_getitimer(td, passargs);
case SOCKSYS_SETITIMER:
return setitimer(td, passargs);
return sys_setitimer(td, passargs);
default:
printf("socksys unknown %08x %08x %08x %08x %08x %08x %08x\n",

View File

@ -103,7 +103,7 @@ xenix_chsize(td, uap)
DPRINTF(("IBCS2: 'xenix chsize'\n"));
sa.fd = uap->fd;
sa.length = uap->size;
return ftruncate(td, &sa);
return sys_ftruncate(td, &sa);
}

View File

@ -564,7 +564,7 @@ linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
(void *)bsd_args.addr, bsd_args.len, bsd_args.prot,
bsd_args.flags, bsd_args.fd, (int)bsd_args.pos);
#endif
error = mmap(td, &bsd_args);
error = sys_mmap(td, &bsd_args);
#ifdef DEBUG
if (ldebug(mmap))
printf("-> %s() return: 0x%x (0x%08x)\n",
@ -583,7 +583,7 @@ linux_mprotect(struct thread *td, struct linux_mprotect_args *uap)
bsd_args.prot = uap->prot;
if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
bsd_args.prot |= PROT_READ | PROT_EXEC;
return (mprotect(td, &bsd_args));
return (sys_mprotect(td, &bsd_args));
}
int
@ -844,7 +844,7 @@ linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args)
sa.fd = args->fd;
sa.length = args->length;
return ftruncate(td, &sa);
return sys_ftruncate(td, &sa);
}
int
@ -1000,31 +1000,31 @@ linux_get_thread_area(struct thread *td, struct linux_get_thread_area_args *args
int
linux_timer_create(struct thread *td, struct linux_timer_create_args *args)
{
return ktimer_create(td, (struct ktimer_create_args *) args);
return sys_ktimer_create(td, (struct ktimer_create_args *) args);
}
int
linux_timer_settime(struct thread *td, struct linux_timer_settime_args *args)
{
return ktimer_settime(td, (struct ktimer_settime_args *) args);
return sys_ktimer_settime(td, (struct ktimer_settime_args *) args);
}
int
linux_timer_gettime(struct thread *td, struct linux_timer_gettime_args *args)
{
return ktimer_gettime(td, (struct ktimer_gettime_args *) args);
return sys_ktimer_gettime(td, (struct ktimer_gettime_args *) args);
}
int
linux_timer_getoverrun(struct thread *td, struct linux_timer_getoverrun_args *args)
{
return ktimer_getoverrun(td, (struct ktimer_getoverrun_args *) args);
return sys_ktimer_getoverrun(td, (struct ktimer_getoverrun_args *) args);
}
int
linux_timer_delete(struct thread *td, struct linux_timer_delete_args *args)
{
return ktimer_delete(td, (struct ktimer_delete_args *) args);
return sys_ktimer_delete(td, (struct ktimer_delete_args *) args);
}
/* XXX: this wont work with module - convert it */
@ -1032,7 +1032,7 @@ int
linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
{
#ifdef P1003_1B_MQUEUE
return kmq_open(td, (struct kmq_open_args *) args);
return sys_kmq_open(td, (struct kmq_open_args *) args);
#else
return (ENOSYS);
#endif
@ -1042,7 +1042,7 @@ int
linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
{
#ifdef P1003_1B_MQUEUE
return kmq_unlink(td, (struct kmq_unlink_args *) args);
return sys_kmq_unlink(td, (struct kmq_unlink_args *) args);
#else
return (ENOSYS);
#endif
@ -1052,7 +1052,7 @@ int
linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
{
#ifdef P1003_1B_MQUEUE
return kmq_timedsend(td, (struct kmq_timedsend_args *) args);
return sys_kmq_timedsend(td, (struct kmq_timedsend_args *) args);
#else
return (ENOSYS);
#endif
@ -1062,7 +1062,7 @@ int
linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
{
#ifdef P1003_1B_MQUEUE
return kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
return sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
#else
return (ENOSYS);
#endif
@ -1072,7 +1072,7 @@ int
linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
{
#ifdef P1003_1B_MQUEUE
return kmq_notify(td, (struct kmq_notify_args *) args);
return sys_kmq_notify(td, (struct kmq_notify_args *) args);
#else
return (ENOSYS);
#endif
@ -1082,7 +1082,7 @@ int
linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
{
#ifdef P1003_1B_MQUEUE
return kmq_setattr(td, (struct kmq_setattr_args *) args);
return sys_kmq_setattr(td, (struct kmq_setattr_args *) args);
#else
return (ENOSYS);
#endif

View File

@ -117,14 +117,14 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
int
freebsd4_freebsd32_sigreturn(struct thread *td, struct freebsd4_freebsd32_sigreturn_args *uap)
{
return (sigreturn(td, (struct sigreturn_args *)uap));
return (sys_sigreturn(td, (struct sigreturn_args *)uap));
}
#endif
int
freebsd32_sigreturn(struct thread *td, struct freebsd32_sigreturn_args *uap)
{
return (sigreturn(td, (struct sigreturn_args *)uap));
return (sys_sigreturn(td, (struct sigreturn_args *)uap));
}

View File

@ -1155,7 +1155,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
* MPSAFE
*/
int
sigreturn(struct thread *td,
sys_sigreturn(struct thread *td,
struct sigreturn_args /* {
ucontext_t *sigcntxp;
} */ *uap)
@ -1192,7 +1192,7 @@ int
freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap)
{
return sigreturn(td, (struct sigreturn_args *)uap);
return sys_sigreturn(td, (struct sigreturn_args *)uap);
}
#endif

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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 @@ ktrace(td, uap)
/* ARGSUSED */
int
utrace(td, uap)
sys_utrace(td, uap)
struct thread *td;
register struct utrace_args *uap;
{

View File

@ -1045,7 +1045,7 @@ kern_kldload(struct thread *td, const char *file, int *fileid)
}
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 @@ kldfind(struct thread *td, struct kldfind_args *uap)
}
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 @@ kldnext(struct thread *td, struct kldnext_args *uap)
}
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;

View File

@ -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;

View File

@ -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 @@ modnext(struct thread *td, struct modnext_args *uap)
}
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];

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 @@ rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
}
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 @@ rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
}
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 @@ rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
}
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);

View File

@ -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;
{

View File

@ -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
/*

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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 @@ create_thread(struct thread *td, mcontext_t *ctx,
}
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];

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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));
}
/*

View File

@ -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];

View File

@ -206,7 +206,7 @@ kern_pdgetpid(struct thread *td, int fd, cap_rights_t rights, pid_t *pidp)
* 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);

View File

@ -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;

View File

@ -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 @@ kern_msgsnd(td, msqid, msgp, msgsz, msgflg, mtype)
}
int
msgsnd(td, uap)
sys_msgsnd(td, uap)
struct thread *td;
register struct msgsnd_args *uap;
{
@ -1296,7 +1298,7 @@ kern_msgrcv(td, msqid, msgp, msgsz, msgtyp, msgflg, mtype)
}
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 /* {

View File

@ -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));

View File

@ -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 @@ kern_shmat(td, shmid, shmaddr, shmflg)
}
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 @@ oshmctl(struct thread *td, struct oshmctl_args *uap)
/* 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 /* {

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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 @@ kern_accept(struct thread *td, int s, struct sockaddr **name,
}
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 @@ kern_socketpair(struct thread *td, int domain, int type, int protocol,
}
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 @@ kern_sendit(td, s, mp, flags, control, segflg)
}
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 @@ kern_getsockname(struct thread *td, int fd, struct sockaddr **sa,
}
int
getsockname(td, uap)
sys_getsockname(td, uap)
struct thread *td;
struct getsockname_args *uap;
{
@ -1624,7 +1624,7 @@ kern_getpeername(struct thread *td, int fd, struct sockaddr **sa,
}
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 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
* 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 @@ sctp_peeloff(td, uap)
}
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_generic_sendmsg (td, uap)
}
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_generic_sendmsg_iov(td, uap)
}
int
sctp_generic_recvmsg(td, uap)
sys_sctp_generic_recvmsg(td, uap)
struct thread *td;
struct sctp_generic_recvmsg_args /* {
int sd,

View File

@ -324,7 +324,7 @@ vacl_aclcheck(struct thread *td, struct vnode *vp, acl_type_t type,
* 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;

View File

@ -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 @@ kern_aio_suspend(struct thread *td, int njoblist, struct aiocb **ujoblist,
}
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

View File

@ -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;
{

View File

@ -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 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, const char *attrname,
}
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 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname,
}
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 @@ extattr_delete_vp(struct vnode *vp, int attrnamespace, const char *attrname,
}
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 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
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;

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More