xref: /freebsd/sys/sys/syscallsubr.h (revision 012e544f)
18f19eb88SIan Dowse /*
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>
338f19eb88SIan Dowse 
3448b52b7aSIan Dowse int	kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg,
3548b52b7aSIan Dowse 	    u_int buflen);
368f19eb88SIan Dowse int	kern_access(struct thread *td, char *path, enum uio_seg pathseg,
378f19eb88SIan Dowse 	    int flags);
388f19eb88SIan Dowse int	kern_chdir(struct thread *td, char *path, enum uio_seg pathseg);
398f19eb88SIan Dowse int	kern_chmod(struct thread *td, char *path, enum uio_seg pathseg,
408f19eb88SIan Dowse 	    int mode);
418f19eb88SIan Dowse int	kern_chown(struct thread *td, char *path, enum uio_seg pathseg, int uid,
428f19eb88SIan Dowse 	    int gid);
4349c2ff15SIan Dowse int	kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg);
448f19eb88SIan Dowse int	kern_futimes(struct thread *td, int fd, struct timeval *tptr,
458f19eb88SIan Dowse 	    enum uio_seg tptrseg);
468f19eb88SIan Dowse int	kern_lchown(struct thread *td, char *path, enum uio_seg pathseg,
478f19eb88SIan Dowse 	    int uid, int gid);
488f19eb88SIan Dowse int	kern_link(struct thread *td, char *path, char *link,
498f19eb88SIan Dowse 	    enum uio_seg segflg);
508f19eb88SIan Dowse int	kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg,
518f19eb88SIan Dowse 	    struct timeval *tptr, enum uio_seg tptrseg);
528f19eb88SIan Dowse int	kern_mkdir(struct thread *td, char *path, enum uio_seg segflg,
538f19eb88SIan Dowse 	    int mode);
548f19eb88SIan Dowse int	kern_mkfifo(struct thread *td, char *path, enum uio_seg pathseg,
558f19eb88SIan Dowse 	    int mode);
568f19eb88SIan Dowse int	kern_mknod(struct thread *td, char *path, enum uio_seg pathseg,
578f19eb88SIan Dowse 	    int mode, int dev);
588f19eb88SIan Dowse int	kern_open(struct thread *td, char *path, enum uio_seg pathseg,
598f19eb88SIan Dowse 	    int flags, int mode);
60*012e544fSIan Dowse int	kern_ptrace(struct thread *td, int req, pid_t pid, void *addr,
61*012e544fSIan Dowse 	    int data);
628f19eb88SIan Dowse int	kern_readlink(struct thread *td, char *path, enum uio_seg pathseg,
638f19eb88SIan Dowse 	    char *buf, enum uio_seg bufseg, int count);
648f19eb88SIan Dowse int	kern_rename(struct thread *td, char *from, char *to,
658f19eb88SIan Dowse 	    enum uio_seg pathseg);
668f19eb88SIan Dowse int	kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg);
678f19eb88SIan Dowse int	kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou,
688f19eb88SIan Dowse 	    fd_set *fd_ex, struct timeval *tvp);
698f19eb88SIan Dowse int	kern_sigaction(struct thread *td, int sig, struct sigaction *act,
708f19eb88SIan Dowse 	    struct sigaction *oact, int old);
718f19eb88SIan Dowse int	kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss);
728f19eb88SIan Dowse int	kern_sigsuspend(struct thread *td, sigset_t mask);
738f19eb88SIan Dowse int	kern_symlink(struct thread *td, char *path, char *link,
748f19eb88SIan Dowse 	    enum uio_seg segflg);
758f19eb88SIan Dowse int	kern_truncate(struct thread *td, char *path, enum uio_seg pathseg,
768f19eb88SIan Dowse 	    off_t length);
778f19eb88SIan Dowse int	kern_unlink(struct thread *td, char *path, enum uio_seg pathseg);
788f19eb88SIan Dowse int	kern_utimes(struct thread *td, char *path, enum uio_seg pathseg,
798f19eb88SIan Dowse 	    struct timeval *tptr, enum uio_seg tptrseg);
808f19eb88SIan Dowse 
818f19eb88SIan Dowse #endif /* !_SYS_SYSCALLSUBR_H_ */
82