summaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
blob: b8d18ce8d20df72bd7d3d99c692db1afc0b7807f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
	$NetBSD: syscalls.master,v 1.135 2004/01/02 18:52:17 cl Exp $

;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94

; NetBSD system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
;	number	system call number, must be in order
;	type	one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
;		the compatibility options defined in syscalls.conf.
;
; An optional field, MPSAFE, after the type field, indicates that
; the system call is MP-safe.
;
; types:
;	STD	always included
;	OBSOL	obsolete, not included in system
;	UNIMPL	unimplemented, not included in system
;	EXCL	implemented, but not included in system
;	NODEF	included, but don't define the syscall number
;	NOARGS	included, but don't define the syscall args structure
;	INDIR	included, but don't define the syscall args structure,
;		and allow it to be "really" varargs.
;
; The compat options are defined in the syscalls.conf file, and the
; compat option name is prefixed to the syscall name.  Other than
; that, they're like NODEF (for 'compat' options), or STD (for
; 'libcompat' options).
;
; The type-dependent arguments are as follows:
; For STD, NODEF, NOARGS, and compat syscalls:
;	{ pseudo-proto } [alias]
; For other syscalls:
;	[comment]
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall names and switch definition files only.

#include "opt_ktrace.h"
#include "opt_nfsserver.h"
#include "opt_ntp.h"
#include "opt_compat_netbsd.h"
#include "opt_sysv.h"
#include "opt_compat_43.h"
#include "opt_posix.h"

#include "fs_lfs.h"
#include "fs_nfs.h"

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>

%%

; Reserved/unimplemented system calls in the range 0-150 inclusive
; are reserved for use in future Berkeley releases.
; Additional system calls implemented in vendor and other
; redistributions should be placed in the reserved range at the end
; of the current calls.

0	INDIR		{ int sys_syscall(int number, ...); }
1	STD		{ void sys_exit(int rval); }
2	STD		{ int sys_fork(void); }
3	STD		{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
4	STD		{ ssize_t sys_write(int fd, const void *buf, \
			    size_t nbyte); }
5	STD		{ int sys_open(const char *path, \
			    int flags, ... mode_t mode); }
6	STD		{ int sys_close(int fd); }
7	STD		{ int sys_wait4(int pid, int *status, int options, \
			    struct rusage *rusage); }
8	COMPAT_43	{ int sys_creat(const char *path, mode_t mode); } ocreat
9	STD		{ int sys_link(const char *path, const char *link); }
10	STD		{ int sys_unlink(const char *path); }
11	OBSOL		execv
12	STD		{ int sys_chdir(const char *path); }
13	STD		{ int sys_fchdir(int fd); }
14	STD		{ int sys_mknod(const char *path, mode_t mode, \
			    dev_t dev); }
15	STD		{ int sys_chmod(const char *path, mode_t mode); }
16	STD		{ int sys_chown(const char *path, uid_t uid, \
			    gid_t gid); }
17	STD		{ int sys_obreak(char *nsize); } break
18	STD		{ int sys_getfsstat(struct statfs *buf, long bufsize, \
			    int flags); }
19	COMPAT_43	{ long sys_lseek(int fd, long offset, int whence); } \
			    olseek
#ifdef COMPAT_43
20	STD 		{ pid_t sys_getpid_with_ppid(void); } getpid
#else
20	STD MPSAFE	{ pid_t sys_getpid(void); }
#endif
21	STD		{ int sys_mount(const char *type, const char *path, \
			    int flags, void *data); }
22	STD		{ int sys_unmount(const char *path, int flags); }
23	STD		{ int sys_setuid(uid_t uid); }
#ifdef COMPAT_43
24	STD		{ uid_t sys_getuid_with_euid(void); } getuid
#else
24	STD		{ uid_t sys_getuid(void); }
#endif
25	STD		{ uid_t sys_geteuid(void); }
26	STD		{ int sys_ptrace(int req, pid_t pid, caddr_t addr, \
			    int data); }
27	STD		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
			    int flags); }
28	STD		{ ssize_t sys_sendmsg(int s, \
			    const struct msghdr *msg, int flags); }
29	STD		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
			    int flags, struct sockaddr *from, \
			    unsigned int *fromlenaddr); }
