1/*	$OpenBSD: syscallargs.h,v 1.171 2015/08/26 05:40:40 doug Exp $	*/
2
3/*
4 * System call argument lists.
5 *
6 * DO NOT EDIT-- this file is automatically generated.
7 * created from;	OpenBSD: syscalls.master,v 1.157 2015/08/26 05:20:06 doug Exp
8 */
9
10#ifdef	syscallarg
11#undef	syscallarg
12#endif
13
14#define	syscallarg(x)							\
15	union {								\
16		register_t pad;						\
17		struct { x datum; } le;					\
18		struct {						\
19			int8_t pad[ (sizeof (register_t) < sizeof (x))	\
20				? 0					\
21				: sizeof (register_t) - sizeof (x)];	\
22			x datum;					\
23		} be;							\
24	}
25
26struct sys_exit_args {
27	syscallarg(int) rval;
28};
29
30struct sys_read_args {
31	syscallarg(int) fd;
32	syscallarg(void *) buf;
33	syscallarg(size_t) nbyte;
34};
35
36struct sys_write_args {
37	syscallarg(int) fd;
38	syscallarg(const void *) buf;
39	syscallarg(size_t) nbyte;
40};
41
42struct sys_open_args {
43	syscallarg(const char *) path;
44	syscallarg(int) flags;
45	syscallarg(mode_t) mode;
46};
47
48struct sys_close_args {
49	syscallarg(int) fd;
50};
51
52struct sys_getentropy_args {
53	syscallarg(void *) buf;
54	syscallarg(size_t) nbyte;
55};
56
57struct sys___tfork_args {
58	syscallarg(const struct __tfork *) param;
59	syscallarg(size_t) psize;
60};
61
62struct sys_link_args {
63	syscallarg(const char *) path;
64	syscallarg(const char *) link;
65};
66
67struct sys_unlink_args {
68	syscallarg(const char *) path;
69};
70
71struct sys_wait4_args {
72	syscallarg(pid_t) pid;
73	syscallarg(int *) status;
74	syscallarg(int) options;
75	syscallarg(struct rusage *) rusage;
76};
77
78struct sys_chdir_args {
79	syscallarg(const char *) path;
80};
81
82struct sys_fchdir_args {
83	syscallarg(int) fd;
84};
85
86struct sys_mknod_args {
87	syscallarg(const char *) path;
88	syscallarg(mode_t) mode;
89	syscallarg(dev_t) dev;
90};
91
92struct sys_chmod_args {
93	syscallarg(const char *) path;
94	syscallarg(mode_t) mode;
95};
96
97struct sys_chown_args {
98	syscallarg(const char *) path;
99	syscallarg(uid_t) uid;
100	syscallarg(gid_t) gid;
101};
102
103struct sys_obreak_args {
104	syscallarg(char *) nsize;
105};
106
107struct sys_getrusage_args {
108	syscallarg(int) who;
109	syscallarg(struct rusage *) rusage;
110};
111
112struct sys_mount_args {
113	syscallarg(const char *) type;
114	syscallarg(const char *) path;
115	syscallarg(int) flags;
116	syscallarg(void *) data;
117};
118
119struct sys_unmount_args {
120	syscallarg(const char *) path;
121	syscallarg(int) flags;
122};
123
124struct sys_setuid_args {
125	syscallarg(uid_t) uid;
126};
127
128struct sys_ptrace_args {
129	syscallarg(int) req;
130	syscallarg(pid_t) pid;
131	syscallarg(caddr_t) addr;
132	syscallarg(int) data;
133};
134
135struct sys_recvmsg_args {
136	syscallarg(int) s;
137	syscallarg(struct msghdr *) msg;
138	syscallarg(int) flags;
139};
140
141struct sys_sendmsg_args {
142	syscallarg(int) s;
143	syscallarg(const struct msghdr *) msg;
144	syscallarg(int) flags;
145};
146
147struct sys_recvfrom_args {
148	syscallarg(int) s;
149	syscallarg(void *) buf;
150	syscallarg(size_t) len;
151	syscallarg(int) flags;
152	syscallarg(struct sockaddr *) from;
153	syscallarg(socklen_t *) fromlenaddr;
154};
155
156struct sys_accept_args {
157	syscallarg(int) s;
158	syscallarg(struct sockaddr *) name;
159	syscallarg(socklen_t *) anamelen;
160};
161
162struct sys_getpeername_args {
163	syscallarg(int) fdes;
164	syscallarg(struct sockaddr *) asa;
165	syscallarg(socklen_t *) alen;
166};
167
168struct sys_getsockname_args {
169	syscallarg(int) fdes;
170	syscallarg(struct sockaddr *) asa;
171	syscallarg(socklen_t *) alen;
172};
173
174struct sys_access_args {
175	syscallarg(const char *) path;
176	syscallarg(int) amode;
177};
178
179struct sys_chflags_args {
180	syscallarg(const char *) path;
181	syscallarg(u_int) flags;
182};
183
184struct sys_fchflags_args {
185	syscallarg(int) fd;
186	syscallarg(u_int) flags;
187};
188
189struct sys_kill_args {
190	syscallarg(int) pid;
191	syscallarg(int) signum;
192};
193
194struct sys_stat_args {
195	syscallarg(const char *) path;
196	syscallarg(struct stat *) ub;
197};
198
199struct sys_lstat_args {
200	syscallarg(const char *) path;
201	syscallarg(struct stat *) ub;
202};
203
204struct sys_dup_args {
205	syscallarg(int) fd;
206};
207
208struct sys_fstatat_args {
209	syscallarg(int) fd;
210	syscallarg(const char *) path;
211	syscallarg(struct stat *) buf;
212	syscallarg(int) flag;
213};
214
215struct sys_profil_args {
216	syscallarg(caddr_t) samples;
217	syscallarg(size_t) size;
218	syscallarg(u_long) offset;
219	syscallarg(u_int) scale;
220};
221
222struct sys_ktrace_args {
223	syscallarg(const char *) fname;
224	syscallarg(int) ops;
225	syscallarg(int) facs;
226	syscallarg(pid_t) pid;
227};
228
229struct sys_sigaction_args {
230	syscallarg(int) signum;
231	syscallarg(const struct sigaction *) nsa;
232	syscallarg(struct sigaction *) osa;
233};
234
235struct sys_sigprocmask_args {
236	syscallarg(int) how;
237	syscallarg(sigset_t) mask;
238};
239
240struct sys_getlogin_args {
241	syscallarg(char *) namebuf;
242	syscallarg(u_int) namelen;
243};
244
245struct sys_setlogin_args {
246	syscallarg(const char *) namebuf;
247};
248
249struct sys_acct_args {
250	syscallarg(const char *) path;
251};
252
253struct sys_fstat_args {
254	syscallarg(int) fd;
255	syscallarg(struct stat *) sb;
256};
257
258struct sys_ioctl_args {
259	syscallarg(int) fd;
260	syscallarg(u_long) com;
261	syscallarg(void *) data;
262};
263
264struct sys_reboot_args {
265	syscallarg(int) opt;
266};
267
268struct sys_revoke_args {
269	syscallarg(const char *) path;
270};
271
272struct sys_symlink_args {
273	syscallarg(const char *) path;
274	syscallarg(const char *) link;
275};
276
277struct sys_readlink_args {
278	syscallarg(const char *) path;
279	syscallarg(char *) buf;
280	syscallarg(size_t) count;
281};
282
283struct sys_execve_args {
284	syscallarg(const char *) path;
285	syscallarg(char *const *) argp;
286	syscallarg(char *const *) envp;
287};
288
289struct sys_umask_args {
290	syscallarg(mode_t) newmask;
291};
292
293struct sys_chroot_args {
294	syscallarg(const char *) path;
295};
296
297struct sys_getfsstat_args {
298	syscallarg(struct statfs *) buf;
299	syscallarg(size_t) bufsize;
300	syscallarg(int) flags;
301};
302
303struct sys_statfs_args {
304	syscallarg(const char *) path;
305	syscallarg(struct statfs *) buf;
306};
307
308struct sys_fstatfs_args {
309	syscallarg(int) fd;
310	syscallarg(struct statfs *) buf;
311};
312
313struct sys_fhstatfs_args {
314	syscallarg(const fhandle_t *) fhp;
315	syscallarg(struct statfs *) buf;
316};
317
318struct sys_gettimeofday_args {
319	syscallarg(struct timeval *) tp;
320	syscallarg(struct timezone *) tzp;
321};
322
323struct sys_settimeofday_args {
324	syscallarg(const struct timeval *) tv;
325	syscallarg(const struct timezone *) tzp;
326};
327
328struct sys_setitimer_args {
329	syscallarg(int) which;
330	syscallarg(const struct itimerval *) itv;
331	syscallarg(struct itimerval *) oitv;
332};
333
334struct sys_getitimer_args {
335	syscallarg(int) which;
336	syscallarg(struct itimerval *) itv;
337};
338
339struct sys_select_args {
340	syscallarg(int) nd;
341	syscallarg(fd_set *) in;
342	syscallarg(fd_set *) ou;
343	syscallarg(fd_set *) ex;
344	syscallarg(struct timeval *) tv;
345};
346
347struct sys_kevent_args {
348	syscallarg(int) fd;
349	syscallarg(const struct kevent *) changelist;
350	syscallarg(int) nchanges;
351	syscallarg(struct kevent *) eventlist;
352	syscallarg(int) nevents;
353	syscallarg(const struct timespec *) timeout;
354};
355
356struct sys_munmap_args {
357	syscallarg(void *) addr;
358	syscallarg(size_t) len;
359};
360
361struct sys_mprotect_args {
362	syscallarg(void *) addr;
363	syscallarg(size_t) len;
364	syscallarg(int) prot;
365};
366
367struct sys_madvise_args {
368	syscallarg(void *) addr;
369	syscallarg(size_t) len;
370	syscallarg(int) behav;
371};
372
373struct sys_utimes_args {
374	syscallarg(const char *) path;
375	syscallarg(const struct timeval *) tptr;
376};
377
378struct sys_futimes_args {
379	syscallarg(int) fd;
380	syscallarg(const struct timeval *) tptr;
381};
382
383struct sys_mincore_args {
384	syscallarg(void *) addr;
385	syscallarg(size_t) len;
386	syscallarg(char *) vec;
387};
388
389struct sys_getgroups_args {
390	syscallarg(int) gidsetsize;
391	syscallarg(gid_t *) gidset;
392};
393
394struct sys_setgroups_args {
395	syscallarg(int) gidsetsize;
396	syscallarg(const gid_t *) gidset;
397};
398
399struct sys_setpgid_args {
400	syscallarg(pid_t) pid;
401	syscallarg(pid_t) pgid;
402};
403
404struct sys_sendsyslog_args {
405	syscallarg(const void *) buf;
406	syscallarg(size_t) nbyte;
407};
408
409struct sys_utimensat_args {
410	syscallarg(int) fd;
411	syscallarg(const char *) path;
412	syscallarg(const struct timespec *) times;
413	syscallarg(int) flag;
414};
415
416struct sys_futimens_args {
417	syscallarg(int) fd;
418	syscallarg(const struct timespec *) times;
419};
420
421struct sys_kbind_args {
422	syscallarg(const struct __kbind *) param;
423	syscallarg(size_t) psize;
424	syscallarg(int64_t) proc_cookie;
425};
426
427struct sys_clock_gettime_args {
428	syscallarg(clockid_t) clock_id;
429	syscallarg(struct timespec *) tp;
430};
431
432struct sys_clock_settime_args {
433	syscallarg(clockid_t) clock_id;
434	syscallarg(const struct timespec *) tp;
435};
436
437struct sys_clock_getres_args {
438	syscallarg(clockid_t) clock_id;
439	syscallarg(struct timespec *) tp;
440};
441
442struct sys_dup2_args {
443	syscallarg(int) from;
444	syscallarg(int) to;
445};
446
447struct sys_nanosleep_args {
448	syscallarg(const struct timespec *) rqtp;
449	syscallarg(struct timespec *) rmtp;
450};
451
452struct sys_fcntl_args {
453	syscallarg(int) fd;
454	syscallarg(int) cmd;
455	syscallarg(void *) arg;
456};
457
458struct sys_accept4_args {
459	syscallarg(int) s;
460	syscallarg(struct sockaddr *) name;
461	syscallarg(socklen_t *) anamelen;
462	syscallarg(int) flags;
463};
464
465struct sys___thrsleep_args {
466	syscallarg(const volatile void *) ident;
467	syscallarg(clockid_t) clock_id;
468	syscallarg(const struct timespec *) tp;
469	syscallarg(void *) lock;
470	syscallarg(const int *) abort;
471};
472
473struct sys_fsync_args {
474	syscallarg(int) fd;
475};
476
477struct sys_setpriority_args {
478	syscallarg(int) which;
479	syscallarg(id_t) who;
480	syscallarg(int) prio;
481};
482
483struct sys_socket_args {
484	syscallarg(int) domain;
485	syscallarg(int) type;
486	syscallarg(int) protocol;
487};
488
489struct sys_connect_args {
490	syscallarg(int) s;
491	syscallarg(const struct sockaddr *) name;
492	syscallarg(socklen_t) namelen;
493};
494
495struct sys_getdents_args {
496	syscallarg(int) fd;
497	syscallarg(void *) buf;
498	syscallarg(size_t) buflen;
499};
500
501struct sys_getpriority_args {
502	syscallarg(int) which;
503	syscallarg(id_t) who;
504};
505
506struct sys_pipe2_args {
507	syscallarg(int *) fdp;
508	syscallarg(int) flags;
509};
510
511struct sys_dup3_args {
512	syscallarg(int) from;
513	syscallarg(int) to;
514	syscallarg(int) flags;
515};
516
517struct sys_sigreturn_args {
518	syscallarg(struct sigcontext *) sigcntxp;
519};
520
521struct sys_bind_args {
522	syscallarg(int) s;
523	syscallarg(const struct sockaddr *) name;
524	syscallarg(socklen_t) namelen;
525};
526
527struct sys_setsockopt_args {
528	syscallarg(int) s;
529	syscallarg(int) level;
530	syscallarg(int) name;
531	syscallarg(const void *) val;
532	syscallarg(socklen_t) valsize;
533};
534
535struct sys_listen_args {
536	syscallarg(int) s;
537	syscallarg(int) backlog;
538};
539
540struct sys_chflagsat_args {
541	syscallarg(int) fd;
542	syscallarg(const char *) path;
543	syscallarg(u_int) flags;
544	syscallarg(int) atflags;
545};
546
547struct sys_tame_args {
548	syscallarg(int) flags;
549	syscallarg(const char **) paths;
550};
551
552struct sys_ppoll_args {
553	syscallarg(struct pollfd *) fds;
554	syscallarg(u_int) nfds;
555	syscallarg(const struct timespec *) ts;
556	syscallarg(const sigset_t *) mask;
557};
558
559struct sys_pselect_args {
560	syscallarg(int) nd;
561	syscallarg(fd_set *) in;
562	syscallarg(fd_set *) ou;
563	syscallarg(fd_set *) ex;
564	syscallarg(const struct timespec *) ts;
565	syscallarg(const sigset_t *) mask;
566};
567
568struct sys_sigsuspend_args {
569	syscallarg(int) mask;
570};
571
572struct sys_getsockopt_args {
573	syscallarg(int) s;
574	syscallarg(int) level;
575	syscallarg(int) name;
576	syscallarg(void *) val;
577	syscallarg(socklen_t *) avalsize;
578};
579
580struct sys_readv_args {
581	syscallarg(int) fd;
582	syscallarg(const struct iovec *) iovp;
583	syscallarg(int) iovcnt;
584};
585
586struct sys_writev_args {
587	syscallarg(int) fd;
588	syscallarg(const struct iovec *) iovp;
589	syscallarg(int) iovcnt;
590};
591
592struct sys_fchown_args {
593	syscallarg(int) fd;
594	syscallarg(uid_t) uid;
595	syscallarg(gid_t) gid;
596};
597
598struct sys_fchmod_args {
599	syscallarg(int) fd;
600	syscallarg(mode_t) mode;
601};
602
603struct sys_setreuid_args {
604	syscallarg(uid_t) ruid;
605	syscallarg(uid_t) euid;
606};
607
608struct sys_setregid_args {
609	syscallarg(gid_t) rgid;
610	syscallarg(gid_t) egid;
611};
612
613struct sys_rename_args {
614	syscallarg(const char *) from;
615	syscallarg(const char *) to;
616};
617
618struct sys_flock_args {
619	syscallarg(int) fd;
620	syscallarg(int) how;
621};
622
623struct sys_mkfifo_args {
624	syscallarg(const char *) path;
625	syscallarg(mode_t) mode;
626};
627
628struct sys_sendto_args {
629	syscallarg(int) s;
630	syscallarg(const void *) buf;
631	syscallarg(size_t) len;
632	syscallarg(int) flags;
633	syscallarg(const struct sockaddr *) to;
634	syscallarg(socklen_t) tolen;
635};
636
637struct sys_shutdown_args {
638	syscallarg(int) s;
639	syscallarg(int) how;
640};
641
642struct sys_socketpair_args {
643	syscallarg(int) domain;
644	syscallarg(int) type;
645	syscallarg(int) protocol;
646	syscallarg(int *) rsv;
647};
648
649struct sys_mkdir_args {
650	syscallarg(const char *) path;
651	syscallarg(mode_t) mode;
652};
653
654struct sys_rmdir_args {
655	syscallarg(const char *) path;
656};
657
658struct sys_adjtime_args {
659	syscallarg(const struct timeval *) delta;
660	syscallarg(struct timeval *) olddelta;
661};
662
663struct sys_quotactl_args {
664	syscallarg(const char *) path;
665	syscallarg(int) cmd;
666	syscallarg(int) uid;
667	syscallarg(char *) arg;
668};
669
670struct sys_nfssvc_args {
671	syscallarg(int) flag;
672	syscallarg(void *) argp;
673};
674
675struct sys_getfh_args {
676	syscallarg(const char *) fname;
677	syscallarg(fhandle_t *) fhp;
678};
679
680struct sys_sysarch_args {
681	syscallarg(int) op;
682	syscallarg(void *) parms;
683};
684
685struct sys_pread_args {
686	syscallarg(int) fd;
687	syscallarg(void *) buf;
688	syscallarg(size_t) nbyte;
689	syscallarg(int) pad;
690	syscallarg(off_t) offset;
691};
692
693struct sys_pwrite_args {
694	syscallarg(int) fd;
695	syscallarg(const void *) buf;
696	syscallarg(size_t) nbyte;
697	syscallarg(int) pad;
698	syscallarg(off_t) offset;
699};
700
701struct sys_setgid_args {
702	syscallarg(gid_t) gid;
703};
704
705struct sys_setegid_args {
706	syscallarg(gid_t) egid;
707};
708
709struct sys_seteuid_args {
710	syscallarg(uid_t) euid;
711};
712
713struct sys_pathconf_args {
714	syscallarg(const char *) path;
715	syscallarg(int) name;
716};
717
718struct sys_fpathconf_args {
719	syscallarg(int) fd;
720	syscallarg(int) name;
721};
722
723struct sys_swapctl_args {
724	syscallarg(int) cmd;
725	syscallarg(const void *) arg;
726	syscallarg(int) misc;
727};
728
729struct sys_getrlimit_args {
730	syscallarg(int) which;
731	syscallarg(struct rlimit *) rlp;
732};
733
734struct sys_setrlimit_args {
735	syscallarg(int) which;
736	syscallarg(const struct rlimit *) rlp;
737};
738
739struct sys_mmap_args {
740	syscallarg(void *) addr;
741	syscallarg(size_t) len;
742	syscallarg(int) prot;
743	syscallarg(int) flags;
744	syscallarg(int) fd;
745	syscallarg(long) pad;
746	syscallarg(off_t) pos;
747};
748
749struct sys_lseek_args {
750	syscallarg(int) fd;
751	syscallarg(int) pad;
752	syscallarg(off_t) offset;
753	syscallarg(int) whence;
754};
755
756struct sys_truncate_args {
757	syscallarg(const char *) path;
758	syscallarg(int) pad;
759	syscallarg(off_t) length;
760};
761
762struct sys_ftruncate_args {
763	syscallarg(int) fd;
764	syscallarg(int) pad;
765	syscallarg(off_t) length;
766};
767
768struct sys___sysctl_args {
769	syscallarg(const int *) name;
770	syscallarg(u_int) namelen;
771	syscallarg(void *) old;
772	syscallarg(size_t *) oldlenp;
773	syscallarg(void *) new;
774	syscallarg(size_t) newlen;
775};
776
777struct sys_mlock_args {
778	syscallarg(const void *) addr;
779	syscallarg(size_t) len;
780};
781
782struct sys_munlock_args {
783	syscallarg(const void *) addr;
784	syscallarg(size_t) len;
785};
786
787struct sys_getpgid_args {
788	syscallarg(pid_t) pid;
789};
790
791struct sys_utrace_args {
792	syscallarg(const char *) label;
793	syscallarg(const void *) addr;
794	syscallarg(size_t) len;
795};
796
797struct sys_semget_args {
798	syscallarg(key_t) key;
799	syscallarg(int) nsems;
800	syscallarg(int) semflg;
801};
802
803struct sys_msgget_args {
804	syscallarg(key_t) key;
805	syscallarg(int) msgflg;
806};
807
808struct sys_msgsnd_args {
809	syscallarg(int) msqid;
810	syscallarg(const void *) msgp;
811	syscallarg(size_t) msgsz;
812	syscallarg(int) msgflg;
813};
814
815struct sys_msgrcv_args {
816	syscallarg(int) msqid;
817	syscallarg(void *) msgp;
818	syscallarg(size_t) msgsz;
819	syscallarg(long) msgtyp;
820	syscallarg(int) msgflg;
821};
822
823struct sys_shmat_args {
824	syscallarg(int) shmid;
825	syscallarg(const void *) shmaddr;
826	syscallarg(int) shmflg;
827};
828
829struct sys_shmdt_args {
830	syscallarg(const void *) shmaddr;
831};
832
833struct sys_minherit_args {
834	syscallarg(void *) addr;
835	syscallarg(size_t) len;
836	syscallarg(int) inherit;
837};
838
839struct sys_poll_args {
840	syscallarg(struct pollfd *) fds;
841	syscallarg(u_int) nfds;
842	syscallarg(int) timeout;
843};
844
845struct sys_lchown_args {
846	syscallarg(const char *) path;
847	syscallarg(uid_t) uid;
848	syscallarg(gid_t) gid;
849};
850
851struct sys_getsid_args {
852	syscallarg(pid_t) pid;
853};
854
855struct sys_msync_args {
856	syscallarg(void *) addr;
857	syscallarg(size_t) len;
858	syscallarg(int) flags;
859};
860
861struct sys_pipe_args {
862	syscallarg(int *) fdp;
863};
864
865struct sys_fhopen_args {
866	syscallarg(const fhandle_t *) fhp;
867	syscallarg(int) flags;
868};
869
870struct sys_preadv_args {
871	syscallarg(int) fd;
872	syscallarg(const struct iovec *) iovp;
873	syscallarg(int) iovcnt;
874	syscallarg(int) pad;
875	syscallarg(off_t) offset;
876};
877
878struct sys_pwritev_args {
879	syscallarg(int) fd;
880	syscallarg(const struct iovec *) iovp;
881	syscallarg(int) iovcnt;
882	syscallarg(int) pad;
883	syscallarg(off_t) offset;
884};
885
886struct sys_mlockall_args {
887	syscallarg(int) flags;
888};
889
890struct sys_getresuid_args {
891	syscallarg(uid_t *) ruid;
892	syscallarg(uid_t *) euid;
893	syscallarg(uid_t *) suid;
894};
895
896struct sys_setresuid_args {
897	syscallarg(uid_t) ruid;
898	syscallarg(uid_t) euid;
899	syscallarg(uid_t) suid;
900};
901
902struct sys_getresgid_args {
903	syscallarg(gid_t *) rgid;
904	syscallarg(gid_t *) egid;
905	syscallarg(gid_t *) sgid;
906};
907
908struct sys_setresgid_args {
909	syscallarg(gid_t) rgid;
910	syscallarg(gid_t) egid;
911	syscallarg(gid_t) sgid;
912};
913
914struct sys_mquery_args {
915	syscallarg(void *) addr;
916	syscallarg(size_t) len;
917	syscallarg(int) prot;
918	syscallarg(int) flags;
919	syscallarg(int) fd;
920	syscallarg(long) pad;
921	syscallarg(off_t) pos;
922};
923
924struct sys_closefrom_args {
925	syscallarg(int) fd;
926};
927
928struct sys_sigaltstack_args {
929	syscallarg(const struct sigaltstack *) nss;
930	syscallarg(struct sigaltstack *) oss;
931};
932
933struct sys_shmget_args {
934	syscallarg(key_t) key;
935	syscallarg(size_t) size;
936	syscallarg(int) shmflg;
937};
938
939struct sys_semop_args {
940	syscallarg(int) semid;
941	syscallarg(struct sembuf *) sops;
942	syscallarg(size_t) nsops;
943};
944
945struct sys_fhstat_args {
946	syscallarg(const fhandle_t *) fhp;
947	syscallarg(struct stat *) sb;
948};
949
950struct sys___semctl_args {
951	syscallarg(int) semid;
952	syscallarg(int) semnum;
953	syscallarg(int) cmd;
954	syscallarg(union semun *) arg;
955};
956
957struct sys_shmctl_args {
958	syscallarg(int) shmid;
959	syscallarg(int) cmd;
960	syscallarg(struct shmid_ds *) buf;
961};
962
963struct sys_msgctl_args {
964	syscallarg(int) msqid;
965	syscallarg(int) cmd;
966	syscallarg(struct msqid_ds *) buf;
967};
968
969struct sys___thrwakeup_args {
970	syscallarg(const volatile void *) ident;
971	syscallarg(int) n;
972};
973
974struct sys___threxit_args {
975	syscallarg(pid_t *) notdead;
976};
977
978struct sys___thrsigdivert_args {
979	syscallarg(sigset_t) sigmask;
980	syscallarg(siginfo_t *) info;
981	syscallarg(const struct timespec *) timeout;
982};
983
984struct sys___getcwd_args {
985	syscallarg(char *) buf;
986	syscallarg(size_t) len;
987};
988
989struct sys_adjfreq_args {
990	syscallarg(const int64_t *) freq;
991	syscallarg(int64_t *) oldfreq;
992};
993
994struct sys_setrtable_args {
995	syscallarg(int) rtableid;
996};
997
998struct sys_faccessat_args {
999	syscallarg(int) fd;
1000	syscallarg(const char *) path;
1001	syscallarg(int) amode;
1002	syscallarg(int) flag;
1003};
1004
1005struct sys_fchmodat_args {
1006	syscallarg(int) fd;
1007	syscallarg(const char *) path;
1008	syscallarg(mode_t) mode;
1009	syscallarg(int) flag;
1010};
1011
1012struct sys_fchownat_args {
1013	syscallarg(int) fd;
1014	syscallarg(const char *) path;
1015	syscallarg(uid_t) uid;
1016	syscallarg(gid_t) gid;
1017	syscallarg(int) flag;
1018};
1019
1020struct sys_linkat_args {
1021	syscallarg(int) fd1;
1022	syscallarg(const char *) path1;
1023	syscallarg(int) fd2;
1024	syscallarg(const char *) path2;
1025	syscallarg(int) flag;
1026};
1027
1028struct sys_mkdirat_args {
1029	syscallarg(int) fd;
1030	syscallarg(const char *) path;
1031	syscallarg(mode_t) mode;
1032};
1033
1034struct sys_mkfifoat_args {
1035	syscallarg(int) fd;
1036	syscallarg(const char *) path;
1037	syscallarg(mode_t) mode;
1038};
1039
1040struct sys_mknodat_args {
1041	syscallarg(int) fd;
1042	syscallarg(const char *) path;
1043	syscallarg(mode_t) mode;
1044	syscallarg(dev_t) dev;
1045};
1046
1047struct sys_openat_args {
1048	syscallarg(int) fd;
1049	syscallarg(const char *) path;
1050	syscallarg(int) flags;
1051	syscallarg(mode_t) mode;
1052};
1053
1054struct sys_readlinkat_args {
1055	syscallarg(int) fd;
1056	syscallarg(const char *) path;
1057	syscallarg(char *) buf;
1058	syscallarg(size_t) count;
1059};
1060
1061struct sys_renameat_args {
1062	syscallarg(int) fromfd;
1063	syscallarg(const char *) from;
1064	syscallarg(int) tofd;
1065	syscallarg(const char *) to;
1066};
1067
1068struct sys_symlinkat_args {
1069	syscallarg(const char *) path;
1070	syscallarg(int) fd;
1071	syscallarg(const char *) link;
1072};
1073
1074struct sys_unlinkat_args {
1075	syscallarg(int) fd;
1076	syscallarg(const char *) path;
1077	syscallarg(int) flag;
1078};
1079
1080struct sys___set_tcb_args {
1081	syscallarg(void *) tcb;
1082};
1083
1084/*
1085 * System call prototypes.
1086 */
1087
1088int	sys_exit(struct proc *, void *, register_t *);
1089int	sys_fork(struct proc *, void *, register_t *);
1090int	sys_read(struct proc *, void *, register_t *);
1091int	sys_write(struct proc *, void *, register_t *);
1092int	sys_open(struct proc *, void *, register_t *);
1093int	sys_close(struct proc *, void *, register_t *);
1094int	sys_getentropy(struct proc *, void *, register_t *);
1095int	sys___tfork(struct proc *, void *, register_t *);
1096int	sys_link(struct proc *, void *, register_t *);
1097int	sys_unlink(struct proc *, void *, register_t *);
1098int	sys_wait4(struct proc *, void *, register_t *);
1099int	sys_chdir(struct proc *, void *, register_t *);
1100int	sys_fchdir(struct proc *, void *, register_t *);
1101int	sys_mknod(struct proc *, void *, register_t *);
1102int	sys_chmod(struct proc *, void *, register_t *);
1103int	sys_chown(struct proc *, void *, register_t *);
1104int	sys_obreak(struct proc *, void *, register_t *);
1105int	sys_getdtablecount(struct proc *, void *, register_t *);
1106int	sys_getrusage(struct proc *, void *, register_t *);
1107int	sys_getpid(struct proc *, void *, register_t *);
1108int	sys_mount(struct proc *, void *, register_t *);
1109int	sys_unmount(struct proc *, void *, register_t *);
1110int	sys_setuid(struct proc *, void *, register_t *);
1111int	sys_getuid(struct proc *, void *, register_t *);
1112int	sys_geteuid(struct proc *, void *, register_t *);
1113#ifdef PTRACE
1114int	sys_ptrace(struct proc *, void *, register_t *);
1115#else
1116#endif
1117int	sys_recvmsg(struct proc *, void *, register_t *);
1118int	sys_sendmsg(struct proc *, void *, register_t *);
1119int	sys_recvfrom(struct proc *, void *, register_t *);
1120int	sys_accept(struct proc *, void *, register_t *);
1121int	sys_getpeername(struct proc *, void *, register_t *);
1122int	sys_getsockname(struct proc *, void *, register_t *);
1123int	sys_access(struct proc *, void *, register_t *);
1124int	sys_chflags(struct proc *, void *, register_t *);
1125int	sys_fchflags(struct proc *, void *, register_t *);
1126int	sys_sync(struct proc *, void *, register_t *);
1127int	sys_kill(struct proc *, void *, register_t *);
1128int	sys_stat(struct proc *, void *, register_t *);
1129int	sys_getppid(struct proc *, void *, register_t *);
1130int	sys_lstat(struct proc *, void *, register_t *);
1131int	sys_dup(struct proc *, void *, register_t *);
1132int	sys_fstatat(struct proc *, void *, register_t *);
1133int	sys_getegid(struct proc *, void *, register_t *);
1134int	sys_profil(struct proc *, void *, register_t *);
1135#ifdef KTRACE
1136int	sys_ktrace(struct proc *, void *, register_t *);
1137#else
1138#endif
1139int	sys_sigaction(struct proc *, void *, register_t *);
1140int	sys_getgid(struct proc *, void *, register_t *);
1141int	sys_sigprocmask(struct proc *, void *, register_t *);
1142int	sys_getlogin(struct proc *, void *, register_t *);
1143int	sys_setlogin(struct proc *, void *, register_t *);
1144#ifdef ACCOUNTING
1145int	sys_acct(struct proc *, void *, register_t *);
1146#else
1147#endif
1148int	sys_sigpending(struct proc *, void *, register_t *);
1149int	sys_fstat(struct proc *, void *, register_t *);
1150int	sys_ioctl(struct proc *, void *, register_t *);
1151int	sys_reboot(struct proc *, void *, register_t *);
1152int	sys_revoke(struct proc *, void *, register_t *);
1153int	sys_symlink(struct proc *, void *, register_t *);
1154int	sys_readlink(struct proc *, void *, register_t *);
1155int	sys_execve(struct proc *, void *, register_t *);
1156int	sys_umask(struct proc *, void *, register_t *);
1157int	sys_chroot(struct proc *, void *, register_t *);
1158int	sys_getfsstat(struct proc *, void *, register_t *);
1159int	sys_statfs(struct proc *, void *, register_t *);
1160int	sys_fstatfs(struct proc *, void *, register_t *);
1161int	sys_fhstatfs(struct proc *, void *, register_t *);
1162int	sys_vfork(struct proc *, void *, register_t *);
1163int	sys_gettimeofday(struct proc *, void *, register_t *);
1164int	sys_settimeofday(struct proc *, void *, register_t *);
1165int	sys_setitimer(struct proc *, void *, register_t *);
1166int	sys_getitimer(struct proc *, void *, register_t *);
1167int	sys_select(struct proc *, void *, register_t *);
1168int	sys_kevent(struct proc *, void *, register_t *);
1169int	sys_munmap(struct proc *, void *, register_t *);
1170int	sys_mprotect(struct proc *, void *, register_t *);
1171int	sys_madvise(struct proc *, void *, register_t *);
1172int	sys_utimes(struct proc *, void *, register_t *);
1173int	sys_futimes(struct proc *, void *, register_t *);
1174int	sys_mincore(struct proc *, void *, register_t *);
1175int	sys_getgroups(struct proc *, void *, register_t *);
1176int	sys_setgroups(struct proc *, void *, register_t *);
1177int	sys_getpgrp(struct proc *, void *, register_t *);
1178int	sys_setpgid(struct proc *, void *, register_t *);
1179int	sys_sendsyslog(struct proc *, void *, register_t *);
1180int	sys_utimensat(struct proc *, void *, register_t *);
1181int	sys_futimens(struct proc *, void *, register_t *);
1182int	sys_kbind(struct proc *, void *, register_t *);
1183int	sys_clock_gettime(struct proc *, void *, register_t *);
1184int	sys_clock_settime(struct proc *, void *, register_t *);
1185int	sys_clock_getres(struct proc *, void *, register_t *);
1186int	sys_dup2(struct proc *, void *, register_t *);
1187int	sys_nanosleep(struct proc *, void *, register_t *);
1188int	sys_fcntl(struct proc *, void *, register_t *);
1189int	sys_accept4(struct proc *, void *, register_t *);
1190int	sys___thrsleep(struct proc *, void *, register_t *);
1191int	sys_fsync(struct proc *, void *, register_t *);
1192int	sys_setpriority(struct proc *, void *, register_t *);
1193int	sys_socket(struct proc *, void *, register_t *);
1194int	sys_connect(struct proc *, void *, register_t *);
1195int	sys_getdents(struct proc *, void *, register_t *);
1196int	sys_getpriority(struct proc *, void *, register_t *);
1197int	sys_pipe2(struct proc *, void *, register_t *);
1198int	sys_dup3(struct proc *, void *, register_t *);
1199int	sys_sigreturn(struct proc *, void *, register_t *);
1200int	sys_bind(struct proc *, void *, register_t *);
1201int	sys_setsockopt(struct proc *, void *, register_t *);
1202int	sys_listen(struct proc *, void *, register_t *);
1203int	sys_chflagsat(struct proc *, void *, register_t *);
1204int	sys_tame(struct proc *, void *, register_t *);
1205int	sys_ppoll(struct proc *, void *, register_t *);
1206int	sys_pselect(struct proc *, void *, register_t *);
1207int	sys_sigsuspend(struct proc *, void *, register_t *);
1208int	sys_getsockopt(struct proc *, void *, register_t *);
1209int	sys_readv(struct proc *, void *, register_t *);
1210int	sys_writev(struct proc *, void *, register_t *);
1211int	sys_fchown(struct proc *, void *, register_t *);
1212int	sys_fchmod(struct proc *, void *, register_t *);
1213int	sys_setreuid(struct proc *, void *, register_t *);
1214int	sys_setregid(struct proc *, void *, register_t *);
1215int	sys_rename(struct proc *, void *, register_t *);
1216int	sys_flock(struct proc *, void *, register_t *);
1217int	sys_mkfifo(struct proc *, void *, register_t *);
1218int	sys_sendto(struct proc *, void *, register_t *);
1219int	sys_shutdown(struct proc *, void *, register_t *);
1220int	sys_socketpair(struct proc *, void *, register_t *);
1221int	sys_mkdir(struct proc *, void *, register_t *);
1222int	sys_rmdir(struct proc *, void *, register_t *);
1223int	sys_adjtime(struct proc *, void *, register_t *);
1224int	sys_setsid(struct proc *, void *, register_t *);
1225int	sys_quotactl(struct proc *, void *, register_t *);
1226#if defined(NFSCLIENT) || defined(NFSSERVER)
1227int	sys_nfssvc(struct proc *, void *, register_t *);
1228#else
1229#endif
1230int	sys_getfh(struct proc *, void *, register_t *);
1231int	sys_sysarch(struct proc *, void *, register_t *);
1232int	sys_pread(struct proc *, void *, register_t *);
1233int	sys_pwrite(struct proc *, void *, register_t *);
1234int	sys_setgid(struct proc *, void *, register_t *);
1235int	sys_setegid(struct proc *, void *, register_t *);
1236int	sys_seteuid(struct proc *, void *, register_t *);
1237int	sys_pathconf(struct proc *, void *, register_t *);
1238int	sys_fpathconf(struct proc *, void *, register_t *);
1239int	sys_swapctl(struct proc *, void *, register_t *);
1240int	sys_getrlimit(struct proc *, void *, register_t *);
1241int	sys_setrlimit(struct proc *, void *, register_t *);
1242int	sys_mmap(struct proc *, void *, register_t *);
1243int	sys_lseek(struct proc *, void *, register_t *);
1244int	sys_truncate(struct proc *, void *, register_t *);
1245int	sys_ftruncate(struct proc *, void *, register_t *);
1246int	sys___sysctl(struct proc *, void *, register_t *);
1247int	sys_mlock(struct proc *, void *, register_t *);
1248int	sys_munlock(struct proc *, void *, register_t *);
1249int	sys_getpgid(struct proc *, void *, register_t *);
1250int	sys_utrace(struct proc *, void *, register_t *);
1251#ifdef SYSVSEM
1252int	sys_semget(struct proc *, void *, register_t *);
1253#else
1254#endif
1255#ifdef SYSVMSG
1256int	sys_msgget(struct proc *, void *, register_t *);
1257int	sys_msgsnd(struct proc *, void *, register_t *);
1258int	sys_msgrcv(struct proc *, void *, register_t *);
1259#else
1260#endif
1261#ifdef SYSVSHM
1262int	sys_shmat(struct proc *, void *, register_t *);
1263int	sys_shmdt(struct proc *, void *, register_t *);
1264#else
1265#endif
1266int	sys_minherit(struct proc *, void *, register_t *);
1267int	sys_poll(struct proc *, void *, register_t *);
1268int	sys_issetugid(struct proc *, void *, register_t *);
1269int	sys_lchown(struct proc *, void *, register_t *);
1270int	sys_getsid(struct proc *, void *, register_t *);
1271int	sys_msync(struct proc *, void *, register_t *);
1272int	sys_pipe(struct proc *, void *, register_t *);
1273int	sys_fhopen(struct proc *, void *, register_t *);
1274int	sys_preadv(struct proc *, void *, register_t *);
1275int	sys_pwritev(struct proc *, void *, register_t *);
1276int	sys_kqueue(struct proc *, void *, register_t *);
1277int	sys_mlockall(struct proc *, void *, register_t *);
1278int	sys_munlockall(struct proc *, void *, register_t *);
1279int	sys_getresuid(struct proc *, void *, register_t *);
1280int	sys_setresuid(struct proc *, void *, register_t *);
1281int	sys_getresgid(struct proc *, void *, register_t *);
1282int	sys_setresgid(struct proc *, void *, register_t *);
1283int	sys_mquery(struct proc *, void *, register_t *);
1284int	sys_closefrom(struct proc *, void *, register_t *);
1285int	sys_sigaltstack(struct proc *, void *, register_t *);
1286#ifdef SYSVSHM
1287int	sys_shmget(struct proc *, void *, register_t *);
1288#else
1289#endif
1290#ifdef SYSVSEM
1291int	sys_semop(struct proc *, void *, register_t *);
1292#else
1293#endif
1294int	sys_fhstat(struct proc *, void *, register_t *);
1295#ifdef SYSVSEM
1296int	sys___semctl(struct proc *, void *, register_t *);
1297#else
1298#endif
1299#ifdef SYSVSHM
1300int	sys_shmctl(struct proc *, void *, register_t *);
1301#else
1302#endif
1303#ifdef SYSVMSG
1304int	sys_msgctl(struct proc *, void *, register_t *);
1305#else
1306#endif
1307int	sys_sched_yield(struct proc *, void *, register_t *);
1308int	sys_getthrid(struct proc *, void *, register_t *);
1309int	sys___thrwakeup(struct proc *, void *, register_t *);
1310int	sys___threxit(struct proc *, void *, register_t *);
1311int	sys___thrsigdivert(struct proc *, void *, register_t *);
1312int	sys___getcwd(struct proc *, void *, register_t *);
1313int	sys_adjfreq(struct proc *, void *, register_t *);
1314int	sys_setrtable(struct proc *, void *, register_t *);
1315int	sys_getrtable(struct proc *, void *, register_t *);
1316int	sys_faccessat(struct proc *, void *, register_t *);
1317int	sys_fchmodat(struct proc *, void *, register_t *);
1318int	sys_fchownat(struct proc *, void *, register_t *);
1319int	sys_linkat(struct proc *, void *, register_t *);
1320int	sys_mkdirat(struct proc *, void *, register_t *);
1321int	sys_mkfifoat(struct proc *, void *, register_t *);
1322int	sys_mknodat(struct proc *, void *, register_t *);
1323int	sys_openat(struct proc *, void *, register_t *);
1324int	sys_readlinkat(struct proc *, void *, register_t *);
1325int	sys_renameat(struct proc *, void *, register_t *);
1326int	sys_symlinkat(struct proc *, void *, register_t *);
1327int	sys_unlinkat(struct proc *, void *, register_t *);
1328int	sys___set_tcb(struct proc *, void *, register_t *);
1329int	sys___get_tcb(struct proc *, void *, register_t *);
1330