Home | History | Annotate | Line # | Download | only in mips
syscalls.master revision 1.2
      1 	$NetBSD: syscalls.master,v 1.2 2001/09/30 20:52:41 manu Exp $  
      2 
      3 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
      4 
      5 ; Derived from NetBSD's sys/compat/linux/arch/powerpc/syscalls.master
      6 ; from Linux's arch/mips/kernel/syscalls.h
      7 
      8 ; NetBSD mips COMPAT_LINUX system call name/number "master" file.
      9 ; (See syscalls.conf to see what it is processed into.)
     10 ;
     11 ; Expect problems with 
     12 ;  48 signal: undefined in Linux???
     13 ;  86 uselib: needs a.out
     14 ;
     15 ; Fields: number type [type-dependent ...]
     16 ;	number	system call number, must be in order
     17 ;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
     18 ;		the compatibility options defined in syscalls.conf.
     19 ;
     20 ; types:
     21 ;	STD	always included
     22 ;	OBSOL	obsolete, not included in system
     23 ;	UNIMPL	unimplemented, not included in system
     24 ;	NODEF	included, but don't define the syscall number
     25 ;	NOARGS	included, but don't define the syscall args structure
     26 ;	INDIR	included, but don't define the syscall args structure
     27 ;		and allow it to be "really" varargs.
     28 ;
     29 ; The compat options are defined in the syscalls.conf file, and the
     30 ; compat option name is prefixed to the syscall name.  Other than
     31 ; that, they're like NODEF (for 'compat' options), or STD (for
     32 ; 'libcompat' options).
     33 ;
     34 ; The type-dependent arguments are as follows:
     35 ; For STD, NODEF, NOARGS, and compat syscalls:
     36 ;	{ pseudo-proto } [alias]
     37 ; For other syscalls:
     38 ;	[comment]
     39 ;
     40 ; #ifdef's, etc. may be included, and are copied to the output files.
     41 ; #include's are copied to the syscall names and switch definition files only.
     42 
     43 #if defined(_KERNEL_OPT)
     44 #include "opt_compat_netbsd.h"
     45 #include "opt_compat_43.h"
     46 #endif
     47 
     48 #include <sys/param.h>
     49 #include <sys/poll.h>
     50 #include <sys/systm.h>
     51 #include <sys/signal.h>
     52 #include <sys/mount.h>
     53 #include <sys/syscallargs.h>
     54 
     55 #include <compat/linux/common/linux_types.h>
     56 #include <compat/linux/common/linux_signal.h>
     57 #include <compat/linux/common/linux_siginfo.h>
     58 #include <compat/linux/common/linux_machdep.h>
     59 #include <compat/linux/common/linux_mmap.h>
     60 
     61 #include <compat/linux/linux_syscallargs.h>
     62 
     63 0	NOARGS		{ int linux_sys_nosys(void); } syscall
     64 1	NOARGS		{ int sys_exit(int rval); }
     65 2	NOARGS		{ int sys_fork(void); }
     66 3	NOARGS		{ int sys_read(int fd, char *buf, u_int nbyte); }
     67 4	NOARGS		{ int sys_write(int fd, char *buf, u_int nbyte); }
     68 5	STD		{ int linux_sys_open(const char *path, int flags, \
     69 			    int mode); }
     70 6	NOARGS		{ int sys_close(int fd); }
     71 7	STD		{ int linux_sys_waitpid(int pid, int *status, \
     72 			    int options);}
     73 8	STD		{ int linux_sys_creat(const char *path, int mode); }
     74 9	STD		{ int linux_sys_link(const char *path, \
     75 			    const char *link); }
     76 10	STD		{ int linux_sys_unlink(const char *path); }
     77 11	STD		{ int linux_sys_execve(const char *path, char **argp, \
     78 			    char **envp); }
     79 12	STD		{ int linux_sys_chdir(const char *path); }
     80 13	STD		{ int linux_sys_time(linux_time_t *t); }
     81 14	STD		{ int linux_sys_mknod(const char *path, int mode, \
     82 			    int dev); }
     83 15	STD		{ int linux_sys_chmod(const char *path, int mode); }
     84 16	STD		{ int linux_sys_lchown(const char *path, int uid, \
     85 			    int gid); }
     86 17	UNIMPL
     87 18	OBSOL		ostat
     88 19	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, \
     89 			    int whence); }
     90 20	NOARGS MPSAFE	{ pid_t sys_getpid(void); }
     91 21	UNIMPL		mount
     92 22	OBSOL		umount
     93 23	NOARGS		{ int sys_setuid(uid_t uid); }
     94 24	NOARGS		{ uid_t sys_getuid(void); }
     95 25	STD		{ int linux_sys_stime(linux_time_t *t); }
     96 26	STD		{ int linux_sys_ptrace(int request, int pid, \
     97 			  int addr, int data); }
     98 27	STD		{ int linux_sys_alarm(unsigned int secs); }
     99 28	OBSOL		ofstat
    100 29	STD		{ int linux_sys_pause(void); }
    101 30	STD		{ int linux_sys_utime(const char *path, \
    102 			    struct linux_utimbuf *times); }
    103 31	UNIMPL
    104 32	UNIMPL
    105 33	STD		{ int linux_sys_access(const char *path, int flags); }
    106 34	STD		{ int linux_sys_nice(int incr); }
    107 35	UNIMPL
    108 36	NOARGS		{ int sys_sync(void); }
    109 37	STD		{ int linux_sys_kill(int pid, int signum); }
    110 38	STD		{ int linux_sys_rename(const char *from, \
    111 			    const char *to); }
    112 39	STD		{ int linux_sys_mkdir(const char *path, int mode); }
    113 40	STD		{ int linux_sys_rmdir(const char *path); }
    114 41	NOARGS		{ int sys_dup(u_int fd); }
    115 42	STD		{ int linux_sys_pipe(int *pfds); }
    116 43	STD		{ int linux_sys_times(struct times *tms); }
    117 44	UNIMPL
    118 45	STD		{ int linux_sys_brk(char *nsize); }
    119 46	NOARGS		{ int sys_setgid(gid_t gid); }
    120 47	NOARGS		{ gid_t sys_getgid(void); }
    121 48	STD		{ int linux_sys_signal(int signum, \
    122 			    linux___sighandler_t handler); }
    123 49	NOARGS		{ uid_t sys_geteuid(void); }
    124 50	NOARGS		{ gid_t sys_getegid(void); }
    125 51	NOARGS		{ int sys_acct(char *path); }
    126 52	UNIMPL		umount
    127 53	UNIMPL
    128 54	STD		{ int linux_sys_ioctl(int fd, u_long com, \
    129 			    caddr_t data); }
    130 55	STD		{ int linux_sys_fcntl(int fd, int cmd, void *arg); }
    131 56	OBSOL		mpx
    132 57	NOARGS		{ int sys_setpgid(int pid, int pgid); }
    133 58	UNIMPL
    134 59 	STD  		    { int linux_sys_olduname(struct linux_old_utsname \
    135 			    *up); }
    136 60	NOARGS		{ int sys_umask(int newmask); }
    137 61	NOARGS		{ int sys_chroot(char *path); }
    138 62	UNIMPL		ustat
    139 63	NOARGS		{ int sys_dup2(u_int from, u_int to); }
    140 64	NOARGS		{ pid_t sys_getppid(void); }
    141 65	NOARGS		{ int sys_getpgrp(void); }
    142 66	NOARGS		{ int sys_setsid(void); }
    143 67	STD		{ int linux_sys_sigaction(int signum, \
    144 			    const struct linux_old_sigaction *nsa, \
    145 			    struct linux_old_sigaction *osa); }
    146 68	STD		{ int linux_sys_siggetmask(void); }
    147 69	STD		{ int linux_sys_sigsetmask(linux_old_sigset_t mask); }
    148 70	NOARGS		{ int sys_setreuid(uid_t ruid, uid_t euid); } 
    149 71	NOARGS		{ int sys_setregid(gid_t rgid, gid_t egid); }
    150 72	STD		{ int linux_sys_sigsuspend(caddr_t restart, \
    151 			    int oldmask, int mask); }
    152 73	STD		{ int linux_sys_sigpending(linux_old_sigset_t *set); }
    153 74	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
    154 			    u_int len);}
    155 75	NOARGS		{ int compat_43_sys_setrlimit(u_int which, \
    156 			    struct orlimit *rlp); }
    157 76	NOARGS		{ int compat_43_sys_getrlimit(u_int which, \
    158 			    struct orlimit *rlp); }
    159 77	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
    160 78	STD		{ int linux_sys_gettimeofday(struct timeval *tp, \
    161 			    struct timezone *tzp); }
    162 79	STD		{ int linux_sys_settimeofday(struct timeval *tp, \
    163 			    struct timezone *tzp); }
    164 80	NOARGS		{ int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
    165 81	NOARGS		{ int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
    166 82	UNIMPL		old_select
    167 83	STD		{ int linux_sys_symlink(const char *path, \
    168 			    const char *to); }
    169 84	NOARGS		{ int compat_43_sys_lstat(const char *path, \
    170 			    struct stat43 *up); } oolstat
    171 85	STD		{ int linux_sys_readlink(const char *name, char *buf, \
    172 			    int count); }
    173 86	UNIMPL		uselib
    174 ;86	STD		{ int linux_sys_uselib(const char *path); }
    175 87	STD		{ int linux_sys_swapon(char *name); }
    176 88	STD		{ int linux_sys_reboot(int magic1, int magic2, \
    177 			    int cmd, void *arg); }
    178 89	STD		{ int linux_sys_readdir(int fd, caddr_t dent, \
    179 			    unsigned int count); }
    180 90	NOARGS      	{ int linux_sys_mmap(unsigned long addr, size_t len, \
    181 			    int prot, int flags, int fd, linux_off_t offset); }
    182 91	NOARGS		{ int sys_munmap(caddr_t addr, int len); }
    183 92	STD		{ int linux_sys_truncate(const char *path, \
    184 			    long length); }
    185 93	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); }
    186 94	NOARGS		{ int sys_fchmod(int fd, int mode); }
    187 95 	NOARGS		{ int sys___posix_fchown(int fd, int uid, int gid); }
    188 96	NOARGS		{ int sys_getpriority(int which, int who); }
    189 97	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
    190 98	UNIMPL
    191 99	STD		{ int linux_sys_statfs(const char *path, \
    192 			    struct linux_statfs *sp); }
    193 100	STD		{ int linux_sys_fstatfs(int fd, \
    194 			    struct linux_statfs *sp); }
    195 101	STD		{ int linux_sys_ioperm(unsigned int lo, \
    196 			    unsigned int hi, int val); }
    197 102	STD		{ int linux_sys_socketcall(int what, void *args); }
    198 103	UNIMPL		syslog
    199 104	NOARGS		{ int sys_setitimer(u_int which, \
    200 			    struct itimerval *itv, struct itimerval *oitv); }
    201 105	NOARGS		{ int sys_getitimer(u_int which, \
    202 			    struct itimerval *itv); }
    203 106	STD		{ int linux_sys_stat(const char *path, \
    204 			    struct linux_stat *sp); }
    205 107	STD		{ int linux_sys_lstat(const char *path, \
    206 			    struct linux_stat *sp); }
    207 108	STD		{ int linux_sys_fstat(int fd, struct linux_stat *sp); }
    208 109	STD		{ int linux_sys_uname(struct linux_utsname *up); }
    209 110	UNIMPL		iopl	
    210 111	UNIMPL		vhangup
    211 112	UNIMPL		idle
    212 113	UNIMPL		vm86old 
    213 114	STD		{ int linux_sys_wait4(int pid, int *status, \
    214 			    int options, struct rusage *rusage); }
    215 115	STD		{ int linux_sys_swapoff(const char *path); }
    216 116	STD		{ int linux_sys_sysinfo(struct linux_sysinfo *arg); }
    217 117	STD		{ int linux_sys_ipc(int what, int a1, int a2, int a3, \
    218 			    caddr_t ptr); }
    219 118	NOARGS		{ int sys_fsync(int fd); }
    220 119	STD		{ int linux_sys_sigreturn(struct linux_pt_regs regs); }
    221 120	STD		{ int linux_sys_clone(int flags, void *stack); }
    222 121	STD		{ int linux_sys_setdomainname(char *domainname, \
    223 			    int len); }
    224 122	STD		{ int linux_sys_new_uname(struct linux_utsname *up); }
    225 123	UNIMPL		modify_ldt	
    226 124	UNIMPL		adjtimex
    227 125	NOARGS		{ int sys_mprotect(caddr_t addr, int len, int prot); }
    228 126	STD		{ int linux_sys_sigprocmask(int how, \
    229 			    const linux_old_sigset_t *set, \
    230 			    linux_old_sigset_t *oset); }
    231 127	UNIMPL		create_module
    232 128	UNIMPL		init_module
    233 129	UNIMPL		delete_module
    234 130	UNIMPL		get_kernel_syms
    235 131	UNIMPL		quotactl
    236 132	STD		{ int linux_sys_getpgid(int pid); }
    237 133	NOARGS		{ int sys_fchdir(int fd); }
    238 134	UNIMPL		bdflush
    239 135	UNIMPL		sysfs
    240 136	STD		{ int linux_sys_personality(int per); }
    241 137	UNIMPL		afs_syscall
    242 138	STD		{ int linux_sys_setfsuid(uid_t uid); }
    243 139	NOARGS		{ int linux_sys_getfsuid(void); }
    244 140	STD		{ int linux_sys_llseek(int fd, u_int32_t ohigh, \
    245 			    u_int32_t olow, caddr_t res, int whence); }
    246 141	STD		{ int linux_sys_getdents(int fd, \
    247 			    struct linux_dirent *dent, unsigned int count); }
    248 142	STD		{ int linux_sys_select(int nfds, fd_set *readfds, \
    249 			    fd_set *writefds, fd_set *exceptfds, \
    250 			    struct timeval *timeout); }
    251 143	NOARGS		{ int sys_flock(int fd, int how); }
    252 144	STD		{ int linux_sys_msync(caddr_t addr, int len, int fl); }
    253 145	NOARGS		{ int sys_readv(int fd, struct iovec *iovp, \
    254 				u_int iovcnt); }
    255 146	NOARGS		{ int sys_writev(int fd, struct iovec *iovp, \
    256 				u_int iovcnt); }
    257 147	STD		{ int linux_sys_cacheflush(void *addr, \
    258 			    int bytes, int cache); }
    259 148	UNIMPL		cachectl
    260 149	STD		{ int linux_sys_sysmips(int cmd, int arg1, \
    261 			    int arg2, int arg3); }
    262 150	UNIMPL
    263 151	NOARGS		{ pid_t sys_getsid(pid_t pid); }
    264 152	STD		{ int linux_sys_fdatasync(int fd); }
    265 153	STD		{ int linux_sys___sysctl(struct linux___sysctl *lsp); }
    266 154	NOARGS		{ int sys_mlock(caddr_t addr, size_t len); }
    267 155	NOARGS		{ int sys_munlock(caddr_t addr, size_t len); }
    268 156	NOARGS		{ int sys_mlockall(int flags); }
    269 157	NOARGS		{ int sys_munlockall(void); }
    270 158	STD		{ int linux_sys_sched_setparam(pid_t pid, \
    271 			    const struct linux_sched_param *sp); }
    272 159	STD		{ int linux_sys_sched_getparam(pid_t pid, \
    273 			    struct linux_sched_param *sp); }
    274 160	STD		{ int linux_sys_sched_setscheduler(pid_t pid, \
    275 			    int policy, const struct linux_sched_param *sp); }
    276 161	STD		{ int linux_sys_sched_getscheduler(pid_t pid); }
    277 162	STD		{ int linux_sys_sched_yield(void); }
    278 163	STD		{ int linux_sys_sched_get_priority_max(int policy); }
    279 164	STD		{ int linux_sys_sched_get_priority_min(int policy); }
    280 165	UNIMPL		sched_rr_get_interval
    281 166	NOARGS		{ int sys_nanosleep(const struct timespec *rqtp, \
    282 				struct timespec *rmtp); }
    283 167	STD		{ void *linux_sys_mremap(void *old_address, \
    284 			    size_t old_size, size_t new_size, u_long flags); }
    285 168	UNIMPL		accept
    286 169	UNIMPL		bind
    287 170	UNIMPL		connect
    288 171	UNIMPL		getpeername
    289 172	UNIMPL		getsockname
    290 173	UNIMPL		getsockopt
    291 174	UNIMPL		listen
    292 175	UNIMPL		recv
    293 176	UNIMPL		recvfrom
    294 177	UNIMPL		recvmsg
    295 178	UNIMPL		send
    296 179	UNIMPL		sendmsg
    297 180	UNIMPL		sendto
    298 181	UNIMPL		setsockopt
    299 182	UNIMPL		shudown
    300 183	UNIMPL		socket
    301 184	UNIMPL		socketpair
    302 185	STD		{ int linux_sys_setresuid(uid_t ruid, uid_t euid, \
    303 			    uid_t suid); }
    304 186	STD		{ int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
    305 			    uid_t *suid); }
    306 187	UNIMPL		query_module
    307 188	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
    308 			    int timeout); }
    309 189	UNIMPL		nfsservctl
    310 190	STD		{ int linux_sys_setresgid(gid_t rgid, gid_t egid, \
    311 			    gid_t sgid); }
    312 191	STD		{ int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
    313 			    gid_t *sgid); }
    314 192	UNIMPL		prctl
    315 193	STD		{ int linux_sys_rt_sigreturn( \
    316 			    struct linux_pt_regs regs); }
    317 194	STD		{ int linux_sys_rt_sigaction(int signum, \
    318 			    const struct linux_sigaction *nsa, \
    319 			    struct linux_sigaction *osa, \
    320 			    size_t sigsetsize); }
    321 195	STD		{ int linux_sys_rt_sigprocmask(int how, \
    322 			    const linux_sigset_t *set, \
    323 			    linux_sigset_t *oset, \
    324 			    size_t sigsetsize); }
    325 196	STD		{ int linux_sys_rt_sigpending( \
    326 			    linux_sigset_t *set, \
    327 			    size_t sigsetsize); }
    328 197	UNIMPL		rt_sigtimedwait
    329 ; XXX XAX int here?  sigset_t here?  siginfo_t
    330 198	STD		{ int linux_sys_rt_queueinfo(int pid, int signum, \
    331 			    void *uinfo); }
    332 199	STD		{ int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \
    333 			    size_t sigsetsize); }
    334 200	STD		{ int linux_sys_pread(int fd, char *buf, \
    335 			    size_t nbyte, linux_off_t offset); }
    336 201	STD		{ int linux_sys_pwrite(int fd, char *buf, \
    337 			    size_t nbyte, linux_off_t offset); }
    338 202	STD		{ int linux_sys_chown(const char *path, \
    339 			    int uid, int gid); }
    340 203	NOARGS		{ int sys___getcwd(char *bufp, size_t length); }
    341 204	UNIMPL		capget
    342 205	UNIMPL		capset
    343 206	STD		{ int linux_sys_sigaltstack( \
    344 			    const struct linux_sigaltstack *ss, \
    345 			    struct linux_sigaltstack *oss); }
    346 207	UNIMPL		sendfile
    347 208	UNIMPL
    348 209	UNIMPL
    349 210	UNIMPL		mmap2
    350 211	STD		{ int linux_sys_truncate64(const char *path, \
    351 			    off_t length); }
    352 212	UNIMPL		ftruncate64
    353 213	STD		{ int linux_sys_stat64(const char *path, \
    354 			     struct linux_stat64 *sp); }
    355 214	STD		{ int linux_sys_lstat64(const char *path, \
    356 			     struct linux_stat64 *sp); }
    357 215	STD		{ int linux_sys_fstat64(int fd, \
    358 			     struct linux_stat64 *sp); }
    359 216	UNIMPL		pivot_root
    360 217	UNIMPL		mincore
    361 218	UNIMPL		modvise
    362 219	UNIMPL		getdents64
    363 220	STD		{ int linux_sys_fcntl64(unsigned int fd, \
    364 			    unsigned int cmd, unsigned long arg); }
    365