30	STD		{ int sys_accept(int s, struct sockaddr *name, \
			    unsigned int *anamelen); }
31	STD		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
			    unsigned int *alen); }
32	STD		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
			    unsigned int *alen); }
33	STD		{ int sys_access(const char *path, int flags); }
34	STD		{ int sys_chflags(const char *path, u_long flags); }
35	STD		{ int sys_fchflags(int fd, u_long flags); }
36	STD		{ void sys_sync(void); }
37	STD		{ int sys_kill(int pid, int signum); }
38	COMPAT_43	{ int sys_stat(const char *path, struct stat43 *ub); } \
			    stat43
39	STD		{ pid_t sys_getppid(void); }
40	COMPAT_43	{ int sys_lstat(const char *path, \
			    struct stat43 *ub); } lstat43
41	STD		{ int sys_dup(int fd); }
42	STD		{ int sys_pipe(void); }
43	STD		{ gid_t sys_getegid(void); }
44	STD		{ int sys_profil(caddr_t samples, size_t size, \
			    u_long offset, u_int scale); }
#if defined(KTRACE) || !defined(_KERNEL)
45	STD		{ int sys_ktrace(const char *fname, int ops, \
			    int facs, int pid); }
#else
45	EXCL		ktrace
#endif
46	COMPAT_13	{ int sys_sigaction(int signum, \
			    const struct sigaction13 *nsa, \
			    struct sigaction13 *osa); } sigaction13
#ifdef COMPAT_43
47	STD		{ gid_t sys_getgid_with_egid(void); } getgid
#else
47	STD		{ gid_t sys_getgid(void); }
#endif
48	COMPAT_13	{ int sys_sigprocmask(int how, \
			    int mask); } sigprocmask13
49	STD		{ int sys___getlogin(char *namebuf, size_t namelen); }
50	STD		{ int sys___setlogin(const char *namebuf); }
51	STD		{ int sys_acct(const char *path); }
52	COMPAT_13	{ int sys_sigpending(void); } sigpending13
53	COMPAT_13	{ int sys_sigaltstack( \
			    const struct sigaltstack13 *nss, \
			    struct sigaltstack13 *oss); } sigaltstack13
54	STD		{ int sys_ioctl(int fd, \
			    u_long com, ... void *data); }
55	COMPAT_12	{ int sys_reboot(int opt); } oreboot
56	STD		{ int sys_revoke(const char *path); }
57	STD		{ int sys_symlink(const char *path, \
			    const char *link); }
58	STD		{ int sys_readlink(const char *path, char *buf, \
			    size_t count); }
59	STD		{ int sys_execve(const char *path, \
			    char * const *argp, char * const *envp); }
60	STD		{ mode_t sys_umask(mode_t newmask); }
61	STD		{ int sys_chroot(const char *path); }
62	COMPAT_43	{ int sys_fstat(int fd, struct stat43 *sb); } fstat43
63	COMPAT_43	{ int sys_getkerninfo(int op, char *where, int *size, \
			    int arg); } ogetkerninfo
64	COMPAT_43	{ int sys_getpagesize(void); } ogetpagesize
65	COMPAT_12	{ int sys_msync(caddr_t addr, size_t len); }
; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
66	STD		{ int sys_vfork(void); }
67	OBSOL		vread
68	OBSOL		vwrite
69	STD		{ int sys_sbrk(intptr_t incr); }
70	STD		{ int sys_sstk(int incr); }
71	COMPAT_43	{ int sys_mmap(caddr_t addr, size_t len, int prot, \
			    int flags, int fd, long pos); } ommap
72	STD		{ int sys_ovadvise(int anom); } vadvise
73	STD		{ int sys_munmap(void *addr, size_t len); }
74	STD		{ int sys_mprotect(void *addr, size_t len, \
			    int prot); }
75	STD		{ int sys_madvise(void *addr, size_t len, \
			    int behav); }
76	OBSOL		vhangup
77	OBSOL		vlimit
78	STD		{ int sys_mincore(void *addr, size_t len, \
			    char *vec); }
79	STD		{ int sys_getgroups(int gidsetsize, \
			    gid_t *gidset); }
