Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  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
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
	$NetBSD: syscalls.master,v 1.44 2019/06/18 01:39:01 christos 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.
;
; 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.

#if defined(_KERNEL_OPT)
#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_quota.h"
#endif

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/sched.h>
#include <sys/syscallargs.h>
#include <compat/aoutm68k/aoutm68k_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	NOARGS INDIR	{ int|sys||syscall(int code, \
			    ... register32_t args[AOUTM68K_SYS_MAXSYSARGS]); }
1	NOARGS		{ void|sys||exit(int rval); }
2	NOARGS		{ int|sys||fork(void); }
3	NOARGS		{ ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
4	NOARGS		{ ssize_t|sys||write(int fd, const void *buf, \
			    size_t nbyte); }
5	NOARGS		{ int|sys||open(const char *path, int flags, \
			    ... mode_t mode); }
6	NOARGS		{ int|sys||close(int fd); }
7	NOARGS		{ int|compat_50_sys||wait4(int pid, int *status, \
			    int options, struct rusage50 *rusage); }
#if defined(COMPAT_43) || !defined(_KERNEL)
8	NOARGS		{ int|compat_43_sys||creat(const char *path, \
			    mode_t mode); } ocreat
#else
8	EXCL		compat_43_sys_creat
#endif
9	NOARGS		{ int|sys||link(const char *path, const char *link); }
10	NOARGS		{ int|sys||unlink(const char *path); }
11	OBSOL		execv
12	NOARGS		{ int|sys||chdir(const char *path); }
13	NOARGS		{ int|sys||fchdir(int fd); }
14	NOARGS		{ int|compat_50_sys||mknod(const char *path, \
			    mode_t mode, dev_t dev); }
15	NOARGS		{ int|sys||chmod(const char *path, mode_t mode); }
16	NOARGS		{ int|sys||chown(const char *path, uid_t uid, \
			    gid_t gid); }
17	NOARGS		{ int|sys||obreak(char *nsize); } break
#if defined(COMPAT_20) || !defined(_KERNEL)
18	NOARGS		{ int|compat_20_sys||getfsstat(struct statfs12 *buf, \
			    long bufsize, int flags); }
#else
18	EXCL		compat_20_sys_getfsstat
#endif
#if defined(COMPAT_43) || !defined(_KERNEL)
19	NOARGS		{ long|compat_43_sys||lseek(int fd, long offset, \
			    int whence); } olseek
#else
19	EXCL		compat_43_sys_lseek
#endif
20	NOARGS 		{ pid_t|sys||getpid(void); }
21	NOARGS		{ int|compat_40_sys||mount(const char *type, \
			    const char *path, int flags, void *data); }
22	NOARGS		{ int|sys||unmount(const char *path, int flags); }
23	NOARGS		{ int|sys||setuid(uid_t uid); }
24	NOARGS		{ uid_t|sys||getuid(void); }
25	NOARGS		{ uid_t|sys||geteuid(void); }
26	NOARGS		{ int|sys||ptrace(int req, pid_t pid, void *addr, \
			    int data); }
27	NOARGS		{ ssize_t|sys||recvmsg(int s, struct msghdr *msg, \
			    int flags); }
28	NOARGS		{ ssize_t|sys||sendmsg(int s, \
			    const struct msghdr *msg, int flags); }
29	NOARGS		{ ssize_t|sys||recvfrom(int s, void *buf, size_t len, \
			    int flags, struct sockaddr *from, \
			    unsigned int *fromlenaddr); }
30	NOARGS		{ int|sys||accept(int s, struct sockaddr *name, \
			    unsigned int *anamelen); }
31	NOARGS		{ int|sys||getpeername(int fdes, struct sockaddr *asa, \
			    unsigned int *alen); }
32	NOARGS		{ int|sys||getsockname(int fdes, struct sockaddr *asa, \
			    unsigned int *alen); }
33	NOARGS		{ int|sys||access(const char *path, int flags); }
34	NOARGS		{ int|sys||chflags(const char *path, u_long flags); }
35	NOARGS		{ int|sys||fchflags(int fd, u_long flags); }
36	NOARGS		{ void|sys||sync(void); }
37	NOARGS		{ int|sys||kill(int pid, int signum); }
#if defined(COMPAT_43) || !defined(_KERNEL)
38	STD		{ int|aoutm68k_compat_43_sys||stat(const char *path, \
			    struct aoutm68k_stat43 *ub); } stat43
#else
38	EXCL		aoutm68k_compat_43_sys_stat
#endif
39	NOARGS		{ pid_t|sys||getppid(void); }
#if defined(COMPAT_43) || !defined(_KERNEL)
40	STD		{ int|aoutm68k_compat_43_sys||lstat(const char *path, \
			    struct aoutm68k_stat43 *ub); } lstat43
#else
40	EXCL		aoutm68k_compat_43_sys_lstat
#endif
41	NOARGS		{ int|sys||dup(int fd); }
42	NOARGS		{ int|sys||pipe(void); }
43	NOARGS		{ gid_t|sys||getegid(void); }
44	NOARGS		{ int|sys||profil(void *samples, size_t size, \
			    u_long offset, u_int scale); }
#if defined(KTRACE) || !defined(_KERNEL)
45	NOARGS		{ int|sys||ktrace(const char *fname, int ops, \
			    int facs, int pid); }
#else
45	EXCL		ktrace
#endif
#if defined(COMPAT_13) || !defined(_KERNEL)
46	NOARGS		{ int|compat_13_sys||sigaction(int signum, \
			    const struct sigaction13 *nsa, \
			    struct sigaction13 *osa); } sigaction13
#else
46	EXCL		compat_13_sys_sigaction
#endif
47	NOARGS		{ gid_t|sys||getgid(void); }
#if defined(COMPAT_13) || !defined(_KERNEL)
48	NOARGS		{ int|compat_13_sys||sigprocmask(int how, \
			    int mask); } sigprocmask13
#else
48	EXCL		compat_13_sys_sigprocmask
#endif
49	NOARGS		{ int|sys||__getlogin(char *namebuf, size_t namelen); }
50	NOARGS		{ int|sys||__setlogin(const char *namebuf); }
51	NOARGS		{ int|sys||acct(const char *path); }
#if defined(COMPAT_13) || !defined(_KERNEL)
52	NOARGS		{ int|compat_13_sys||sigpending(void); } sigpending13
53	NOARGS		{ int|compat_13_sys||sigaltstack( \
			    const struct sigaltstack13 *nss, \
			    struct sigaltstack13 *oss); } sigaltstack13
#else
52	EXCL		compat_13_sys_sigpending
53	EXCL		compat_13_sys_sigaltstack
#endif
54	NOARGS		{ int|sys||ioctl(int fd, u_long com, ... void *data); }
#if defined(COMPAT_12) || !defined(_KERNEL)
55	NOARGS		{ int|compat_12_sys||reboot(int opt); } oreboot
#else
55	EXCL		compat_12_sys_reboot
#endif
56	NOARGS		{ int|sys||revoke(const char *path); }
57	NOARGS		{ int|sys||symlink(const char *path, \
			    const char *link); }
58	NOARGS		{ int|sys||readlink(const char *path, \
			    char *buf, size_t count); }
59	NOARGS		{ int|sys||execve(const char *path, \
			    char * const *argp, char * const *envp); }
60	NOARGS		{ mode_t|sys||umask(mode_t newmask); }
61	NOARGS		{ int|sys||chroot(const char *path); }
#if defined(COMPAT_43) || !defined(_KERNEL)
62	STD		{ int|aoutm68k_compat_43_sys||fstat(int fd, \
			    struct aoutm68k_stat43 *sb); } fstat43
63	NOARGS		{ int|compat_43_sys||getkerninfo(int op, char *where, \
			    int *size, int arg); } ogetkerninfo
64	NOARGS		{ int|compat_43_sys||getpagesize(void); } ogetpagesize
#else
62	EXCL		aoutm68k_compat_43_sys_fstat
63	EXCL		compat_43_sys_getkerninfo
64	EXCL		compat_43_sys_getpagesize
#endif
#if defined(COMPAT_12) || !defined(_KERNEL)
65	NOARGS		{ int|compat_12_sys||msync(void *addr, size_t len); }
#else
65	EXCL		compat_12_sys_msync
#endif
; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
66	NOARGS		{ int|sys||vfork(void); }
67	OBSOL		vread
68	OBSOL		vwrite
69	OBSOL		sbrk
70	OBSOL		sstk
#if defined(COMPAT_43) || !defined(_KERNEL)
71	NOARGS		{ int|compat_43_sys||mmap(void *addr, size_t len, \
			    int prot, int flags, int fd, long pos); } ommap
#else
71	EXCL		compat_43_sys_mmap
#endif
72	NOARGS		{ int|sys||ovadvise(int anom); } vadvise
73	NOARGS		{ int|sys||munmap(void *addr, size_t len); }
74	NOARGS		{ int|sys||mprotect(void *addr, size_t len, \
			    int prot); }
75	NOARGS		{ int|sys||madvise(void *addr, size_t len, \
			    int behav); }
76	OBSOL		vhangup
77	OBSOL		vlimit
78	NOARGS		{ int|sys||mincore(void *addr, size_t len, \
			    char *vec); }
79	NOARGS		{ int|sys||getgroups(int gidsetsize, \
			    gid_t *gidset); }
80	NOARGS		{ int|sys||setgroups(int gidsetsize, \
			    const gid_t *gidset); }
81	NOARGS		{ int|sys||getpgrp(void); }
82	NOARGS		{ int|sys||setpgid(int pid, int pgid); }
83	NOARGS		{ int|compat_50_sys||setitimer(int which, \
			    const struct itimerval50 *itv, \
			    struct itimerval50 *oitv); }
#if defined(COMPAT_43) || !defined(_KERNEL)
84	NOARGS		{ int|compat_43_sys||wait(void); } owait
#else
84	EXCL		compat_43_sys_wait
#endif
#if defined(COMPAT_12) || !defined(_KERNEL)
85	NOARGS		{ int|compat_12_sys||swapon(const char *name); } oswapon
#else
85	EXCL		compat_12_sys_swapon
#endif
86	NOARGS		{ int|compat_50_sys||getitimer(int which, \
			    struct itimerval50 *itv); }
#if defined(COMPAT_43) || !defined(_KERNEL)
87	NOARGS		{ int|compat_43_sys||gethostname(char *hostname, \
			    u_int len); } ogethostname
88	NOARGS		{ int|compat_43_sys||sethostname(char *hostname, \
			    u_int len); } osethostname
89	NOARGS		{ int|compat_43_sys||getdtablesize(void); } \
			    ogetdtablesize
#else
87	EXCL		compat_43_sys_gethostname
88	EXCL		compat_43_sys_sethostname
89	EXCL		compat_43_sys_getdtablesize
#endif
90	NOARGS		{ int|sys||dup2(int from, int to); }
91	UNIMPL		getdopt
92	NOARGS		{ int|sys||fcntl(int fd, int cmd, ... void *arg); }
93	NOARGS		{ int|compat_50_sys||select(int nd, fd_set *in, \
			    fd_set *ou, fd_set *ex, struct timeval50 *tv); }
94	UNIMPL		setdopt
95	NOARGS		{ int|sys||fsync(int fd); }
96	NOARGS		{ int|sys||setpriority(int which, int who, int prio); }
#if defined(COMPAT_30) || !defined(_KERNEL)
97	NOARGS		{ int|compat_30_sys||socket(int domain, int type, int protocol); }
#else
97	EXCL		compat_30_sys_socket
#endif
98	NOARGS		{ int|sys||connect(int s, const struct sockaddr *name, \
			    int namelen); }
#if defined(COMPAT_43) || !defined(_KERNEL)
99	NOARGS		{ int|compat_43_sys||accept(int s, void *name, \
			    int *anamelen); } oaccept
#else
99	EXCL		compat_43_sys_accept
#endif
100	NOARGS		{ int|sys||getpriority(int which, int who); }
#if defined(COMPAT_43) || !defined(_KERNEL)
101	NOARGS		{ int|compat_43_sys||send(int s, void *buf, int len, \
			    int flags); } osend
102	NOARGS		{ int|compat_43_sys||recv(int s, void *buf, int len, \
			    int flags); } orecv
#else
101	EXCL		compat_43_sys_send
102	EXCL		compat_43_sys_recv
#endif
#if defined(COMPAT_13) || !defined(_KERNEL)
103	NOARGS		{ int|compat_13_sys||sigreturn( \
			    struct sigcontext13 *sigcntxp); } sigreturn13
#else
103	EXCL		compat_13_sys_sigreturn
#endif
104	NOARGS		{ int|sys||bind(int s, const struct sockaddr *name, \
			    int namelen); }
105	NOARGS		{ int|sys||setsockopt(int s, int level, int name, \
			    const void *val, int valsize); }
106	NOARGS		{ int|sys||listen(int s, int backlog); }
107	OBSOL		vtimes
#if defined(COMPAT_43) || !defined(_KERNEL)
108	NOARGS		{ int|compat_43_sys||sigvec(int signum, \
			    struct sigvec *nsv, struct sigvec *osv); } osigvec
109	NOARGS		{ int|compat_43_sys||sigblock(int mask); } osigblock
110	NOARGS		{ int|compat_43_sys||sigsetmask(int mask); } osigsetmask
#else
108	EXCL		compat_43_sys_sigvec
109	EXCL		compat_43_sys_sigblock
110	EXCL		compat_43_sys_sigsetmask
#endif
#if defined(COMPAT_13) || !defined(_KERNEL)
111	NOARGS		{ int|compat_13_sys||sigsuspend(int mask); } sigsuspend13
#else
111	EXCL		compat_13_sys_sigsuspend
#endif
#if defined(COMPAT_43) || !defined(_KERNEL)
112	NOARGS		{ int|compat_43_sys||sigstack(struct sigstack *nss, \
			    struct sigstack *oss); } osigstack
113	NOARGS		{ int|compat_43_sys||recvmsg(int s, \
			    struct omsghdr *msg, int flags); } orecvmsg
114	NOARGS		{ int|compat_43_sys||sendmsg(int s, void *msg, \
			    int flags); } osendmsg
#else
112	EXCL		compat_43_sys_sigstack
113	EXCL		compat_43_sys_recvmesg
114	EXCL		compat_43_sys_sendmesg
#endif
115	OBSOL		vtrace
116	NOARGS		{ int|compat_50_sys||gettimeofday(struct timeval50 *tp, \
			    struct timezone *tzp); }
117	NOARGS		{ int|compat_50_sys||getrusage(int who, \
			    struct rusage50 *rusage); }
118	NOARGS		{ int|sys||getsockopt(int s, int level, int name, \
			    void *val, int *avalsize); }
119	OBSOL		resuba
120	NOARGS		{ ssize_t|sys||readv(int fd, \
			    const struct iovec *iovp, int iovcnt); }
121	NOARGS		{ ssize_t|sys||writev(int fd, \
			    const struct iovec *iovp, int iovcnt); }
122	NOARGS		{ int|compat_50_sys||settimeofday( \
			    const struct timeval50 *tv, \
			    const struct timezone *tzp); }
123	NOARGS		{ int|sys||fchown(int fd, uid_t uid, gid_t gid); }
124	NOARGS		{ int|sys||fchmod(int fd, mode_t mode); }
#if defined(COMPAT_43) || !defined(_KERNEL)
125	NOARGS		{ int|compat_43_sys||recvfrom(int s, void *buf, \
			    size_t len, int flags, void *from, \
			    int *fromlenaddr); } orecvfrom
#else
125	EXCL		compat_43_sys_recvfrom
#endif
126	NOARGS		{ int|sys||setreuid(uid_t ruid, uid_t euid); }
127	NOARGS		{ int|sys||setregid(gid_t rgid, gid_t egid); }
128	NOARGS		{ int|sys||rename(const char *from, const char *to); }
#if defined(COMPAT_43) || !defined(_KERNEL)
129	NOARGS		{ int|compat_43_sys||truncate(const char *path, \
			    long length); } otruncate
130	NOARGS		{ int|compat_43_sys||ftruncate(int fd, long length); } \
			    oftruncate
#else
129	EXCL		compat_43_sys_truncate
130	EXCL		compat_43_sys_ftruncate
#endif
131	NOARGS		{ int|sys||flock(int fd, int how); }
132	NOARGS		{ int|sys||mkfifo(const char *path, mode_t mode); }
133	NOARGS		{ ssize_t|sys||sendto(int s, const void *buf, \
			    size_t len, int flags, const struct sockaddr *to, \
			    int tolen); }
134	NOARGS		{ int|sys||shutdown(int s, int how); }
135	NOARGS		{ int|sys||socketpair(int domain, int type, \
			    int protocol, int *rsv); }
136	NOARGS		{ int|sys||mkdir(const char *path, mode_t mode); }
137	NOARGS		{ int|sys||rmdir(const char *path); }
138	NOARGS		{ int|compat_50_sys||utimes(const char *path, \
			    const struct timeval50 *tptr); }
139	OBSOL		4.2 sigreturn
140	NOARGS		{ int|compat_50_sys||adjtime( \
			    const struct timeval50 *delta, \
			    struct timeval50 *olddelta); }
#if defined(COMPAT_43) || !defined(_KERNEL)
141	NOARGS		{ int|compat_43_sys||getpeername(int fdes, void *asa, \
			    int *alen); } ogetpeername
142	NOARGS		{ int32_t|compat_43_sys||gethostid(void); } ogethostid
143	NOARGS		{ int|compat_43_sys||sethostid(int32_t hostid); } \
			    osethostid
144	NOARGS		{ int|compat_43_sys||getrlimit(int which, \
			    struct orlimit *rlp); } ogetrlimit
145	NOARGS		{ int|compat_43_sys||setrlimit(int which, \
			    const struct orlimit *rlp); } osetrlimit
146	NOARGS		{ int|compat_43_sys||killpg(int pgid, int signum); } \
			    okillpg
#else
141	EXCL		compat_43_sys_getpeername
142	EXCL		compat_43_sys_gethostid
143	EXCL		compat_43_sys_sethostid
144	EXCL		compat_43_sys_getrlimit
145	EXCL		compat_43_sys_setrlimit
146	EXCL		compat_43_sys_killpg
#endif
147	NOARGS		{ int|sys||setsid(void); }
#if defined(QUOTA) || !defined(_KERNEL_OPT)
148	NOARGS		{ int|compat_50_sys||quotactl(const char *path, \
			    int cmd, int uid, void *arg); }
#else
148	EXCL		compat_50_sys_quotactl
#endif
#if (defined(QUOTA) && defined(COMPAT_43)) || !defined(_KERNEL_OPT)
149	NOARGS		{ int|compat_43_sys||quota(void); } oquota
#else
149	EXCL		compat_43_sys_quota
#endif
#if defined(COMPAT_43) || !defined(_KERNEL_OPT)
150	NOARGS		{ int|compat_43_sys||getsockname(int fdec, void *asa, \
			    int *alen); } ogetsockname
#else
150	EXCL		compat_43_sys_getsockname
#endif

; 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
155	EXCL		nfssvc
#if defined(COMPAT_43) || !defined(_KERNEL)
156	NOARGS		{ int|compat_43_sys||getdirentries(int fd, char *buf, \
			    u_int count, long *basep); } ogetdirentries
#else
156	EXCL		compat_43_sys_getdirentries
#endif
#if defined(COMPAT_20) || !defined(_KERNEL)
157	NOARGS		{ int|compat_20_sys||statfs(const char *path, \
			    struct statfs12 *buf); }
#else
157	EXCL		compat_20_sys_statfs
#endif
#if defined(COMPAT_20) || !defined(_KERNEL)
158	NOARGS		{ int|compat_20_sys||fstatfs(int fd, \
			    struct statfs12 *buf); }
#else
158	EXCL		compat_20_sys_statfs
#endif
159	UNIMPL
160	UNIMPL
#if defined(COMPAT_30) || !defined(_KERNEL)
161	NOARGS		{ int|compat_30_sys||getfh(const char *fname, \
			    struct compat_30_fhandle *fhp); }
#else
161	EXCL		compat_30_sys_getfh
#endif
#if defined(COMPAT_09) || !defined(_KERNEL)
162	NOARGS		{ int|compat_09_sys||getdomainname(char *domainname, \
			    int len); } ogetdomainname
163	NOARGS		{ int|compat_09_sys||setdomainname(char *domainname, \
			    int len); } osetdomainname
164	NOARGS		{ int|compat_09_sys||uname(struct outsname *name); } \
			    ouname
#else
162	EXCL		compat_09_sys_getdomainname
163	EXCL		compat_09_sys_setdomainname
164	EXCL		compat_09_sys_uname
#endif
165	NOARGS		{ 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) && defined(COMPAT_10)
169	NOARGS		{ int|compat_10_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) && defined(COMPAT_10)
170	NOARGS		{ int|compat_10_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) && defined(COMPAT_10)
171	NOARGS		{ int|compat_10_sys||shmsys(int which, int a2, int a3, \
			    int a4); } oshmsys
#else
171	EXCL		1.0 shmsys
#endif
172	UNIMPL
173	NOARGS		{ ssize_t|sys||pread(int fd, void *buf, \
			    size_t nbyte, int pad, off_t offset); }
174	NOARGS		{ ssize_t|sys||pwrite(int fd, const void *buf, \
			    size_t nbyte, int pad, off_t offset); }
175	UNIMPL		sys_ntp_gettime
#if defined(NTP) || !defined(_KERNEL)
176	NOARGS		{ 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	NOARGS		{ int|sys||setgid(gid_t gid); }
182	NOARGS		{ int|sys||setegid(gid_t egid); }
183	NOARGS		{ int|sys||seteuid(uid_t euid); }
184	EXCL		lfs_bmapv
185	EXCL		lfs_markv
186	EXCL		lfs_segclean
187	EXCL		lfs_segwait
#if defined(COMPAT_12) || !defined(_KERNEL)
188	STD	{ int|aoutm68k_compat_12_sys||stat(const char *path, \
			    struct aoutm68k_stat12 *ub); } stat12
189	STD		{ int|aoutm68k_compat_12_sys||fstat(int fd, \
			    struct aoutm68k_stat12 *sb); } fstat12
190	STD		{ int|aoutm68k_compat_12_sys||lstat(const char *path, \
			    struct aoutm68k_stat12 *ub); } lstat12
#else
188	EXCL		aoutm68k_compat_12_sys_stat
189	EXCL		aoutm68k_compat_12_sys_fstat
190	EXCL		aoutm68k_compat_12_sys_lstat
#endif
191	NOARGS		{ long|sys||pathconf(const char *path, int name); }
192	NOARGS		{ long|sys||fpathconf(int fd, int name); }
193	UNIMPL
194	NOARGS		{ int|sys||getrlimit(int which, \
			    struct rlimit *rlp); }
195	NOARGS		{ int|sys||setrlimit(int which, \
			    const struct rlimit *rlp); }
#if defined(COMPAT_12) || !defined(_KERNEL)
196	NOARGS		{ int|compat_12_sys||getdirentries(int fd, char *buf, \
			    u_int count, long *basep); }
#else
196	EXCL		compat_12_sys_getdirentries
#endif
197	NOARGS		{ void *|sys||mmap(void *addr, size_t len, int prot, \
			    int flags, int fd, long pad, off_t pos); }
198	NOARGS INDIR	{ quad_t|sys||__syscall(quad_t code, \
			    ... register32_t args[AOUTM68K_SYS_MAXSYSARGS]); }
199	NOARGS		{ off_t|sys||lseek(int fd, int pad, off_t offset, \
			    int whence); }
200	NOARGS		{ int|sys||truncate(const char *path, int pad, \
			    off_t length); }
201	NOARGS		{ int|sys||ftruncate(int fd, int pad, off_t length); }
202	NOARGS		{ int|sys||__sysctl(int *name, u_int namelen, \
			    void *old, size_t *oldlenp, void *new, \
			    size_t newlen); }
203	NOARGS		{ int|sys||mlock(const void *addr, size_t len); }
204	NOARGS		{ int|sys||munlock(const void *addr, size_t len); }
205	NOARGS		{ int|sys||undelete(const char *path); }
206	NOARGS		{ int|compat_50_sys||futimes(int fd, \
			    const struct timeval50 *tptr); }
207	NOARGS		{ pid_t|sys||getpgid(pid_t pid); }
208	NOARGS		{ int|sys||reboot(int opt, char *bootstr); }
209	NOARGS		{ int|sys||poll(struct pollfd *fds, u_int nfds, \
			    int timeout); }
210	UNIMPL
211	UNIMPL
212	UNIMPL
213	UNIMPL
214	UNIMPL
215	UNIMPL
216	UNIMPL
217	UNIMPL
218	UNIMPL
219	UNIMPL
; System calls 220-300 are reserved for use by NetBSD
#if defined(SYSVSEM) || !defined(_KERNEL)
#if defined(COMPAT_14) || !defined(_KERNEL)
220	NOARGS		{ int|compat_14_sys||__semctl(int semid, \
			    int semnum, int cmd, union __semun *arg); }
#else
220	EXCL		compat_14_semctl
#endif
221	NOARGS		{ int|sys||semget(key_t key, int nsems, int semflg); }
222	NOARGS		{ int|sys||semop(int semid, struct sembuf *sops, \
			    size_t nsops); }
223	NOARGS		{ 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)
#if defined(COMPAT_14) || !defined(_KERNEL)
224	NOARGS		{ int|compat_14_sys||msgctl(int msqid, int cmd, \
			    struct msqid_ds14 *buf); }
#else
224	EXCL		compat_14_sys_msgctl
#endif
225	NOARGS		{ int|sys||msgget(key_t key, int msgflg); }
226	NOARGS		{ int|sys||msgsnd(int msqid, const void *msgp, \
			    size_t msgsz, int msgflg); }
227	NOARGS		{ 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	NOARGS		{ void *|sys||shmat(int shmid, const void *shmaddr, \
			    int shmflg); }
#if defined(COMPAT_14) || !defined(_KERNEL)
229	NOARGS		{ int|compat_14_sys||shmctl(int shmid, int cmd, \
			    struct shmid_ds14 *buf); }
#else
229	EXCL		compat_14_sys_shmctl
#endif
230	NOARGS		{ int|sys||shmdt(const void *shmaddr); }
231	NOARGS		{ 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	NOARGS		{ int|compat_50_sys||clock_gettime(clockid_t clock_id, \
			    struct timespec50 *tp); }
233	NOARGS		{ int|compat_50_sys||clock_settime(clockid_t clock_id, \
			    const struct timespec50 *tp); }
234	NOARGS		{ int|compat_50_sys||clock_getres(clockid_t clock_id, \
			    struct timespec50 *tp); }
235	UNIMPL		timer_create
236	UNIMPL		timer_delete
237	UNIMPL		timer_settime
238	UNIMPL		timer_gettime
239	UNIMPL		timer_getoverrun
;
; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
;
240	NOARGS		{ int|compat_50_sys||nanosleep( \
			    const struct timespec50 *rqtp, \
			    struct timespec50 *rmtp); }
241	NOARGS		{ int|sys||fdatasync(int fd); }
242	NOARGS		{ int|sys||mlockall(int flags); }
243	NOARGS		{ int|sys||munlockall(void); }
244	UNIMPL
245	UNIMPL
246	UNIMPL
247	UNIMPL
248	UNIMPL
249	UNIMPL
250	UNIMPL
251	UNIMPL
252	UNIMPL
253	UNIMPL
254	UNIMPL
255	UNIMPL
256	UNIMPL
257	UNIMPL
258	UNIMPL
259	UNIMPL
260	UNIMPL
261	UNIMPL
262	UNIMPL
263	UNIMPL
264	UNIMPL
265	UNIMPL
266	UNIMPL
267	UNIMPL
268	UNIMPL
269	UNIMPL
270	NOARGS		{ int|sys||__posix_rename(const char *from, \
			    const char *to); }
271	NOARGS		{ int|sys||swapctl(int cmd, const void *arg, int misc); }
#if defined(COMPAT_30) || !defined(_KERNEL)
272	NOARGS		{ int|compat_30_sys||getdents(int fd, char *buf, size_t count); }
#else
272	EXCL		compat_30_sys_getdents
#endif
273	NOARGS		{ int|sys||minherit(void *addr, size_t len, \
			    int inherit); }
274	NOARGS		{ int|sys||lchmod(const char *path, mode_t mode); }
275	NOARGS		{ int|sys||lchown(const char *path, uid_t uid, \
			    gid_t gid); }
276	NOARGS		{ int|compat_50_sys||lutimes(const char *path, \
			    const struct timeval50 *tptr); }
277	NOARGS		{ int|sys|13|msync(void *addr, size_t len, int flags); }
278	STD		{ int|aoutm68k_sys|13|stat(const char *path, \
			    struct aoutm68k_stat *ub); }
279	STD		{ int|aoutm68k_sys|13|fstat(int fd, \
			    struct aoutm68k_stat *sb); }
280	STD		{ int|aoutm68k_sys|13|lstat(const char *path, \
			    struct aoutm68k_stat *ub); }
281	NOARGS		{ int|sys|14|sigaltstack( \
			    const struct sigaltstack *nss, \
			    struct sigaltstack *oss); }
282	NOARGS		{ int|sys|14|vfork(void); }
283	NOARGS		{ int|sys||__posix_chown(const char *path, uid_t uid, \
			    gid_t gid); }
284	NOARGS		{ int|sys||__posix_fchown(int fd, uid_t uid, \
			    gid_t gid); }
285	NOARGS		{ int|sys||__posix_lchown(const char *path, uid_t uid, \
			    gid_t gid); }
286	NOARGS		{ pid_t|sys||getsid(pid_t pid); }
287	UNIMPL
#if defined(KTRACE) || !defined(_KERNEL)
288	NOARGS		{ int|sys||fktrace(const int fd, int ops, \
			    int facs, int pid); }
#else
288	EXCL		ktrace
#endif
289	NOARGS		{ ssize_t|sys||preadv(int fd, \
			    const struct iovec *iovp, int iovcnt, \
			    int pad, off_t offset); }
290	NOARGS		{ ssize_t|sys||pwritev(int fd, \
			    const struct iovec *iovp, int iovcnt, \
			    int pad, off_t offset); }
#if defined(COMPAT_16) || !defined(_KERNEL)
291	NOARGS		{ int|compat_16_sys|14|sigaction(int signum, \
			    const struct sigaction *nsa, \
			    struct sigaction *osa); }
#else
291	EXCL		compat_16_sys___sigaction14
#endif
292	NOARGS		{ int|sys|14|sigpending(sigset_t *set); }
293	NOARGS		{ int|sys|14|sigprocmask(int how, \
			    const sigset_t *set, \
			    sigset_t *oset); }
294	NOARGS		{ int|sys|14|sigsuspend(const sigset_t *set); }
#if defined(COMPAT_16) || !defined(_KERNEL)
295	NOARGS		{ int|compat_16_sys|14|sigreturn(\
			    struct sigcontext *sigcntxp); }
#else
295	EXCL		compat_16_sys___sigreturn14
#endif
296	NOARGS		{ int|sys||__getcwd(char *bufp, size_t length); }
297	NOARGS		{ int|sys||fchroot(int fd); }
#if defined(COMPAT_30) || ! defined(_KERNEL)
298	NOARGS		{ int|compat_30_sys||fhopen(const \
			    struct compat_30_fhandle *fhp, int flags); }
#else
298	EXCL		compat_30_sys_fhopen
#endif
299	STD		{ int|aoutm68k_sys||fhstat(const struct \
			    compat_30_fhandle *fhp, \
			    struct aoutm68k_stat *sb); }
#if defined(COMPAT_20) || !defined(_KERNEL)
300	NOARGS		{ int|compat_20_sys||fhstatfs(const struct \
			    compat_30-fhandle *fhp, \
			    struct statfs12 *buf); }
#else
300	EXCL		compat_20_sys_fhstatfs
#endif
#if defined(SYSVSEM) || !defined(_KERNEL)
301	NOARGS		{ int|compat_50_sys|13|__semctl(int semid, \
			    int semnum, int cmd, ... union __semun *arg); }
#else
301	EXCL		____semctl13
#endif
#if defined(SYSVMSG) || !defined(_KERNEL)
302	NOARGS		{ int|compat_50_sys|13|msgctl(int msqid, int cmd, \
			    struct msqid_ds *buf); }
#else
302	EXCL		__msgctl13
#endif
#if defined(SYSVSHM) || !defined(_KERNEL)
303	NOARGS		{ int|compat_50_sys|13|shmctl(int shmid, int cmd, \
			    struct shmid_ds *buf); }
#else
303	EXCL		__shmctl13
#endif
304	NOARGS		{ int|sys||lchflags(const char *path, u_long flags); }
305	NOARGS		{ int|sys||issetugid(void); }
306	NOARGS		{ int|sys||getcontext(struct __ucontext *ucp); }
307	NOARGS		{ int|sys||setcontext(const struct __ucontext *ucp); }