160727d8bSWarner Losh /*- 28f19eb88SIan Dowse * Copyright (c) 2002 Ian Dowse. All rights reserved. 38f19eb88SIan Dowse * 48f19eb88SIan Dowse * Redistribution and use in source and binary forms, with or without 58f19eb88SIan Dowse * modification, are permitted provided that the following conditions 68f19eb88SIan Dowse * are met: 78f19eb88SIan Dowse * 1. Redistributions of source code must retain the above copyright 88f19eb88SIan Dowse * notice, this list of conditions and the following disclaimer. 98f19eb88SIan Dowse * 2. Redistributions in binary form must reproduce the above copyright 108f19eb88SIan Dowse * notice, this list of conditions and the following disclaimer in the 118f19eb88SIan Dowse * documentation and/or other materials provided with the distribution. 128f19eb88SIan Dowse * 138f19eb88SIan Dowse * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 148f19eb88SIan Dowse * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 158f19eb88SIan Dowse * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 168f19eb88SIan Dowse * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 178f19eb88SIan Dowse * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 188f19eb88SIan Dowse * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 198f19eb88SIan Dowse * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 208f19eb88SIan Dowse * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 218f19eb88SIan Dowse * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 228f19eb88SIan Dowse * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 238f19eb88SIan Dowse * SUCH DAMAGE. 248f19eb88SIan Dowse * 258f19eb88SIan Dowse * $FreeBSD$ 268f19eb88SIan Dowse */ 278f19eb88SIan Dowse 288f19eb88SIan Dowse #ifndef _SYS_SYSCALLSUBR_H_ 298f19eb88SIan Dowse #define _SYS_SYSCALLSUBR_H_ 308f19eb88SIan Dowse 318f19eb88SIan Dowse #include <sys/signal.h> 328f19eb88SIan Dowse #include <sys/uio.h> 33e140eb43SDavid Malone #include <sys/socket.h> 3484e0b075SDavid Xu #include <sys/mac.h> 3576951d21SJohn Baldwin #include <sys/mount.h> 3696ee4310SEdward Tomasz Napierala #include <sys/_cpuset.h> 378f19eb88SIan Dowse 38f30e89ceSJohn Baldwin struct file; 398328babdSEd Schouten struct filecaps; 4043bdcf93SKonstantin Belousov enum idtype; 4176951d21SJohn Baldwin struct itimerval; 4276951d21SJohn Baldwin struct image_args; 430304c731SJamie Gritton struct jail; 44c1aa81b6SPaul Saab struct kevent; 45efe5becaSPaul Saab struct kevent_copyops; 4686665509SKonstantin Belousov struct kld_file_stat; 47fc0de8f0SJohn Baldwin struct ksiginfo; 4843bdcf93SKonstantin Belousov struct mbuf; 4943bdcf93SKonstantin Belousov struct msghdr; 5043bdcf93SKonstantin Belousov struct msqid_ds; 51186d9c34SDmitry Chagin struct pollfd; 527332c129SKonstantin Belousov struct ogetdirentries_args; 5343bdcf93SKonstantin Belousov struct rlimit; 5443bdcf93SKonstantin Belousov struct rusage; 5543bdcf93SKonstantin Belousov union semun; 5643bdcf93SKonstantin Belousov struct sockaddr; 5743bdcf93SKonstantin Belousov struct stat; 5843bdcf93SKonstantin Belousov struct thr_param; 59a93e83c8SDmitry Chagin struct sched_param; 6043bdcf93SKonstantin Belousov struct __wrusage; 6112e4397eSHajimu UMEMOTO 629f7a06f2SDmitry Chagin int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, 63a3b7d0fbSBrooks Davis size_t buflen, size_t path_max); 64c870740eSJohn Baldwin int kern_accept(struct thread *td, int s, struct sockaddr **name, 65f30e89ceSJohn Baldwin socklen_t *namelen, struct file **fp); 66da7d2afbSJilles Tjoelker int kern_accept4(struct thread *td, int s, struct sockaddr **name, 67da7d2afbSJilles Tjoelker socklen_t *namelen, int flags, struct file **fp); 68e4193f25SKonstantin Belousov int kern_accessat(struct thread *td, int fd, char *path, 69e4193f25SKonstantin Belousov enum uio_seg pathseg, int flags, int mode); 70b88ec951SJohn Baldwin int kern_adjtime(struct thread *td, struct timeval *delta, 71b88ec951SJohn Baldwin struct timeval *olddelta); 7248b05c3fSKonstantin Belousov int kern_alternate_path(struct thread *td, const char *prefix, const char *path, 7348b05c3fSKonstantin Belousov enum uio_seg pathseg, char **pathbuf, int create, int dirfd); 746e646651SKonstantin Belousov int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); 750dac22d8SPawel Jakub Dawidek int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, 760dac22d8SPawel Jakub Dawidek size_t ncmds); 77aa04a06dSEd Schouten int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); 788f19eb88SIan Dowse int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg); 79d31e4b3aSKonstantin Belousov int kern_clock_getcpuclockid2(struct thread *td, id_t id, int which, 80d31e4b3aSKonstantin Belousov clockid_t *clk_id); 81f0b479cdSPaul Saab int kern_clock_getres(struct thread *td, clockid_t clock_id, 82f0b479cdSPaul Saab struct timespec *ts); 83f0b479cdSPaul Saab int kern_clock_gettime(struct thread *td, clockid_t clock_id, 84f0b479cdSPaul Saab struct timespec *ats); 853f8455b0SEric van Gyzen int kern_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags, 863f8455b0SEric van Gyzen const struct timespec *rqtp, struct timespec *rmtp); 87f0b479cdSPaul Saab int kern_clock_settime(struct thread *td, clockid_t clock_id, 88f0b479cdSPaul Saab struct timespec *ats); 89c1cccebeSJohn Baldwin int kern_close(struct thread *td, int fd); 906e646651SKonstantin Belousov int kern_connectat(struct thread *td, int dirfd, int fd, 916e646651SKonstantin Belousov struct sockaddr *sa); 9296ee4310SEdward Tomasz Napierala int kern_cpuset_getaffinity(struct thread *td, cpulevel_t level, 9396ee4310SEdward Tomasz Napierala cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *maskp); 9496ee4310SEdward Tomasz Napierala int kern_cpuset_setaffinity(struct thread *td, cpulevel_t level, 9596ee4310SEdward Tomasz Napierala cpuwhich_t which, id_t id, size_t cpusetsize, 9696ee4310SEdward Tomasz Napierala const cpuset_t *maskp); 97ea2ebdc1SEdward Tomasz Napierala int kern_cpuset_getid(struct thread *td, cpulevel_t level, 98ea2ebdc1SEdward Tomasz Napierala cpuwhich_t which, id_t id, cpusetid_t *setid); 99ea2ebdc1SEdward Tomasz Napierala int kern_cpuset_setid(struct thread *td, cpuwhich_t which, 100ea2ebdc1SEdward Tomasz Napierala id_t id, cpusetid_t setid); 1015fe97c20SMateusz Guzik int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); 102610ecfe0SMaxim Sobolev int kern_execve(struct thread *td, struct image_args *args, 103c8837938SJohn Baldwin struct mac *mac_p); 104e4193f25SKonstantin Belousov int kern_fchmodat(struct thread *td, int fd, char *path, 105e4193f25SKonstantin Belousov enum uio_seg pathseg, mode_t mode, int flag); 106e4193f25SKonstantin Belousov int kern_fchownat(struct thread *td, int fd, char *path, 107e4193f25SKonstantin Belousov enum uio_seg pathseg, int uid, int gid, int flag); 10849c2ff15SIan Dowse int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); 109f69261f2SKonstantin Belousov int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg); 11076dcec5dSGleb Kurtsou int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf); 11176951d21SJohn Baldwin int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf); 11276951d21SJohn Baldwin int kern_fstat(struct thread *td, int fd, struct stat *sbp); 11376951d21SJohn Baldwin int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); 11493d9ebd8SEd Schouten int kern_fsync(struct thread *td, int fd, bool fullsync); 115e4650294SJohn Baldwin int kern_ftruncate(struct thread *td, int fd, off_t length); 1168f19eb88SIan Dowse int kern_futimes(struct thread *td, int fd, struct timeval *tptr, 1178f19eb88SIan Dowse enum uio_seg tptrseg); 1182205e0d1SJilles Tjoelker int kern_futimens(struct thread *td, int fd, struct timespec *tptr, 1192205e0d1SJilles Tjoelker enum uio_seg tptrseg); 12063f8fe9eSJohn Baldwin int kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, 12176dcec5dSGleb Kurtsou long *basep, ssize_t *residp, enum uio_seg bufseg); 1223a996d6eSPawel Jakub Dawidek int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, 12334ed0c63SJohn Baldwin size_t *countp, enum uio_seg bufseg, int mode); 12423af91dcSMaxim Sobolev int kern_getitimer(struct thread *, u_int, struct itimerval *); 125abd386baSMateusz Guzik int kern_getppid(struct thread *); 126c870740eSJohn Baldwin int kern_getpeername(struct thread *td, int fd, struct sockaddr **sa, 127c870740eSJohn Baldwin socklen_t *alen); 12878c85e8dSJohn Baldwin int kern_getrusage(struct thread *td, int who, struct rusage *rup); 129c870740eSJohn Baldwin int kern_getsockname(struct thread *td, int fd, struct sockaddr **sa, 130c870740eSJohn Baldwin socklen_t *alen); 131e140eb43SDavid Malone int kern_getsockopt(struct thread *td, int s, int level, int name, 132e140eb43SDavid Malone void *optval, enum uio_seg valseg, socklen_t *valsize); 133d9f46233SJohn Baldwin int kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data); 1340304c731SJamie Gritton int kern_jail(struct thread *td, struct jail *j); 135b38ff370SJamie Gritton int kern_jail_get(struct thread *td, struct uio *options, int flags); 136b38ff370SJamie Gritton int kern_jail_set(struct thread *td, struct uio *options, int flags); 137efe5becaSPaul Saab int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, 138efe5becaSPaul Saab struct kevent_copyops *k_ops, const struct timespec *timeout); 139e26f6b5fSEd Schouten int kern_kevent_anonymous(struct thread *td, int nevents, 140e26f6b5fSEd Schouten struct kevent_copyops *k_ops); 1417236f2c2SDmitry Chagin int kern_kevent_fp(struct thread *td, struct file *fp, int nchanges, 1427236f2c2SDmitry Chagin int nevents, struct kevent_copyops *k_ops, 1437236f2c2SDmitry Chagin const struct timespec *timeout); 144a2034cc9SEd Schouten int kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps); 145d5388587SJohn Baldwin int kern_kldload(struct thread *td, const char *file, int *fileid); 14686665509SKonstantin Belousov int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); 147d5388587SJohn Baldwin int kern_kldunload(struct thread *td, int fileid, int flags); 148e4193f25SKonstantin Belousov int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, 149e4193f25SKonstantin Belousov char *path2, enum uio_seg segflg, int follow); 150d293f35cSEdward Tomasz Napierala int kern_listen(struct thread *td, int s, int backlog); 151f67d6b5fSEdward Tomasz Napierala int kern_lseek(struct thread *td, int fd, off_t offset, int whence); 1528f19eb88SIan Dowse int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, 1538f19eb88SIan Dowse struct timeval *tptr, enum uio_seg tptrseg); 154496ab053SKonstantin Belousov int kern_madvise(struct thread *td, uintptr_t addr, size_t len, int behav); 15546dc8e9dSDmitry Chagin int kern_mincore(struct thread *td, uintptr_t addr, size_t len, char *vec); 156e4193f25SKonstantin Belousov int kern_mkdirat(struct thread *td, int fd, char *path, 157e4193f25SKonstantin Belousov enum uio_seg segflg, int mode); 158e4193f25SKonstantin Belousov int kern_mkfifoat(struct thread *td, int fd, char *path, 159e4193f25SKonstantin Belousov enum uio_seg pathseg, int mode); 160e4193f25SKonstantin Belousov int kern_mknodat(struct thread *td, int fd, char *path, 161e4193f25SKonstantin Belousov enum uio_seg pathseg, int mode, int dev); 162496ab053SKonstantin Belousov int kern_mlock(struct proc *proc, struct ucred *cred, uintptr_t addr, 163496ab053SKonstantin Belousov size_t len); 164496ab053SKonstantin Belousov int kern_mmap(struct thread *td, uintptr_t addr, size_t size, int prot, 165496ab053SKonstantin Belousov int flags, int fd, off_t pos); 166496ab053SKonstantin Belousov int kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot); 16776951d21SJohn Baldwin int kern_msgctl(struct thread *, int, int, struct msqid_ds *); 1684e4de5e4SJung-uk Kim int kern_msgrcv(struct thread *, int, void *, size_t, long, int, long *); 1693fdcf9efSKonstantin Belousov int kern_msgsnd(struct thread *, int, const void *, size_t, int, long); 170496ab053SKonstantin Belousov int kern_msync(struct thread *td, uintptr_t addr, size_t size, int flags); 171496ab053SKonstantin Belousov int kern_munlock(struct thread *td, uintptr_t addr, size_t size); 172496ab053SKonstantin Belousov int kern_munmap(struct thread *td, uintptr_t addr, size_t size); 173efa42cbcSPaul Saab int kern_nanosleep(struct thread *td, struct timespec *rqt, 174efa42cbcSPaul Saab struct timespec *rmt); 1757332c129SKonstantin Belousov int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, 1767332c129SKonstantin Belousov long *ploff); 177e4193f25SKonstantin Belousov int kern_openat(struct thread *td, int fd, char *path, 178e4193f25SKonstantin Belousov enum uio_seg pathseg, int flags, int mode); 179fee4a6afSJohn Baldwin int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, 180c3889811SEdward Tomasz Napierala int name, u_long flags); 1818328babdSEd Schouten int kern_pipe(struct thread *td, int fildes[2], int flags, 1828328babdSEd Schouten struct filecaps *fcaps1, struct filecaps *fcaps2); 183186d9c34SDmitry Chagin int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, 184186d9c34SDmitry Chagin struct timespec *tsp, sigset_t *uset); 1850acf5d0bSMark Johnston int kern_posix_error(struct thread *td, int error); 1867edec621SJohn Baldwin int kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, 1877edec621SJohn Baldwin int advice); 1887edec621SJohn Baldwin int kern_posix_fallocate(struct thread *td, int fd, off_t offset, 1897edec621SJohn Baldwin off_t len); 19055648840SJohn Baldwin int kern_procctl(struct thread *td, enum idtype idtype, id_t id, int com, 19155648840SJohn Baldwin void *data); 192b38b22b0SEdward Tomasz Napierala int kern_pread(struct thread *td, int fd, void *buf, size_t nbyte, 193b38b22b0SEdward Tomasz Napierala off_t offset); 194bcd9e0ddSJohn Baldwin int kern_preadv(struct thread *td, int fd, struct uio *auio, off_t offset); 195066d836bSKonstantin Belousov int kern_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, 196066d836bSKonstantin Belousov fd_set *ex, struct timeval *tvp, sigset_t *uset, int abi_nfdbits); 197012e544fSIan Dowse int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, 198012e544fSIan Dowse int data); 199b38b22b0SEdward Tomasz Napierala int kern_pwrite(struct thread *td, int fd, const void *buf, size_t nbyte, 200b38b22b0SEdward Tomasz Napierala off_t offset); 201bcd9e0ddSJohn Baldwin int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t offset); 202e4193f25SKonstantin Belousov int kern_readlinkat(struct thread *td, int fd, char *path, 203e4193f25SKonstantin Belousov enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count); 204b88ec951SJohn Baldwin int kern_readv(struct thread *td, int fd, struct uio *auio); 205c870740eSJohn Baldwin int kern_recvit(struct thread *td, int s, struct msghdr *mp, 206c870740eSJohn Baldwin enum uio_seg fromseg, struct mbuf **controlp); 207e4193f25SKonstantin Belousov int kern_renameat(struct thread *td, int oldfd, char *old, int newfd, 208e4193f25SKonstantin Belousov char *new, enum uio_seg pathseg); 209e4193f25SKonstantin Belousov int kern_rmdirat(struct thread *td, int fd, char *path, 210e4193f25SKonstantin Belousov enum uio_seg pathseg); 211a93e83c8SDmitry Chagin int kern_sched_getparam(struct thread *td, struct thread *targettd, 212a93e83c8SDmitry Chagin struct sched_param *param); 213a93e83c8SDmitry Chagin int kern_sched_getscheduler(struct thread *td, struct thread *targettd, 214a93e83c8SDmitry Chagin int *policy); 215a93e83c8SDmitry Chagin int kern_sched_setparam(struct thread *td, struct thread *targettd, 216a93e83c8SDmitry Chagin struct sched_param *param); 217a93e83c8SDmitry Chagin int kern_sched_setscheduler(struct thread *td, struct thread *targettd, 218a93e83c8SDmitry Chagin int policy, struct sched_param *param); 219b88ec951SJohn Baldwin int kern_sched_rr_get_interval(struct thread *td, pid_t pid, 220b88ec951SJohn Baldwin struct timespec *ts); 2211aa90ecaSDmitry Chagin int kern_sched_rr_get_interval_td(struct thread *td, struct thread *targettd, 2221aa90ecaSDmitry Chagin struct timespec *ts); 22349d409a1SJohn Baldwin int kern_semctl(struct thread *td, int semid, int semnum, int cmd, 224b1ee5b65SJohn Baldwin union semun *arg, register_t *rval); 2258f19eb88SIan Dowse int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, 226b55ef216SKonstantin Belousov fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits); 227710c5645SDavid Malone int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, 228a6886ef1SMaxim Sobolev struct mbuf *control, enum uio_seg segflg); 2293cb83e71SJohn Baldwin int kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups); 23023af91dcSMaxim Sobolev int kern_setitimer(struct thread *, u_int, struct itimerval *, 23123af91dcSMaxim Sobolev struct itimerval *); 232c8837938SJohn Baldwin int kern_setrlimit(struct thread *, u_int, struct rlimit *); 233e140eb43SDavid Malone int kern_setsockopt(struct thread *td, int s, int level, int name, 234e140eb43SDavid Malone void *optval, enum uio_seg valseg, socklen_t valsize); 235b88ec951SJohn Baldwin int kern_settimeofday(struct thread *td, struct timeval *tv, 236b88ec951SJohn Baldwin struct timezone *tzp); 2377ee1b208SEd Schouten int kern_shm_open(struct thread *td, const char *userpath, int flags, 2387ee1b208SEd Schouten mode_t mode, struct filecaps *fcaps); 239f130dcf2SMartin Blapp int kern_shmat(struct thread *td, int shmid, const void *shmaddr, 2402332251cSMax Khon int shmflg); 241f130dcf2SMartin Blapp int kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, 2422332251cSMax Khon size_t *bufsz); 243d293f35cSEdward Tomasz Napierala int kern_shutdown(struct thread *td, int s, int how); 244ea566832SEd Schouten int kern_sigaction(struct thread *td, int sig, const struct sigaction *act, 24523eeeff7SPeter Wemm struct sigaction *oact, int flags); 2468f19eb88SIan Dowse int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); 247fc0de8f0SJohn Baldwin int kern_sigprocmask(struct thread *td, int how, 248fc0de8f0SJohn Baldwin sigset_t *set, sigset_t *oset, int flags); 2498f19eb88SIan Dowse int kern_sigsuspend(struct thread *td, sigset_t mask); 250fc0de8f0SJohn Baldwin int kern_sigtimedwait(struct thread *td, sigset_t waitset, 251fc0de8f0SJohn Baldwin struct ksiginfo *ksi, struct timespec *timeout); 252f19351aaSBrooks Davis int kern_sigqueue(struct thread *td, pid_t pid, int signum, 253f19351aaSBrooks Davis union sigval *value); 254d293f35cSEdward Tomasz Napierala int kern_socket(struct thread *td, int domain, int type, int protocol); 255e4193f25SKonstantin Belousov int kern_statat(struct thread *td, int flag, int fd, char *path, 2560eee862aSEd Schouten enum uio_seg pathseg, struct stat *sbp, 2570eee862aSEd Schouten void (*hook)(struct vnode *vp, struct stat *sbp)); 25876951d21SJohn Baldwin int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, 25976951d21SJohn Baldwin struct statfs *buf); 260e4193f25SKonstantin Belousov int kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, 261e4193f25SKonstantin Belousov enum uio_seg segflg); 262643ee871SKonstantin Belousov int kern_ktimer_create(struct thread *td, clockid_t clock_id, 263643ee871SKonstantin Belousov struct sigevent *evp, int *timerid, int preset_id); 264643ee871SKonstantin Belousov int kern_ktimer_delete(struct thread *, int); 265643ee871SKonstantin Belousov int kern_ktimer_settime(struct thread *td, int timer_id, int flags, 266643ee871SKonstantin Belousov struct itimerspec *val, struct itimerspec *oval); 267643ee871SKonstantin Belousov int kern_ktimer_gettime(struct thread *td, int timer_id, 268643ee871SKonstantin Belousov struct itimerspec *val); 269e346f8c4SBjoern A. Zeeb int kern_ktimer_getoverrun(struct thread *td, int timer_id); 27009baafb4SDmitry Chagin int kern_thr_alloc(struct proc *, int pages, struct thread **); 27195be6d2bSDmitry Chagin int kern_thr_exit(struct thread *td); 272a66fde8dSJohn Baldwin int kern_thr_new(struct thread *td, struct thr_param *param); 273a66fde8dSJohn Baldwin int kern_thr_suspend(struct thread *td, struct timespec *tsp); 2748f19eb88SIan Dowse int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, 2758f19eb88SIan Dowse off_t length); 276e4193f25SKonstantin Belousov int kern_unlinkat(struct thread *td, int fd, char *path, 277e268f54cSKirk McKusick enum uio_seg pathseg, ino_t oldinum); 278e4193f25SKonstantin Belousov int kern_utimesat(struct thread *td, int fd, char *path, 279e4193f25SKonstantin Belousov enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); 2802205e0d1SJilles Tjoelker int kern_utimensat(struct thread *td, int fd, char *path, 2812205e0d1SJilles Tjoelker enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, 2822205e0d1SJilles Tjoelker int follow); 283c8837938SJohn Baldwin int kern_wait(struct thread *td, pid_t pid, int *status, int options, 284c8837938SJohn Baldwin struct rusage *rup); 285e2d55f48SKonstantin Belousov int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, 286f13b5a0fSKonstantin Belousov int options, struct __wrusage *wrup, siginfo_t *sip); 287b88ec951SJohn Baldwin int kern_writev(struct thread *td, int fd, struct uio *auio); 2884202e1beSDmitry Chagin int kern_socketpair(struct thread *td, int domain, int type, int protocol, 2894202e1beSDmitry Chagin int *rsv); 2908f19eb88SIan Dowse 29123eeeff7SPeter Wemm /* flags for kern_sigaction */ 29223eeeff7SPeter Wemm #define KSA_OSIGSET 0x0001 /* uses osigact_t */ 29323eeeff7SPeter Wemm #define KSA_FREEBSD4 0x0002 /* uses ucontext4 */ 29423eeeff7SPeter Wemm 2958f19eb88SIan Dowse #endif /* !_SYS_SYSCALLSUBR_H_ */ 296