80	STD		{ int sys_setgroups(int gidsetsize, \
			    const gid_t *gidset); }
81	STD		{ int sys_getpgrp(void); }
82	STD		{ int sys_setpgid(int pid, int pgid); }
83	STD		{ int sys_setitimer(int which, \
			    const struct itimerval *itv, \
			    struct itimerval *oitv); }
84	COMPAT_43	{ int sys_wait(void); } owait
85	COMPAT_12	{ int sys_swapon(const char *name); } oswapon
86	STD		{ int sys_getitimer(int which, \
			    struct itimerval *itv); }
87	COMPAT_43	{ int sys_gethostname(char *hostname, u_int len); } \
			    ogethostname
88	COMPAT_43	{ int sys_sethostname(char *hostname, u_int len); } \
			    osethostname
89	COMPAT_43	{ int sys_getdtablesize(void); } ogetdtablesize
90	STD		{ int sys_dup2(int from, int to); }
91	UNIMPL		getdopt
92	STD		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
93	STD		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
			    fd_set *ex, struct timeval *tv); }
94	UNIMPL		setdopt
95	STD		{ int sys_fsync(int fd); }
96	STD		{ int sys_setpriority(int which, int who, int prio); }
97	STD		{ int sys_socket(int domain, int type, int protocol); }
98	STD		{ int sys_connect(int s, const struct sockaddr *name, \
			    unsigned int namelen); }
99	COMPAT_43	{ int sys_accept(int s, caddr_t name, \
			    int *anamelen); } oaccept
100	STD		{ int sys_getpriority(int which, int who); }
101	COMPAT_43	{ int sys_send(int s, caddr_t buf, int len, \
			    int flags); } osend
102	COMPAT_43	{ int sys_recv(int s, caddr_t buf, int len, \
			    int flags); } orecv
