xref: /netbsd-src/sys/rump/kern/lib/libsys_sunos/syscalls.master (revision 4acfc19072dbedf9eda0fdf9aa8c2d67c4070b75)
1	$NetBSD: syscalls.master,v 1.2 2013/05/15 21:39:30 pooka Exp $
2
3;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
4
5; NetBSD system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.)
7;
8; Fields: number type [type-dependent ...]
9;	number	system call number, must be in order
10;	type	one of NODEF, UNIMPL, or NOARGS
11;
12; types:
13;	NODEF	always included
14;	UNIMPL	unimplemented, not included in system
15;	NODEF	included, but don't define the syscall number
16;	NOARGS	included, but don't define the syscall args structure
17;
18; arguments:
19;	PAD	argument not part of the C interface, used only for padding
20;
21;
22; Support just enough syscalls to make fs-utils run (plus a few other
23; low-hanging fruit)
24;
25
26#include <sys/param.h>
27#include <sys/systm.h>
28#include <sys/signal.h>
29#include <sys/socket.h>
30#include <sys/mount.h>
31#include <sys/sched.h>
32#include <sys/syscallargs.h>
33
34#include <compat/sunos/sunos.h>
35
36#include "rump_sunos_syscallargs.h"
37
38%%
39
400	NOARGS		{ int|sys||nosys(void); }
411	UNIMPL 		exit
422	UNIMPL 		fork
433	NOARGS		{ ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
444	NOARGS		{ ssize_t|sys||write(int fd, const void *buf, \
45			    size_t nbyte); }
465	NODEF		{ int|rump_sunos_sys||open(const char *path, \
47			    int flags, int mode); }
486	NOARGS	 	{ int|sys||close(int fd); }
497	UNIMPL		wait4
508	UNIMPL		creat
519	NOARGS 		{ int|sys||link(const char *path, const char *link); }
5210	NOARGS 	 	{ int|sys||unlink(const char *path); }
5311	UNIMPL		execv
5412	NOARGS 	 	{ int|sys||chdir(const char *path); }
5513	NOARGS 	 	{ int|sys||fchdir(int fd); }
5614	UNIMPL		mknod
5715	NOARGS 	 	{ int|sys||chmod(const char *path, int mode); }
5816	NOARGS 	 	{ int|sys||chown(const char *path, int uid, int gid); }
5917	UNIMPL		obreak
6018	UNIMPL		getfsstat
6119	UNIMPL		lseek
6220	NOARGS 		{ pid_t|sys||getpid_with_ppid(void); } getpid
6321	UNIMPL		mount
6422	UNIMPL		unmount
6523	NOARGS		{ int|sys||setuid(int uid); }
6624	NOARGS		{ int|sys||getuid_with_euid(void); } getuid
6725	NOARGS		{ int|sys||geteuid(void); }
6826	UNIMPL 		ptrace
6927	UNIMPL		recvmsg
7028	UNIMPL		sendmsg
7129	UNIMPL		recvfrom
7230	UNIMPL		accept
7331	UNIMPL		getpeername
7432	UNIMPL		getsockname
7533	NOARGS 		{ int|sys||access(const char *path, int flags); }
7634	UNIMPL		chflags
7735	UNIMPL		fchflags
7836	NOARGS		{ void|sys||sync(void); }
7937	UNIMPL 		kill
8038	UNIMPL		stat
8139	UNIMPL		getppid
8240	UNIMPL		lstat
8341	NOARGS 		{ int|sys||dup(int fd); }
8442	NOARGS 		{ int|sys||pipe(void); }
8543	UNIMPL		getegid
8644	UNIMPL 		profil
8745	UNIMPL 		ktrace
8846	UNIMPL		sigaction
8947	NOARGS 		{ int|sys||getgid_with_egid(void); } getgid
9048	UNIMPL		sigprocmask
9149	UNIMPL		__getlogin
9250	UNIMPL		__setlogin
9351	UNIMPL		acct
9452	UNIMPL  	sigpending
9553	UNIMPL  	sigaltstack
9654	UNIMPL		ioctl
9755	UNIMPL		reboot
9856	UNIMPL		revoke
9957	NOARGS 	 	{ int|sys||symlink(const char *path, \
100			    const char *link); }
10158	NOARGS 	 	{ ssize_t|sys||readlink(const char *path, char *buf, \
102			    int count); }
10359	UNIMPL 		execve
10460	NOARGS 	 	{ mode_t|sys||umask(mode_t newmask); }
10561	NOARGS 	 	{ int|sys||chroot(const char *path); }
10662	UNIMPL		fstat43
10763	UNIMPL		getkerninfo
10864	UNIMPL		getpagesize
10965	UNIMPL		msync
11066	UNIMPL 		vfork
11167	UNIMPL		vread
11268	UNIMPL		vwrite
11369	UNIMPL 		sbrk
11470	UNIMPL 		sstk
11571	UNIMPL  	mmap
11672	UNIMPL 		ovadvise
11773	UNIMPL 		munmap
11874	UNIMPL 		mprotect
11975	UNIMPL 		madvise
12076	UNIMPL		vhangup
12177	UNIMPL		vlimit
12278	UNIMPL 		mincore
12379	NOARGS 		{ int|sys||getgroups(int gidsetsize, \
124			    int *gidset); }
12580	NOARGS 		{ int|sys||setgroups(int gidsetsize, \
126			    const int *gidset); }
12781	NOARGS 		{ int|sys||getpgrp(void); }
12882	NOARGS 		{ int|sys||setpgid(int pid, int pgid); }
12983	UNIMPL		setitimer
13084	UNIMPL		wait
13185	UNIMPL		swapon
13286	UNIMPL		getitimer
13387	UNIMPL		gethostname
13488	UNIMPL		sethostname
13589	UNIMPL		getdtablesize
13690	NOARGS 	 	{ int|sys||dup2(int from, int to); }
13791	UNIMPL		getdopt
13892	UNIMPL		fcntl
13993	UNIMPL		select
14094	UNIMPL		setdopt
14195	NOARGS		{ int|sys||fsync(int fd); }
14296	UNIMPL		setpriority
14397	UNIMPL		socket
14498	UNIMPL		connect
14599	UNIMPL		accept
146100	UNIMPL 		getpriority
147
148101	UNIMPL		send
149102	UNIMPL		recv
150
151103	UNIMPL		sigreturn
152104	UNIMPL		bind
153105	UNIMPL		setsockopt
154106	UNIMPL		listen
155107	UNIMPL		vtimes
156108	UNIMPL		sigvec
157109	UNIMPL		sigblock
158110	UNIMPL		sigsetmask
159111	UNIMPL		sigsuspend
160112	UNIMPL		sigstack
161113	UNIMPL		orecvmsg
162114	UNIMPL		osendmsg
163115	UNIMPL		vtrace
164116	UNIMPL		gettimeofday
165117	UNIMPL 		getrusage
166118	UNIMPL		getsockopt
167119	UNIMPL		resuba
168120	NOARGS 		{ ssize_t|sys||readv(int fd, \
169			    struct iovec *iovp, int iovcnt); }
170121	NOARGS 		{ ssize_t|sys||writev(int fd, \
171			    struct iovec *iovp, int iovcnt); }
172122	UNIMPL		settimeofday
173123	NOARGS 	 	{ int|sys||fchown(int fd, int uid, int gid); }
174124	NOARGS 	 	{ int|sys||fchmod(int fd, int mode); }
175125	UNIMPL		orecvfrom
176126	NOARGS 		{ int|sys||setreuid(int ruid, int euid); }
177127	NOARGS 		{ int|sys||setregid(int rgid, int egid); }
178128	NOARGS 	 	{ int|sys||rename(char *from, char *to); }
179129	UNIMPL		otruncate
180130	UNIMPL		oftruncate
181131	NOARGS 	 	{ int|sys||flock(int fd, int how); }
182132	UNIMPL 	 	mkfifo
183133	NOARGS 	 	{ int|sys||sendto(int s, void *buf, \
184			    int len, int flags, void *to, int tolen); }
185134	NOARGS	 	{ int|sys||shutdown(int s, int how); }
186135	UNIMPL	 	socketpair
187136	NOARGS 	 	{ int|sys||mkdir(const char *path, int mode); }
188137	NOARGS 	 	{ int|sys||rmdir(const char *path); }
189138	UNIMPL		utimes
190
191139	UNIMPL		4.2 sigreturn
192140	UNIMPL		adjtime
193141	UNIMPL		ogetpeername
194142	UNIMPL		ogethostid
195143	UNIMPL		osethostid
196144	UNIMPL		ogetrlimit
197145	UNIMPL		osetrlimit
198146	UNIMPL		okillpg
199147	NOARGS 		{ int|sys||setsid(void); }
200148	UNIMPL		quotactl
201149	UNIMPL		oquota
202150	UNIMPL		ogetsockname
203
204; Syscalls 151-180 inclusive are reserved for vendor-specific
205; system calls.  (This includes various calls added for compatibity
206; with other Unix variants.)
207; Some of these calls are now supported by BSD...
208151	UNIMPL
209152	UNIMPL
210153	UNIMPL
211154	UNIMPL
212155	UNIMPL		nfssvc
213156	UNIMPL		ogetdirentries
214157	UNIMPL		statfs12
215158	UNIMPL		fstatfs12
216159	UNIMPL
217160	UNIMPL
218161	UNIMPL		getfh30
219162	UNIMPL		ogetdomainname
220163	UNIMPL		osetdomainname
221164	UNIMPL		ouname
222165	UNIMPL 		sysarch
223166	UNIMPL
224167	UNIMPL
225168	UNIMPL
226169	UNIMPL		1.0 semsys
227170	UNIMPL		1.0 msgsys
228171	UNIMPL		1.0 shmsys
229172	UNIMPL
230173	NOARGS 	 	{ ssize_t|sys||pread(int fd, char *buf, \
231			    size_t nbyte, int PAD, off_t offset); }
232174	NOARGS 	 	{ ssize_t|sys||pwrite(int fd, char *buf, \
233			    size_t nbyte, int PAD, off_t offset); }
234175	UNIMPL		ntp_gettime
235176	UNIMPL		ntp_adjtime
236177	UNIMPL
237178	UNIMPL
238179	UNIMPL
239180	UNIMPL
240
241; Syscalls 180-199 are used by/reserved for BSD
242181	NOARGS 		{ int|sys||setgid(gid_t gid); }
243182	NOARGS 		{ int|sys||setegid(gid_t egid); }
244183	NOARGS 		{ int|sys||seteuid(uid_t euid); }
245184	UNIMPL		lfs_bmapv
246185	UNIMPL		lfs_markv
247186	UNIMPL		lfs_segclean
248187	UNIMPL		lfs_segwait
249188	UNIMPL		stat12
250189	UNIMPL		fstat12
251190	UNIMPL		lstat12
252191	UNIMPL 		pathconf
253192	UNIMPL 		fpathconf
254193	UNIMPL
255194	UNIMPL 		getrlimit
256195	UNIMPL 		setrlimit
257196	UNIMPL		getdirentries
258197	UNIMPL		mmap
259198	UNIMPL		__syscall
260199	NOARGS 	 	{ long|sys||lseek(int fd, int PAD, off_t offset, \
261			    int whence); }
262200	NOARGS 	 	{ int|sys||truncate(const char *path, int PAD, \
263			    off_t length); }
264201	NOARGS 	 	{ int|sys||ftruncate(int fd, int PAD, off_t length); }
265202	UNIMPL		__sysctl
266203	UNIMPL		mlock
267204	UNIMPL		munlock
268205	UNIMPL		undelete
269206	UNIMPL		futimes
270207	NOARGS 	 	{ pid_t|sys||getpgid(pid_t pid); }
271208	UNIMPL	 	reboot
272209	NOARGS 	 	{ int|sys||poll(struct pollfd *fds, u_int nfds, \
273			    int timeout); }
274;
275; Syscalls 210-219 are reserved for dynamically loaded syscalls
276;
277210	UNIMPL	 	afssys
278211	UNIMPL
279212	UNIMPL
280213	UNIMPL
281214	UNIMPL
282215	UNIMPL
283216	UNIMPL
284217	UNIMPL
285218	UNIMPL
286219	UNIMPL
287220	UNIMPL		compat_14_semctl
288221	UNIMPL		semget
289222	UNIMPL		semop
290223	UNIMPL		semconfig
291224	UNIMPL 		compat_14_msgctl
292225	UNIMPL 		msgget
293226	UNIMPL 		msgsnd
294227	UNIMPL 		msgrcv
295228	UNIMPL		shmat
296229	UNIMPL		compat_14_shmctl
297230	UNIMPL		shmdt
298231	UNIMPL		shmget
299
300232	UNIMPL		clock_gettime
301233	UNIMPL		clock_settime
302234	UNIMPL		clock_getres
303235	UNIMPL		timer_create
304236	UNIMPL		timer_delete
305237	UNIMPL		timer_settime
306238	UNIMPL		timer_gettime
307239	UNIMPL		timer_getoverrun
308;
309; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
310;
311240	UNIMPL		nanosleep
312241	UNIMPL 	 	fdatasync
313242	UNIMPL		mlockall
314243	UNIMPL		munlockall
315244	UNIMPL		__sigtimedwait
316245	UNIMPL		sigqueueinfo
317246	UNIMPL		modctl
318247	UNIMPL		_ksem_init
319248	UNIMPL		_ksem_open
320249	UNIMPL		_ksem_unlink
321250	UNIMPL		_ksem_close
322251	UNIMPL		_ksem_post
323252	UNIMPL		_ksem_wait
324253	UNIMPL		_ksem_trywait
325254	UNIMPL		_ksem_getvalue
326255	UNIMPL		_ksem_destroy
327256	UNIMPL		_ksem_timedwait
328
329257	UNIMPL		mq_open
330258	UNIMPL		mq_close
331259	UNIMPL		mq_unlink
332260	UNIMPL		mq_getattr
333261	UNIMPL		mq_setattr
334262	UNIMPL		mq_notify
335263	UNIMPL		mq_send
336264	UNIMPL		mq_receive
337265	UNIMPL		mq_timedsend
338266	UNIMPL		mq_timedreceive
339267	UNIMPL
340268	UNIMPL
341269	UNIMPL
342270	UNIMPL		__posix_rename
343271	UNIMPL		swapctl
344272	UNIMPL		getdents
345273	UNIMPL		minherit
346274	UNIMPL 	 	lchmod
347275	UNIMPL 	 	lchown
348276	UNIMPL		lutimes
349277	UNIMPL		msync
350278	UNIMPL		stat
351279	UNIMPL		fstat
352280	UNIMPL		lstat
353281	UNIMPL		sigaltstack
354282	UNIMPL		vfork
355283	UNIMPL		__posix_chown
356284	UNIMPL		__posix_fchown
357285	UNIMPL		__posix_lchown
358286	NOARGS 		{ pid_t|sys||getsid(pid_t pid); }
359
360287	UNIMPL		__clone
361288	UNIMPL		fktrace
362289	UNIMPL 		{ ssize_t|sys||preadv(int fd, \
363			    const struct iovec *iovp, int iovcnt, \
364			    int PAD, off_t offset); }
365290	UNIMPL 		{ ssize_t|sys||pwritev(int fd, \
366			    const struct iovec *iovp, int iovcnt, \
367			    int PAD, off_t offset); }
368291	UNIMPL		sigaction
369292	UNIMPL		sigpending
370293	UNIMPL		sigprocmask
371294	UNIMPL		sigsuspend
372295	UNIMPL		sigreturn
373296	NOARGS 	 	{ int|sys||__getcwd(char *bufp, size_t length); }
374297	NOARGS 	 	{ int|sys||fchroot(int fd); }
375298	UNIMPL		fhopen
376299	UNIMPL		fhstat
377300	UNIMPL		fhstatfs
378301	UNIMPL		____semctl13
379302	UNIMPL		__msgctl13
380303	UNIMPL		__shmctl13
381304	UNIMPL 	 	lchflags
382305	UNIMPL		issetugid
383306	UNIMPL		utrace
384307	UNIMPL		getcontext
385308	UNIMPL		setcontext
386309	UNIMPL		_lwp_create
387310	UNIMPL		_lwp_exit
388311	UNIMPL		_lwp_self
389312	UNIMPL		_lwp_wait
390313	UNIMPL		_lwp_suspend
391314	UNIMPL		_lwp_continue
392315	UNIMPL		_lwp_wakeup
393316	UNIMPL		_lwp_getprivate
394317	UNIMPL		_lwp_setprivate
395318	UNIMPL		_lwp_kill
396319	UNIMPL		_lwp_detach
397320	UNIMPL		_lwp_park
398321	UNIMPL		_lwp_unpark
399322	UNIMPL		_lwp_unpark_all
400323	UNIMPL		_lwp_setname
401324	UNIMPL		_lwp_getname
402325	UNIMPL		_lwp_ctl
403
404; Syscalls 326-339 reserved for LWP syscalls.
405326	UNIMPL
406327	UNIMPL
407328	UNIMPL
408329	UNIMPL
409; SA system calls.
410330	UNIMPL		sa_register
411331	UNIMPL		sa_stacks
412332	UNIMPL		sa_enable
413333	UNIMPL		sa_setconcurrency
414334	UNIMPL		sa_yield
415335	UNIMPL		sa_preempt
416336	UNIMPL 		sys_sa_unblockyield
417;
418; Syscalls 337-339 are reserved for other scheduler activation syscalls.
419;
420337	UNIMPL
421338	UNIMPL
422339	UNIMPL
423
424340	UNIMPL		__sigaction_sigtramp
425341	UNIMPL		pmc_get_info
426342	UNIMPL		pmc_control
427343	UNIMPL		rasctl
428344	UNIMPL		kqueue
429345	UNIMPL		kevent
430
431; Scheduling system calls.
432346	UNIMPL		_sched_setparam
433347	UNIMPL		_sched_getparam
434348	UNIMPL		_sched_setaffinity
435349	UNIMPL		_sched_getaffinity
436350	UNIMPL		sched_yield
437351	UNIMPL
438352	UNIMPL
439353	UNIMPL
440
441354	UNIMPL		fsync_range
442355	UNIMPL		uuidgen
443356	UNIMPL		getvfsstat
444357	UNIMPL		statvfs1
445358	UNIMPL		fstatvfs1
446359	UNIMPL		fhstatvfs1
447360	UNIMPL		extattrctl
448361	UNIMPL		extattr_set_file
449362	UNIMPL		extattr_get_file
450363	UNIMPL		extattr_delete_file
451364	UNIMPL		extattr_set_fd
452365	UNIMPL		extattr_get_fd
453366	UNIMPL		extattr_delete_fd
454367	UNIMPL		extattr_set_link
455368	UNIMPL		extattr_get_link
456369	UNIMPL		extattr_delete_link
457370	UNIMPL		extattr_list_fd
458371	UNIMPL		extattr_list_file
459372	UNIMPL		extattr_list_link
460373	UNIMPL		pselect
461374	UNIMPL		pollts
462375	UNIMPL		setxattr
463376	UNIMPL		lsetxattr
464377	UNIMPL		fsetxattr
465378	UNIMPL		getxattr
466379	UNIMPL		lgetxattr
467380	UNIMPL		fgetxattr
468381	UNIMPL		listxattr
469382	UNIMPL		llistxattr
470383	UNIMPL		flistxattr
471384	UNIMPL		removexattr
472385	UNIMPL		lremovexattr
473386	UNIMPL		fremovexattr
474387	UNIMPL		stat30
475388	UNIMPL		fstat30
476389	UNIMPL		lstat30
477390	NODEF		{ int|rump_sunos_sys||getdents(int fd, \
478			    char *buf, size_t nbytes); }
479391	UNIMPL		old posix_fadvise
480392	UNIMPL		fhstat
481393	UNIMPL		ntp_gettime
482394	UNIMPL		socket
483395	UNIMPL		getfh
484396	UNIMPL		fhopen
485397	UNIMPL		fhstatvfs1
486398	UNIMPL		fhstat
487
488; Asynchronous I/O system calls
489399	UNIMPL		aio_cancel
490400	UNIMPL		aio_error
491401	UNIMPL		aio_fsync
492402	UNIMPL		aio_read
493403	UNIMPL		aio_return
494404	UNIMPL		aio_suspend
495405	UNIMPL		aio_write
496406	UNIMPL		lio_listio
497
498407	UNIMPL
499408	UNIMPL
500409	UNIMPL
501
502410	UNIMPL		mount
503411	UNIMPL		mremap
504
505; Processor-sets system calls
506412	UNIMPL		pset_create
507413	UNIMPL		pset_destroy
508414	UNIMPL		pset_assign
509415	UNIMPL		_pset_bind
510416	UNIMPL		fadvise
511417	UNIMPL		select
512418	UNIMPL		gettimeofday
513419	UNIMPL		settimeofday
514420	NOARGS		{ int|compat_50_sys||utimes(char *path, \
515			    struct timeval50 *tptr); }
516421	UNIMPL		adjtime
517422	UNIMPL		lfs_segwait
518423	NOARGS		{ int|compat_50_sys||futimes(int fd, \
519			    struct timeval50 *tptr); }
520424	UNIMPL		lutimes
521425	UNIMPL		setitimer
522426	UNIMPL		getitimer
523427	UNIMPL		clock_gettime
524428	UNIMPL		clock_settime
525429	UNIMPL		clock_getres
526430	UNIMPL		nanosleep
527431	UNIMPL		__sigtimedwait
528432	UNIMPL		mq_timedsend
529433	UNIMPL		mq_timedreceive
530434	UNIMPL		_lwp_park
531435	UNIMPL		kevent
532436	UNIMPL		pselect
533437	UNIMPL		ppoll
534438	UNIMPL		aio_suspend
535439	NODEF 		{ int|rump_sunos_sys||stat(const char *path, \
536			    struct sunos_stat *sp); }
537440	NODEF 		{ int|rump_sunos_sys||fstat(int fd, \
538			    struct sunos_stat *sp); }
539441	NODEF 		{ int|rump_sunos_sys||lstat(const char *path, \
540			    struct sunos_stat *sp); }
541442	UNIMPL		__semctl
542443	UNIMPL		shmctl
543444	UNIMPL		msgctl
544445	UNIMPL		getrusage
545446	UNIMPL		timer_settime
546447	UNIMPL		timer_gettime
547448	UNIMPL		ntp_gettime
548449	UNIMPL		wait4
549450	NOARGS 		{ int|sys|50|mknod(const char *path, mode_t mode, \
550			    int dev); }
551451	UNIMPL		fhstat
552
553; 452 only ever appeared in 5.99.x and can be reused after netbsd-7
554452	UNIMPL		5.99 quotactl
555453	UNIMPL		pipe2
556454	UNIMPL		dup3
557455	UNIMPL		kqueue1
558456	UNIMPL		paccept
559457	UNIMPL		linkat
560458	UNIMPL		renameat
561459	UNIMPL		mkfifoat
562460	UNIMPL		mknodat
563461	UNIMPL		mkdirat
564462	UNIMPL		faccessat
565463	UNIMPL		fchmodat
566464	UNIMPL		fchownat
567465	UNIMPL		fexecve
568466	UNIMPL		fstatat
569467	UNIMPL		utimensat
570468	UNIMPL		openat
571469	UNIMPL		readlinkat
572470	UNIMPL		symlinkat
573471	UNIMPL		unlinkat
574472	UNIMPL		futimens
575473	UNIMPL		__quotactl
576474	UNIMPL		posix_spawn
577475	UNIMPL		recvmmsg
578476	UNIMPL		sendmmsg
579