160727d8bSWarner Losh /*- 2c4e20cadSPedro F. Giffuni * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3c4e20cadSPedro F. Giffuni * 48f19eb88SIan Dowse * Copyright (c) 2002 Ian Dowse. All rights reserved. 58f19eb88SIan Dowse * 68f19eb88SIan Dowse * Redistribution and use in source and binary forms, with or without 78f19eb88SIan Dowse * modification, are permitted provided that the following conditions 88f19eb88SIan Dowse * are met: 98f19eb88SIan Dowse * 1. Redistributions of source code must retain the above copyright 108f19eb88SIan Dowse * notice, this list of conditions and the following disclaimer. 118f19eb88SIan Dowse * 2. Redistributions in binary form must reproduce the above copyright 128f19eb88SIan Dowse * notice, this list of conditions and the following disclaimer in the 138f19eb88SIan Dowse * documentation and/or other materials provided with the distribution. 148f19eb88SIan Dowse * 158f19eb88SIan Dowse * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 168f19eb88SIan Dowse * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 178f19eb88SIan Dowse * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 188f19eb88SIan Dowse * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 198f19eb88SIan Dowse * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 208f19eb88SIan Dowse * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 218f19eb88SIan Dowse * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 228f19eb88SIan Dowse * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 238f19eb88SIan Dowse * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 248f19eb88SIan Dowse * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 258f19eb88SIan Dowse * SUCH DAMAGE. 268f19eb88SIan Dowse * 278f19eb88SIan Dowse * $FreeBSD$ 288f19eb88SIan Dowse */ 298f19eb88SIan Dowse 308f19eb88SIan Dowse #ifndef _SYS_SYSCALLSUBR_H_ 318f19eb88SIan Dowse #define _SYS_SYSCALLSUBR_H_ 328f19eb88SIan Dowse 338f19eb88SIan Dowse #include <sys/signal.h> 34e140eb43SDavid Malone #include <sys/socket.h> 3584e0b075SDavid Xu #include <sys/mac.h> 3676951d21SJohn Baldwin #include <sys/mount.h> 3796ee4310SEdward Tomasz Napierala #include <sys/_cpuset.h> 383f289c3fSJeff Roberson #include <sys/_domainset.h> 3934a77b97SBrooks Davis #include <sys/_uio.h> 408f19eb88SIan Dowse 4134a77b97SBrooks Davis struct __wrusage; 42f30e89ceSJohn Baldwin struct file; 438328babdSEd Schouten struct filecaps; 4443bdcf93SKonstantin Belousov enum idtype; 4576951d21SJohn Baldwin struct itimerval; 4676951d21SJohn Baldwin struct image_args; 470304c731SJamie Gritton struct jail; 48c1aa81b6SPaul Saab struct kevent; 49efe5becaSPaul Saab struct kevent_copyops; 5086665509SKonstantin Belousov struct kld_file_stat; 51fc0de8f0SJohn Baldwin struct ksiginfo; 5243bdcf93SKonstantin Belousov struct mbuf; 5343bdcf93SKonstantin Belousov struct msghdr; 5443bdcf93SKonstantin Belousov struct msqid_ds; 55186d9c34SDmitry Chagin struct pollfd; 567332c129SKonstantin Belousov struct ogetdirentries_args; 5743bdcf93SKonstantin Belousov struct rlimit; 5843bdcf93SKonstantin Belousov struct rusage; 5934a77b97SBrooks Davis struct sched_param; 6043bdcf93SKonstantin Belousov union semun; 6143bdcf93SKonstantin Belousov struct sockaddr; 6243bdcf93SKonstantin Belousov struct stat; 6343bdcf93SKonstantin Belousov struct thr_param; 6434a77b97SBrooks Davis struct uio; 6512e4397eSHajimu UMEMOTO 669f7a06f2SDmitry Chagin int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, 67a3b7d0fbSBrooks Davis size_t buflen, size_t path_max); 68c870740eSJohn Baldwin int kern_accept(struct thread *td, int s, struct sockaddr **name, 69f30e89ceSJohn Baldwin socklen_t *namelen, struct file **fp); 70da7d2afbSJilles Tjoelker int kern_accept4(struct thread *td, int s, struct sockaddr **name, 71da7d2afbSJilles Tjoelker socklen_t *namelen, int flags, struct file **fp); 7212e69f96SBrooks Davis int kern_accessat(struct thread *td, int fd, const char *path, 73e4193f25SKonstantin Belousov enum uio_seg pathseg, int flags, int mode); 74b88ec951SJohn Baldwin int kern_adjtime(struct thread *td, struct timeval *delta, 75b88ec951SJohn Baldwin struct timeval *olddelta); 7648b05c3fSKonstantin Belousov int kern_alternate_path(struct thread *td, const char *prefix, const char *path, 7748b05c3fSKonstantin Belousov enum uio_seg pathseg, char **pathbuf, int create, int dirfd); 786e646651SKonstantin Belousov int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); 79e8a1ec3eSEd Maste int kern_break(struct thread *td, uintptr_t *addr); 800dac22d8SPawel Jakub Dawidek int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, 810dac22d8SPawel Jakub Dawidek size_t ncmds); 82aa04a06dSEd Schouten int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); 8312e69f96SBrooks Davis int kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg); 84d31e4b3aSKonstantin Belousov int kern_clock_getcpuclockid2(struct thread *td, id_t id, int which, 85d31e4b3aSKonstantin Belousov clockid_t *clk_id); 86f0b479cdSPaul Saab int kern_clock_getres(struct thread *td, clockid_t clock_id, 87f0b479cdSPaul Saab struct timespec *ts); 88f0b479cdSPaul Saab int kern_clock_gettime(struct thread *td, clockid_t clock_id, 89f0b479cdSPaul Saab struct timespec *ats); 903f8455b0SEric van Gyzen int kern_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags, 913f8455b0SEric van Gyzen const struct timespec *rqtp, struct timespec *rmtp); 92f0b479cdSPaul Saab int kern_clock_settime(struct thread *td, clockid_t clock_id, 93f0b479cdSPaul Saab struct timespec *ats); 94c1cccebeSJohn Baldwin int kern_close(struct thread *td, int fd); 956e646651SKonstantin Belousov int kern_connectat(struct thread *td, int dirfd, int fd, 966e646651SKonstantin Belousov struct sockaddr *sa); 9796ee4310SEdward Tomasz Napierala int kern_cpuset_getaffinity(struct thread *td, cpulevel_t level, 9896ee4310SEdward Tomasz Napierala cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *maskp); 9996ee4310SEdward Tomasz Napierala int kern_cpuset_setaffinity(struct thread *td, cpulevel_t level, 10096ee4310SEdward Tomasz Napierala cpuwhich_t which, id_t id, size_t cpusetsize, 10196ee4310SEdward Tomasz Napierala const cpuset_t *maskp); 1023f289c3fSJeff Roberson int kern_cpuset_getdomain(struct thread *td, cpulevel_t level, 1033f289c3fSJeff Roberson cpuwhich_t which, id_t id, size_t domainsetsize, 1043f289c3fSJeff Roberson domainset_t *maskp, int *policyp); 1053f289c3fSJeff Roberson int kern_cpuset_setdomain(struct thread *td, cpulevel_t level, 1063f289c3fSJeff Roberson cpuwhich_t which, id_t id, size_t domainsetsize, 1073f289c3fSJeff Roberson const domainset_t *maskp, int policy); 108ea2ebdc1SEdward Tomasz Napierala int kern_cpuset_getid(struct thread *td, cpulevel_t level, 109ea2ebdc1SEdward Tomasz Napierala cpuwhich_t which, id_t id, cpusetid_t *setid); 110ea2ebdc1SEdward Tomasz Napierala int kern_cpuset_setid(struct thread *td, cpuwhich_t which, 111ea2ebdc1SEdward Tomasz Napierala id_t id, cpusetid_t setid); 1125fe97c20SMateusz Guzik int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); 113610ecfe0SMaxim Sobolev int kern_execve(struct thread *td, struct image_args *args, 114c8837938SJohn Baldwin struct mac *mac_p); 11512e69f96SBrooks Davis int kern_fchmodat(struct thread *td, int fd, const char *path, 116e4193f25SKonstantin Belousov enum uio_seg pathseg, mode_t mode, int flag); 11712e69f96SBrooks Davis int kern_fchownat(struct thread *td, int fd, const char *path, 118e4193f25SKonstantin Belousov enum uio_seg pathseg, int uid, int gid, int flag); 11949c2ff15SIan Dowse int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); 120f69261f2SKonstantin Belousov int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg); 12176dcec5dSGleb Kurtsou int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf); 12276951d21SJohn Baldwin int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf); 123b1288166SJohn Baldwin int kern_fpathconf(struct thread *td, int fd, int name, long *valuep); 12476951d21SJohn Baldwin int kern_fstat(struct thread *td, int fd, struct stat *sbp); 12576951d21SJohn Baldwin int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); 12693d9ebd8SEd Schouten int kern_fsync(struct thread *td, int fd, bool fullsync); 127e4650294SJohn Baldwin int kern_ftruncate(struct thread *td, int fd, off_t length); 1288f19eb88SIan Dowse int kern_futimes(struct thread *td, int fd, struct timeval *tptr, 1298f19eb88SIan Dowse enum uio_seg tptrseg); 1302205e0d1SJilles Tjoelker int kern_futimens(struct thread *td, int fd, struct timespec *tptr, 1312205e0d1SJilles Tjoelker enum uio_seg tptrseg); 13269921123SKonstantin Belousov int kern_getdirentries(struct thread *td, int fd, char *buf, size_t count, 13369921123SKonstantin Belousov off_t *basep, ssize_t *residp, enum uio_seg bufseg); 1343a996d6eSPawel Jakub Dawidek int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, 13534ed0c63SJohn Baldwin size_t *countp, enum uio_seg bufseg, int mode); 13623af91dcSMaxim Sobolev int kern_getitimer(struct thread *, u_int, struct itimerval *); 137abd386baSMateusz Guzik int kern_getppid(struct thread *); 138c870740eSJohn Baldwin int kern_getpeername(struct thread *td, int fd, struct sockaddr **sa, 139c870740eSJohn Baldwin socklen_t *alen); 14078c85e8dSJohn Baldwin int kern_getrusage(struct thread *td, int who, struct rusage *rup); 141c870740eSJohn Baldwin int kern_getsockname(struct thread *td, int fd, struct sockaddr **sa, 142c870740eSJohn Baldwin socklen_t *alen); 143e140eb43SDavid Malone int kern_getsockopt(struct thread *td, int s, int level, int name, 144e140eb43SDavid Malone void *optval, enum uio_seg valseg, socklen_t *valsize); 145d9f46233SJohn Baldwin int kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data); 146c542c43eSJamie Gritton int kern_jail(struct thread *td, struct jail *j); 147b38ff370SJamie Gritton int kern_jail_get(struct thread *td, struct uio *options, int flags); 148b38ff370SJamie Gritton int kern_jail_set(struct thread *td, struct uio *options, int flags); 149efe5becaSPaul Saab int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, 150efe5becaSPaul Saab struct kevent_copyops *k_ops, const struct timespec *timeout); 151e26f6b5fSEd Schouten int kern_kevent_anonymous(struct thread *td, int nevents, 152e26f6b5fSEd Schouten struct kevent_copyops *k_ops); 1537236f2c2SDmitry Chagin int kern_kevent_fp(struct thread *td, struct file *fp, int nchanges, 1547236f2c2SDmitry Chagin int nevents, struct kevent_copyops *k_ops, 1557236f2c2SDmitry Chagin const struct timespec *timeout); 156a2034cc9SEd Schouten int kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps); 157d5388587SJohn Baldwin int kern_kldload(struct thread *td, const char *file, int *fileid); 15886665509SKonstantin Belousov int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); 159d5388587SJohn Baldwin int kern_kldunload(struct thread *td, int fileid, int flags); 16012e69f96SBrooks Davis int kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, 16112e69f96SBrooks Davis const char *path2, enum uio_seg segflg, int follow); 162d293f35cSEdward Tomasz Napierala int kern_listen(struct thread *td, int s, int backlog); 163f67d6b5fSEdward Tomasz Napierala int kern_lseek(struct thread *td, int fd, off_t offset, int whence); 16412e69f96SBrooks Davis int kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, 1658f19eb88SIan Dowse struct timeval *tptr, enum uio_seg tptrseg); 166496ab053SKonstantin Belousov int kern_madvise(struct thread *td, uintptr_t addr, size_t len, int behav); 16746dc8e9dSDmitry Chagin int kern_mincore(struct thread *td, uintptr_t addr, size_t len, char *vec); 16812e69f96SBrooks Davis int kern_mkdirat(struct thread *td, int fd, const char *path, 169e4193f25SKonstantin Belousov enum uio_seg segflg, int mode); 17012e69f96SBrooks Davis int kern_mkfifoat(struct thread *td, int fd, const char *path, 171e4193f25SKonstantin Belousov enum uio_seg pathseg, int mode); 17212e69f96SBrooks Davis int kern_mknodat(struct thread *td, int fd, const char *path, 17369921123SKonstantin Belousov enum uio_seg pathseg, int mode, dev_t dev); 174496ab053SKonstantin Belousov int kern_mlock(struct proc *proc, struct ucred *cred, uintptr_t addr, 175496ab053SKonstantin Belousov size_t len); 17677555b84SDoug Moore int kern_mmap(struct thread *td, uintptr_t addr, size_t len, int prot, 177496ab053SKonstantin Belousov int flags, int fd, off_t pos); 1785dc7e31aSKonstantin Belousov int kern_mmap_maxprot(struct proc *p, int prot); 179496ab053SKonstantin Belousov int kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot); 18076951d21SJohn Baldwin int kern_msgctl(struct thread *, int, int, struct msqid_ds *); 1814e4de5e4SJung-uk Kim int kern_msgrcv(struct thread *, int, void *, size_t, long, int, long *); 1823fdcf9efSKonstantin Belousov int kern_msgsnd(struct thread *, int, const void *, size_t, int, long); 183496ab053SKonstantin Belousov int kern_msync(struct thread *td, uintptr_t addr, size_t size, int flags); 184496ab053SKonstantin Belousov int kern_munlock(struct thread *td, uintptr_t addr, size_t size); 185496ab053SKonstantin Belousov int kern_munmap(struct thread *td, uintptr_t addr, size_t size); 186efa42cbcSPaul Saab int kern_nanosleep(struct thread *td, struct timespec *rqt, 187efa42cbcSPaul Saab struct timespec *rmt); 1887332c129SKonstantin Belousov int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, 1897332c129SKonstantin Belousov long *ploff); 19012e69f96SBrooks Davis int kern_openat(struct thread *td, int fd, const char *path, 191e4193f25SKonstantin Belousov enum uio_seg pathseg, int flags, int mode); 19212e69f96SBrooks Davis int kern_pathconf(struct thread *td, const char *path, 19312e69f96SBrooks Davis enum uio_seg pathseg, int name, u_long flags, long *valuep); 1948328babdSEd Schouten int kern_pipe(struct thread *td, int fildes[2], int flags, 1958328babdSEd Schouten struct filecaps *fcaps1, struct filecaps *fcaps2); 196186d9c34SDmitry Chagin int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, 197186d9c34SDmitry Chagin struct timespec *tsp, sigset_t *uset); 1980acf5d0bSMark Johnston int kern_posix_error(struct thread *td, int error); 1997edec621SJohn Baldwin int kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, 2007edec621SJohn Baldwin int advice); 2017edec621SJohn Baldwin int kern_posix_fallocate(struct thread *td, int fd, off_t offset, 2027edec621SJohn Baldwin off_t len); 20355648840SJohn Baldwin int kern_procctl(struct thread *td, enum idtype idtype, id_t id, int com, 20455648840SJohn Baldwin void *data); 205b38b22b0SEdward Tomasz Napierala int kern_pread(struct thread *td, int fd, void *buf, size_t nbyte, 206b38b22b0SEdward Tomasz Napierala off_t offset); 207bcd9e0ddSJohn Baldwin int kern_preadv(struct thread *td, int fd, struct uio *auio, off_t offset); 208066d836bSKonstantin Belousov int kern_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, 209066d836bSKonstantin Belousov fd_set *ex, struct timeval *tvp, sigset_t *uset, int abi_nfdbits); 210012e544fSIan Dowse int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, 211012e544fSIan Dowse int data); 212b38b22b0SEdward Tomasz Napierala int kern_pwrite(struct thread *td, int fd, const void *buf, size_t nbyte, 213b38b22b0SEdward Tomasz Napierala off_t offset); 214bcd9e0ddSJohn Baldwin int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t offset); 21512e69f96SBrooks Davis int kern_readlinkat(struct thread *td, int fd, const char *path, 216e4193f25SKonstantin Belousov enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count); 217b88ec951SJohn Baldwin int kern_readv(struct thread *td, int fd, struct uio *auio); 218c870740eSJohn Baldwin int kern_recvit(struct thread *td, int s, struct msghdr *mp, 219c870740eSJohn Baldwin enum uio_seg fromseg, struct mbuf **controlp); 22012e69f96SBrooks Davis int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, 22112e69f96SBrooks Davis const char *new, enum uio_seg pathseg); 222a1304030SMariusz Zaborski int kern_frmdirat(struct thread *td, int dfd, const char *path, int fd, 2234f77f488SKonstantin Belousov enum uio_seg pathseg, int flag); 224a93e83c8SDmitry Chagin int kern_sched_getparam(struct thread *td, struct thread *targettd, 225a93e83c8SDmitry Chagin struct sched_param *param); 226a93e83c8SDmitry Chagin int kern_sched_getscheduler(struct thread *td, struct thread *targettd, 227a93e83c8SDmitry Chagin int *policy); 228a93e83c8SDmitry Chagin int kern_sched_setparam(struct thread *td, struct thread *targettd, 229a93e83c8SDmitry Chagin struct sched_param *param); 230a93e83c8SDmitry Chagin int kern_sched_setscheduler(struct thread *td, struct thread *targettd, 231a93e83c8SDmitry Chagin int policy, struct sched_param *param); 232b88ec951SJohn Baldwin int kern_sched_rr_get_interval(struct thread *td, pid_t pid, 233b88ec951SJohn Baldwin struct timespec *ts); 2341aa90ecaSDmitry Chagin int kern_sched_rr_get_interval_td(struct thread *td, struct thread *targettd, 2351aa90ecaSDmitry Chagin struct timespec *ts); 23649d409a1SJohn Baldwin int kern_semctl(struct thread *td, int semid, int semnum, int cmd, 237b1ee5b65SJohn Baldwin union semun *arg, register_t *rval); 2388f19eb88SIan Dowse int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, 239b55ef216SKonstantin Belousov fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits); 240710c5645SDavid Malone int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, 241a6886ef1SMaxim Sobolev struct mbuf *control, enum uio_seg segflg); 2423cb83e71SJohn Baldwin int kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups); 24323af91dcSMaxim Sobolev int kern_setitimer(struct thread *, u_int, struct itimerval *, 24423af91dcSMaxim Sobolev struct itimerval *); 245c8837938SJohn Baldwin int kern_setrlimit(struct thread *, u_int, struct rlimit *); 246e140eb43SDavid Malone int kern_setsockopt(struct thread *td, int s, int level, int name, 247318f0d77SBrooks Davis const void *optval, enum uio_seg valseg, socklen_t valsize); 248b88ec951SJohn Baldwin int kern_settimeofday(struct thread *td, struct timeval *tv, 249b88ec951SJohn Baldwin struct timezone *tzp); 2507ee1b208SEd Schouten int kern_shm_open(struct thread *td, const char *userpath, int flags, 2517ee1b208SEd Schouten mode_t mode, struct filecaps *fcaps); 252f130dcf2SMartin Blapp int kern_shmat(struct thread *td, int shmid, const void *shmaddr, 2532332251cSMax Khon int shmflg); 254f130dcf2SMartin Blapp int kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, 2552332251cSMax Khon size_t *bufsz); 256d293f35cSEdward Tomasz Napierala int kern_shutdown(struct thread *td, int s, int how); 257ea566832SEd Schouten int kern_sigaction(struct thread *td, int sig, const struct sigaction *act, 25823eeeff7SPeter Wemm struct sigaction *oact, int flags); 2598f19eb88SIan Dowse int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); 260fc0de8f0SJohn Baldwin int kern_sigprocmask(struct thread *td, int how, 261fc0de8f0SJohn Baldwin sigset_t *set, sigset_t *oset, int flags); 2628f19eb88SIan Dowse int kern_sigsuspend(struct thread *td, sigset_t mask); 263fc0de8f0SJohn Baldwin int kern_sigtimedwait(struct thread *td, sigset_t waitset, 264fc0de8f0SJohn Baldwin struct ksiginfo *ksi, struct timespec *timeout); 265f19351aaSBrooks Davis int kern_sigqueue(struct thread *td, pid_t pid, int signum, 266f19351aaSBrooks Davis union sigval *value); 267d293f35cSEdward Tomasz Napierala int kern_socket(struct thread *td, int domain, int type, int protocol); 26812e69f96SBrooks Davis int kern_statat(struct thread *td, int flag, int fd, const char *path, 2690eee862aSEd Schouten enum uio_seg pathseg, struct stat *sbp, 2700eee862aSEd Schouten void (*hook)(struct vnode *vp, struct stat *sbp)); 27112e69f96SBrooks Davis int kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, 27276951d21SJohn Baldwin struct statfs *buf); 27312e69f96SBrooks Davis int kern_symlinkat(struct thread *td, const char *path1, int fd, 27412e69f96SBrooks Davis const char *path2, enum uio_seg segflg); 275643ee871SKonstantin Belousov int kern_ktimer_create(struct thread *td, clockid_t clock_id, 276643ee871SKonstantin Belousov struct sigevent *evp, int *timerid, int preset_id); 277643ee871SKonstantin Belousov int kern_ktimer_delete(struct thread *, int); 278643ee871SKonstantin Belousov int kern_ktimer_settime(struct thread *td, int timer_id, int flags, 279643ee871SKonstantin Belousov struct itimerspec *val, struct itimerspec *oval); 280643ee871SKonstantin Belousov int kern_ktimer_gettime(struct thread *td, int timer_id, 281643ee871SKonstantin Belousov struct itimerspec *val); 282e346f8c4SBjoern A. Zeeb int kern_ktimer_getoverrun(struct thread *td, int timer_id); 28309baafb4SDmitry Chagin int kern_thr_alloc(struct proc *, int pages, struct thread **); 28495be6d2bSDmitry Chagin int kern_thr_exit(struct thread *td); 285a66fde8dSJohn Baldwin int kern_thr_new(struct thread *td, struct thr_param *param); 286a66fde8dSJohn Baldwin int kern_thr_suspend(struct thread *td, struct timespec *tsp); 28712e69f96SBrooks Davis int kern_truncate(struct thread *td, const char *path, 28812e69f96SBrooks Davis enum uio_seg pathseg, off_t length); 289a1304030SMariusz Zaborski int kern_funlinkat(struct thread *td, int dfd, const char *path, int fd, 2904f77f488SKonstantin Belousov enum uio_seg pathseg, int flag, ino_t oldinum); 29112e69f96SBrooks Davis int kern_utimesat(struct thread *td, int fd, const char *path, 292e4193f25SKonstantin Belousov enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); 29312e69f96SBrooks Davis int kern_utimensat(struct thread *td, int fd, const char *path, 2942205e0d1SJilles Tjoelker enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, 2952205e0d1SJilles Tjoelker int follow); 296c8837938SJohn Baldwin int kern_wait(struct thread *td, pid_t pid, int *status, int options, 297c8837938SJohn Baldwin struct rusage *rup); 298e2d55f48SKonstantin Belousov int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, 299f13b5a0fSKonstantin Belousov int options, struct __wrusage *wrup, siginfo_t *sip); 300b88ec951SJohn Baldwin int kern_writev(struct thread *td, int fd, struct uio *auio); 3014202e1beSDmitry Chagin int kern_socketpair(struct thread *td, int domain, int type, int protocol, 3024202e1beSDmitry Chagin int *rsv); 3038f19eb88SIan Dowse 30423eeeff7SPeter Wemm /* flags for kern_sigaction */ 30523eeeff7SPeter Wemm #define KSA_OSIGSET 0x0001 /* uses osigact_t */ 30623eeeff7SPeter Wemm #define KSA_FREEBSD4 0x0002 /* uses ucontext4 */ 30723eeeff7SPeter Wemm 30869921123SKonstantin Belousov struct freebsd11_dirent; 30969921123SKonstantin Belousov 31069921123SKonstantin Belousov int freebsd11_kern_getdirentries(struct thread *td, int fd, char *ubuf, u_int 31169921123SKonstantin Belousov count, long *basep, void (*func)(struct freebsd11_dirent *)); 31269921123SKonstantin Belousov 3138f19eb88SIan Dowse #endif /* !_SYS_SYSCALLSUBR_H_ */ 314