103	COMPAT_13	{ int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
			    sigreturn13
104	STD		{ int sys_bind(int s, const struct sockaddr *name, \
			    unsigned int namelen); }
105	STD		{ int sys_setsockopt(int s, int level, int name, \
			    const void *val, unsigned int valsize); }
106	STD		{ int sys_listen(int s, int backlog); }
107	OBSOL		vtimes
108	COMPAT_43	{ int sys_sigvec(int signum, struct sigvec *nsv, \
			    struct sigvec *osv); } osigvec
109	COMPAT_43	{ int sys_sigblock(int mask); } osigblock
110	COMPAT_43	{ int sys_sigsetmask(int mask); } osigsetmask
111	COMPAT_13	{ int sys_sigsuspend(int mask); } sigsuspend13
112	COMPAT_43	{ int sys_sigstack(struct sigstack *nss, \
			    struct sigstack *oss); } osigstack
113	COMPAT_43	{ int sys_recvmsg(int s, struct omsghdr *msg, \
			    int flags); } orecvmsg
114	COMPAT_43	{ int sys_sendmsg(int s, caddr_t msg, int flags); } \
			    osendmsg
115	OBSOL		vtrace
116	STD		{ int sys_gettimeofday(struct timeval *tp, \
			    struct timezone *tzp); }
117	STD		{ int sys_getrusage(int who, struct rusage *rusage); }
118	STD		{ int sys_getsockopt(int s, int level, int name, \
			    void *val, unsigned int *avalsize); }
119	OBSOL		resuba
120	STD		{ ssize_t sys_readv(int fd, \
			    const struct iovec *iovp, int iovcnt); }
121	STD		{ ssize_t sys_writev(int fd, \
			    const struct iovec *iovp, int iovcnt); }
122	STD		{ int sys_settimeofday(const struct timeval *tv, \
			    const struct timezone *tzp); }
123	STD		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
124	STD		{ int sys_fchmod(int fd, mode_t mode); }
125	COMPAT_43	{ int sys_recvfrom(int s, caddr_t buf, size_t len, \
			    int flags, caddr_t from, int *fromlenaddr); } \
			    orecvfrom
126	STD		{ int sys_setreuid(uid_t ruid, uid_t euid); }
127	STD		{ int sys_setregid(gid_t rgid, gid_t egid); }
128	STD		{ int sys_rename(const char *from, const char *to); }
129	COMPAT_43	{ int sys_truncate(const char *path, long length); } \
			    otruncate
130	COMPAT_43	{ int sys_ftruncate(int fd, long length); } oftruncate
131	STD		{ int sys_flock(int fd, int how); }
132	STD		{ int sys_mkfifo(const char *path, mode_t mode); }
133	STD		{ ssize_t sys_sendto(int s, const void *buf, \
			    size_t len, int flags, const struct sockaddr *to, \
			    unsigned int tolen); }
134	STD		{ int sys_shutdown(int s, int how); }
135	STD		{ int sys_socketpair(int domain, int type, \
			    int protocol, int *rsv); }
136	STD		{ int sys_mkdir(const char *path, mode_t mode); }
137	STD		{ int sys_rmdir(const char *path); }
138	STD		{ int sys_utimes(const char *path, \
			    const struct timeval *tptr); }
139	OBSOL		4.2 sigreturn
140	STD		{ int sys_adjtime(const struct timeval *delta, \
			    struct timeval *olddelta); }
141	COMPAT_43	{ int sys_getpeername(int fdes, caddr_t asa, \
			    int *alen); } ogetpeername
142	COMPAT_43	{ int32_t sys_gethostid(void); } ogethostid
143	COMPAT_43	{ int sys_sethostid(int32_t hostid); } osethostid
144	COMPAT_43	{ int sys_getrlimit(int which, \
			    struct orlimit *rlp); } ogetrlimit
145	COMPAT_43	{ int sys_setrlimit(int which, \
			    const struct orlimit *rlp); } osetrlimit
146	COMPAT_43	{ int sys_killpg(int pgid, int signum); } okillpg
147	STD		{ int sys_setsid(void); }
148	STD		{ int sys_quotactl(const char *path, int cmd, \
			    int uid, caddr_t arg); }
149	COMPAT_43	{ int sys_quota(void); } oquota
150	COMPAT_43	{ int sys_getsockname(int fdec, caddr_t asa, \
			    int *alen); } ogetsockname

; Syscalls 151-180 inclusive are reserved for vendor-specific
; system calls.  (This includes various calls added for compatibity
; with other Unix variants.)
; Some of these calls are now supported by BSD...
151	UNIMPL
152	UNIMPL
153	UNIMPL
154	UNIMPL
#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
155	STD		{ int sys_nfssvc(int flag, void *argp); }
#else
155	EXCL		nfssvc
#endif
156	COMPAT_43	{ int sys_getdirentries(int fd, char *buf, \
			    u_int count, long *basep); } ogetdirentries
157	STD		{ int sys_statfs(const char *path, \
			    struct statfs *buf); }
158	STD		{ int sys_fstatfs(int fd, struct statfs *buf); }
159	UNIMPL
160	UNIMPL
161	STD		{ int sys_getfh(const char *fname, fhandle_t *fhp); }
162	COMPAT_09	{ int sys_getdomainname(char *domainname, int len); } \
			    ogetdomainname
163	COMPAT_09	{ int sys_setdomainname(char *domainname, int len); } \
			    osetdomainname
164	COMPAT_09	{ int sys_uname(struct outsname *name); } ouname
165	STD		{ int sys_sysarch(int op, void *parms); }
166	UNIMPL
167	UNIMPL
168	UNIMPL
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64)
169	COMPAT_10	{ int sys_semsys(int which, int a2, int a3, int a4, \
			    int a5); } osemsys
#else
169	EXCL		1.0 semsys
#endif
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64)
170	COMPAT_10	{ int sys_msgsys(int which, int a2, int a3, int a4, \
			    int a5, int a6); } omsgsys
#else
170	EXCL		1.0 msgsys
#endif
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64)
171	COMPAT_10	{ int sys_shmsys(int which, int a2, int a3, int a4); } \
			    oshmsys
#else
171	EXCL		1.0 shmsys
#endif
172	UNIMPL
173	STD		{ ssize_t sys_pread(int fd, void *buf, \
			    size_t nbyte, int pad, off_t offset); }
174	STD		{ ssize_t sys_pwrite(int fd, const void *buf, \
			    size_t nbyte, int pad, off_t offset); }
; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
175	STD		{ int sys_ntp_gettime(struct ntptimeval *ntvp); }
#if defined(NTP) || !defined(_KERNEL)
176	STD		{ int sys_ntp_adjtime(struct timex *tp); }
#else
176	EXCL		ntp_adjtime
#endif
177	UNIMPL
178	UNIMPL
179	UNIMPL
180	UNIMPL

; Syscalls 180-199 are used by/reserved for BSD
181	STD		{ int sys_setgid(gid_t gid); }
182	STD		{ int sys_setegid(gid_t egid); }
183	STD		{ int sys_seteuid(uid_t euid); }
#if defined(LFS) || !defined(_KERNEL)
184	STD		{ int sys_lfs_bmapv(fsid_t *fsidp, \
			    struct block_info *blkiov, int blkcnt); }
185	STD		{ int sys_lfs_markv(fsid_t *fsidp, \
			    struct block_info *blkiov, int blkcnt); }
186	STD		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
187	STD		{ int sys_lfs_segwait(fsid_t *fsidp, \
			    struct timeval *tv); }
#else
184	EXCL		lfs_bmapv
185	EXCL		lfs_markv
186	EXCL		lfs_segclean
187	EXCL		lfs_segwait
#endif
188	COMPAT_12	{ int sys_stat(const char *path, struct stat12 *ub); } \
			    stat12
189	COMPAT_12	{ int sys_fstat(int fd, struct stat12 *sb); } fstat12
190	COMPAT_12	{ int sys_lstat(const char *path, \
			    struct stat12 *ub); } lstat12
191	STD		{ long sys_pathconf(const char *path, int name); }
192	STD		{ long sys_fpathconf(int fd, int name); }
193	UNIMPL
194	STD		{ int sys_getrlimit(int which, \
			    struct rlimit *rlp); }
195	STD		{ int sys_setrlimit(int which, \
			    const struct rlimit *rlp); }
196	COMPAT_12	{ int sys_getdirentries(int fd, char *buf, \
			    u_int count, long *basep); }
197	STD		{ void *sys_mmap(void *addr, size_t len, int prot, \
			    int flags, int fd, long pad, off_t pos); }
198	INDIR		{ quad_t sys___syscall(quad_t num, ...); }
199	STD		{ off_t sys_lseek(int fd, int pad, off_t offset, \
			    int whence); }
200	STD		{ int sys_truncate(const char *path, int pad, \
			    off_t length); }
201	STD		{ int sys_ftruncate(int fd, int pad, off_t length); }
202	STD		{ int sys___sysctl(int *name, u_int namelen, \
			    void *old, size_t *oldlenp, void *new, \
			    size_t newlen); }
203	STD		{ int sys_mlock(const void *addr, size_t len); }
204	STD		{ int sys_munlock(const void *addr, size_t len); }
205	STD		{ int sys_undelete(const char *path); }
206	STD		{ int sys_futimes(int fd, \
			    const struct timeval *tptr); }
207	STD		{ pid_t sys_getpgid(pid_t pid); }
208	STD		{ int sys_reboot(int opt, char *bootstr); }
209	STD		{ int sys_poll(struct pollfd *fds, u_int nfds, \
			    int timeout); }
;
; Syscalls 210-219 are reserved for dynamically loaded syscalls
;
#if defined(LKM) || !defined(_KERNEL)
210	NODEF		{ int sys_lkmnosys(void); }
211	NODEF		{ int sys_lkmnosys(void); }
212	NODEF		{ int sys_lkmnosys(void); }
213	NODEF		{ int sys_lkmnosys(void); }
214	NODEF		{ int sys_lkmnosys(void); }
215	NODEF		{ int sys_lkmnosys(void); }
216	NODEF		{ int sys_lkmnosys(void); }
217	NODEF		{ int sys_lkmnosys(void); }
218	NODEF		{ int sys_lkmnosys(void); }
219	NODEF		{ int sys_lkmnosys(void); }
#else	/* !LKM */
210	EXCL		lkmnosys
211	EXCL		lkmnosys
212	EXCL		lkmnosys
213	EXCL		lkmnosys
214	EXCL		lkmnosys
215	EXCL		lkmnosys
216	EXCL		lkmnosys
217	EXCL		lkmnosys
218	EXCL		lkmnosys
219	EXCL		lkmnosys
#endif	/* !LKM */
; System calls 220-300 are reserved for use by NetBSD
#if defined(SYSVSEM) || !defined(_KERNEL)
220	COMPAT_14	{ int sys___semctl(int semid, int semnum, int cmd, \
			    union __semun *arg); }
