syscallsubr.h revision 105950
1102779Siedowse/*
2102779Siedowse * Copyright (c) 2002 Ian Dowse.  All rights reserved.
3102779Siedowse *
4102779Siedowse * Redistribution and use in source and binary forms, with or without
5102779Siedowse * modification, are permitted provided that the following conditions
6102779Siedowse * are met:
7102779Siedowse * 1. Redistributions of source code must retain the above copyright
8102779Siedowse *    notice, this list of conditions and the following disclaimer.
9102779Siedowse * 2. Redistributions in binary form must reproduce the above copyright
10102779Siedowse *    notice, this list of conditions and the following disclaimer in the
11102779Siedowse *    documentation and/or other materials provided with the distribution.
12102779Siedowse *
13102779Siedowse * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14102779Siedowse * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15102779Siedowse * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16102779Siedowse * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17102779Siedowse * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18102779Siedowse * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19102779Siedowse * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20102779Siedowse * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21102779Siedowse * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22102779Siedowse * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23102779Siedowse * SUCH DAMAGE.
24102779Siedowse *
25102779Siedowse * $FreeBSD: head/sys/sys/syscallsubr.h 105950 2002-10-25 19:10:58Z peter $
26102779Siedowse */
27102779Siedowse
28102779Siedowse#ifndef _SYS_SYSCALLSUBR_H_
29102779Siedowse#define _SYS_SYSCALLSUBR_H_
30102779Siedowse
31102779Siedowse#include <sys/signal.h>
32102779Siedowse#include <sys/uio.h>
33102779Siedowse
34102870Siedowseint	kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg,
35102870Siedowse	    u_int buflen);
36102779Siedowseint	kern_access(struct thread *td, char *path, enum uio_seg pathseg,
37102779Siedowse	    int flags);
38102779Siedowseint	kern_chdir(struct thread *td, char *path, enum uio_seg pathseg);
39102779Siedowseint	kern_chmod(struct thread *td, char *path, enum uio_seg pathseg,
40102779Siedowse	    int mode);
41102779Siedowseint	kern_chown(struct thread *td, char *path, enum uio_seg pathseg, int uid,
42102779Siedowse	    int gid);
43102868Siedowseint	kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg);
44102779Siedowseint	kern_futimes(struct thread *td, int fd, struct timeval *tptr,
45102779Siedowse	    enum uio_seg tptrseg);
46102779Siedowseint	kern_lchown(struct thread *td, char *path, enum uio_seg pathseg,
47102779Siedowse	    int uid, int gid);
48102779Siedowseint	kern_link(struct thread *td, char *path, char *link,
49102779Siedowse	    enum uio_seg segflg);
50102779Siedowseint	kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg,
51102779Siedowse	    struct timeval *tptr, enum uio_seg tptrseg);
52102779Siedowseint	kern_mkdir(struct thread *td, char *path, enum uio_seg segflg,
53102779Siedowse	    int mode);
54102779Siedowseint	kern_mkfifo(struct thread *td, char *path, enum uio_seg pathseg,
55102779Siedowse	    int mode);
56102779Siedowseint	kern_mknod(struct thread *td, char *path, enum uio_seg pathseg,
57102779Siedowse	    int mode, int dev);
58102779Siedowseint	kern_open(struct thread *td, char *path, enum uio_seg pathseg,
59102779Siedowse	    int flags, int mode);
60102946Siedowseint	kern_ptrace(struct thread *td, int req, pid_t pid, void *addr,
61102946Siedowse	    int data);
62102779Siedowseint	kern_readlink(struct thread *td, char *path, enum uio_seg pathseg,
63102779Siedowse	    char *buf, enum uio_seg bufseg, int count);
64102779Siedowseint	kern_rename(struct thread *td, char *from, char *to,
65102779Siedowse	    enum uio_seg pathseg);
66102779Siedowseint	kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg);
67102779Siedowseint	kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou,
68102779Siedowse	    fd_set *fd_ex, struct timeval *tvp);
69102779Siedowseint	kern_sigaction(struct thread *td, int sig, struct sigaction *act,
70105950Speter	    struct sigaction *oact, int flags);
71102779Siedowseint	kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss);
72102779Siedowseint	kern_sigsuspend(struct thread *td, sigset_t mask);
73102779Siedowseint	kern_symlink(struct thread *td, char *path, char *link,
74102779Siedowse	    enum uio_seg segflg);
75102779Siedowseint	kern_truncate(struct thread *td, char *path, enum uio_seg pathseg,
76102779Siedowse	    off_t length);
77102779Siedowseint	kern_unlink(struct thread *td, char *path, enum uio_seg pathseg);
78102779Siedowseint	kern_utimes(struct thread *td, char *path, enum uio_seg pathseg,
79102779Siedowse	    struct timeval *tptr, enum uio_seg tptrseg);
80102779Siedowse
81105950Speter/* flags for kern_sigaction */
82105950Speter#define	KSA_OSIGSET	0x0001	/* uses osigact_t */
83105950Speter#define	KSA_FREEBSD4	0x0002	/* uses ucontext4 */
84105950Speter
85102779Siedowse#endif /* !_SYS_SYSCALLSUBR_H_ */
86