221	STD		{ int sys_semget(key_t key, int nsems, int semflg); }
222	STD		{ int sys_semop(int semid, struct sembuf *sops, \
			    size_t nsops); }
223	STD		{ int sys_semconfig(int flag); }
#else
220	EXCL		compat_14_semctl
221	EXCL		semget
222	EXCL		semop
223	EXCL		semconfig
#endif
#if defined(SYSVMSG) || !defined(_KERNEL)
224	COMPAT_14	{ int sys_msgctl(int msqid, int cmd, \
			    struct msqid_ds14 *buf); }
225	STD		{ int sys_msgget(key_t key, int msgflg); }
226	STD		{ int sys_msgsnd(int msqid, const void *msgp, \
			    size_t msgsz, int msgflg); }
227	STD		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
			    size_t msgsz, long msgtyp, int msgflg); }
#else
224	EXCL		compat_14_msgctl
225	EXCL		msgget
226	EXCL		msgsnd
227	EXCL		msgrcv
#endif
#if defined(SYSVSHM) || !defined(_KERNEL)
228	STD		{ void *sys_shmat(int shmid, const void *shmaddr, \
			    int shmflg); }
229	COMPAT_14	{ int sys_shmctl(int shmid, int cmd, \
			    struct shmid_ds14 *buf); }
230	STD		{ int sys_shmdt(const void *shmaddr); }
231	STD		{ int sys_shmget(key_t key, size_t size, int shmflg); }
#else
228	EXCL		shmat
229	EXCL		compat_14_shmctl
230	EXCL		shmdt
231	EXCL		shmget
#endif
232	STD		{ int sys_clock_gettime(clockid_t clock_id, \
			    struct timespec *tp); }
233	STD		{ int sys_clock_settime(clockid_t clock_id, \
			    const struct timespec *tp); }
234	STD		{ int sys_clock_getres(clockid_t clock_id, \
			    struct timespec *tp); }
235	STD		{ int sys_timer_create(clockid_t clock_id, \
			    struct sigevent *evp, timer_t *timerid); }
236	STD		{ int sys_timer_delete(timer_t timerid); }
237	STD		{ int sys_timer_settime(timer_t timerid, int flags, \
			    const struct itimerspec *value, \
			    struct itimerspec *ovalue); }
238	STD		{ int sys_timer_gettime(timer_t timerid, struct \
			    itimerspec *value); }
239	STD		{ int sys_timer_getoverrun(timer_t timerid); }
;
; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
;
240	STD		{ int sys_nanosleep(const struct timespec *rqtp, \
			    struct timespec *rmtp); }
241	STD		{ int sys_fdatasync(int fd); }
242	STD		{ int sys_mlockall(int flags); }
243	STD		{ int sys_munlockall(void); }
244	STD		{ int sys___sigtimedwait(const sigset_t *set, \
			    siginfo_t *info, \
			    struct timespec *timeout); }
245	UNIMPL		sys_sigqueue
;
; Syscall 246 is free for any use
;
246	UNIMPL
#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC))
247	STD		{ int sys__ksem_init(unsigned int value, semid_t *idp); }
248	STD		{ int sys__ksem_open(const char *name, int oflag, \
			    mode_t mode, unsigned int value, semid_t *idp); }
249	STD 		{ int sys__ksem_unlink(const char *name); }
250	STD		{ int sys__ksem_close(semid_t id); }
251	STD		{ int sys__ksem_post(semid_t id); }
252	STD		{ int sys__ksem_wait(semid_t id); }
253	STD		{ int sys__ksem_trywait(semid_t id); }
254	STD		{ int sys__ksem_getvalue(semid_t id, \
			    unsigned int *value); }
255	STD		{ int sys__ksem_destroy(semid_t id); }
256	UNIMPL		sys__ksem_timedwait
#else
247	EXCL		sys__ksem_init
248	EXCL		sys__ksem_open
249	EXCL 		sys__ksem_unlink
250	EXCL		sys__ksem_close
251	EXCL		sys__ksem_post
252	EXCL		sys__ksem_wait
253	EXCL		sys__ksem_trywait
254	EXCL		sys__ksem_getvalue
255	EXCL		sys__ksem_destroy
256	UNIMPL		sys__ksem_timedwait
#endif
257	UNIMPL		sys_mq_open
258	UNIMPL		sys_mq_close
259	UNIMPL		sys_mq_unlink
260	UNIMPL		sys_mq_getattr
261	UNIMPL		sys_mq_setattr
262	UNIMPL		sys_mq_notify
263	UNIMPL		sys_mq_send
264	UNIMPL		sys_mq_receive
265	UNIMPL		sys_mq_timedsend
266	UNIMPL		sys_mq_timedreceive
267	UNIMPL
268	UNIMPL
269	UNIMPL
270	STD		{ int sys___posix_rename(const char *from, \
			    const char *to); }
271	STD		{ int sys_swapctl(int cmd, const void *arg, int misc); }
272	STD		{ int sys_getdents(int fd, char *buf, size_t count); }
273	STD		{ int sys_minherit(void *addr, size_t len, \
			    int inherit); }
274	STD		{ int sys_lchmod(const char *path, mode_t mode); }
275	STD		{ int sys_lchown(const char *path, uid_t uid, \
			    gid_t gid); }
276	STD		{ int sys_lutimes(const char *path, \
			    const struct timeval *tptr); }
277	STD		{ int sys___msync13(void *addr, size_t len, int flags); }
278	STD		{ int sys___stat13(const char *path, struct stat *ub); }
279	STD		{ int sys___fstat13(int fd, struct stat *sb); }
280	STD		{ int sys___lstat13(const char *path, struct stat *ub); }
281	STD		{ int sys___sigaltstack14( \
			    const struct sigaltstack *nss, \
			    struct sigaltstack *oss); }
282	STD		{ int sys___vfork14(void); }
283	STD		{ int sys___posix_chown(const char *path, uid_t uid, \
			    gid_t gid); }
284	STD		{ int sys___posix_fchown(int fd, uid_t uid, \
			    gid_t gid); }
285	STD		{ int sys___posix_lchown(const char *path, uid_t uid, \
			    gid_t gid); }
286	STD		{ pid_t sys_getsid(pid_t pid); }
287	STD		{ pid_t sys___clone(int flags, void *stack); }
#if defined(KTRACE) || !defined(_KERNEL)
288	STD		{ int sys_fktrace(const int fd, int ops, \
			    int facs, int pid); }
#else
288	EXCL		ktrace
#endif
289	STD		{ ssize_t sys_preadv(int fd, \
			    const struct iovec *iovp, int iovcnt, \
			    int pad, off_t offset); }
290	STD		{ ssize_t sys_pwritev(int fd, \
			    const struct iovec *iovp, int iovcnt, \
			    int pad, off_t offset); }
291	COMPAT_16	{ int sys___sigaction14(int signum, \
			    const struct sigaction *nsa, \
			    struct sigaction *osa); }
292	STD		{ int sys___sigpending14(sigset_t *set); }
293	STD		{ int sys___sigprocmask14(int how, \
			    const sigset_t *set, \
			    sigset_t *oset); }
294	STD		{ int sys___sigsuspend14(const sigset_t *set); }
#if defined(__HAVE_SIGINFO)
295	COMPAT_16	{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
#else
295	STD		{ int sys___sigreturn14(struct sigcontext *sigcntxp); }
#endif
296	STD		{ int sys___getcwd(char *bufp, size_t length); }
297	STD		{ int sys_fchroot(int fd); }
298	STD		{ int sys_fhopen(const fhandle_t *fhp, int flags); }
299	STD		{ int sys_fhstat(const fhandle_t *fhp, \
			    struct stat *sb); }
300	STD		{ int sys_fhstatfs(const fhandle_t *fhp, \
			    struct statfs *buf); }
#if defined(SYSVSEM) || !defined(_KERNEL)
301	STD		{ int sys_____semctl13(int semid, int semnum, int cmd, \
			    ... union __semun *arg); }
#else
301	EXCL		____semctl13
#endif
#if defined(SYSVMSG) || !defined(_KERNEL)
302	STD		{ int sys___msgctl13(int msqid, int cmd, \
			    struct msqid_ds *buf); }
#else
302	EXCL		__msgctl13
#endif
#if defined(SYSVSHM) || !defined(_KERNEL)
303	STD		{ int sys___shmctl13(int shmid, int cmd, \
			    struct shmid_ds *buf); }
#else
303	EXCL		__shmctl13
#endif
304	STD		{ int sys_lchflags(const char *path, u_long flags); }
305	STD		{ int sys_issetugid(void); }
306	STD		{ int sys_utrace(const char *label, void *addr, \
				size_t len); }
307	STD		{ int sys_getcontext(struct __ucontext *ucp); }
308	STD		{ int sys_setcontext(const struct __ucontext *ucp); }
309	STD		{ int sys__lwp_create(const struct __ucontext *ucp, \
				u_long flags, lwpid_t *new_lwp); }
310	STD		{ int sys__lwp_exit(void); }
311	STD		{ lwpid_t sys__lwp_self(void); }
312	STD		{ int sys__lwp_wait(lwpid_t wait_for, \
				lwpid_t *departed); }
313	STD		{ int sys__lwp_suspend(lwpid_t target); }
314	STD		{ int sys__lwp_continue(lwpid_t target); }
315	STD		{ int sys__lwp_wakeup(lwpid_t target); }
316	STD		{ void *sys__lwp_getprivate(void); }
317	STD		{ void sys__lwp_setprivate(void *ptr); }
; Syscalls 318-329 reserved for remaining Solaris-compatible LWP calls.
318	UNIMPL
319	UNIMPL
320	UNIMPL
321	UNIMPL
322	UNIMPL
323	UNIMPL
324	UNIMPL
325	UNIMPL
326	UNIMPL
327	UNIMPL
328	UNIMPL
329	UNIMPL
; Scheduler activation syscalls
330	STD		{ int sys_sa_register(sa_upcall_t new, \
				sa_upcall_t *old, int flags, \
				ssize_t stackinfo_offset); }
331	STD		{ int sys_sa_stacks(int num, stack_t *stacks); }
332	STD		{ int sys_sa_enable(void); }
333	STD		{ int sys_sa_setconcurrency(int concurrency); }
334	STD		{ int sys_sa_yield(void); }
335	STD		{ int sys_sa_preempt(int sa_id); }
336	STD		{ int sys_sa_unblockyield(int sa_id, \
				void *up_preempted, stack_t *up_stack); }
;
; Syscalls 337-339 are reserved for other scheduler activation syscalls.
;
337	UNIMPL
338	UNIMPL
339	UNIMPL
340	STD		{ int sys___sigaction_sigtramp(int signum, \
			    const struct sigaction *nsa, \
			    struct sigaction *osa, \
			    const void *tramp, int vers); }
341	STD		{ int sys_pmc_get_info(int ctr, int op, void *args); }
342	STD		{ int sys_pmc_control(int ctr, int op, void *args); }
343	STD		{ int sys_rasctl(caddr_t addr, size_t len, int op); }
344	STD		{ int sys_kqueue(void); }
345	STD		{ int sys_kevent(int fd, \
			    const struct kevent *changelist, size_t nchanges, \
			    struct kevent *eventlist, size_t nevents, \
			    const struct timespec *timeout); }
;
; Syscalls 346-353 are reserved for the IEEE Std1003.1b scheduling syscalls
;
346	UNIMPL		sys_sched_setparam
347	UNIMPL		sys_sched_getparam
348	UNIMPL		sys_sched_setscheduler
349	UNIMPL		sys_sched_getscheduler
350	UNIMPL		sys_sched_yield
351	UNIMPL		sys_sched_get_priority_max
352	UNIMPL		sys_sched_get_priority_min
353	UNIMPL		sys_sched_rr_get_interval

354	STD		{ int sys_fsync_range(int fd, int flags, off_t start, \
			    off_t length); }