1 /*
2  * 	unix6sys.h	4.2	83/07/31
3  */
4 #define	NSYSTRAPS	64
5 #define	NSIGS	13
6 #define	ILLSYS	-1
7 #define	NORMRET	0
8 #define	LONGRET	1
9 #define	TWORET	2
10 #define	FORK	2
11 #define	OPEN	5
12 #define	WAIT	7
13 #define	CREAT	8
14 #define	LINK	9
15 #define	UNLNK	10
16 #define EXEC	11
17 #define	CHDIR	12
18 #define	TIME	13
19 #define	MKNOD	14
20 #define	BRK	17
21 #define	STAT	18
22 #define	SEEK	19
23 #define	SETUID	23
24 #define	GETUID	24
25 #define	STIME	25
26 #define	FSTAT	28
27 #define	STTY	31
28 #define	GTTY	32
29 #define	NICE	34
30 #define	SLEEP	35
31 #define	TELL	40
32 #define	PIPE	42
33 #define	TIMES	43
34 #define	SETGID	46
35 #define	GETGID	47
36 #define	SIG	48
37 #define	PWBSYS	57
38 #define	UNAME	0
39 #define	UDATA	1
40 #define	USTAT	2
41 #define	UTIME	3
42 /*
43  *	The numerical entries in the following table are
44  *	really composed of 2 parts.
45  *	The first entry in each row indicates the number
46  *	of register arguments for the system call, while
47  *	the 2nd position is the number of memory arguments
48  *	the 3rd position is LONGRET if the return is a long (ala time)
49  *	or is TWORET if the return is 2 ints (ala pipe)
50  *	otherwise it is NORMRET.
51  */
52 int	sysargs[][3] =
53 {
54 	0, 0, NORMRET,		/*  0 = indir */
55 	1, 0, NORMRET,		/*  1 = exit */
56 	0, 0, NORMRET,		/*  2 = fork */
57 	1, 2, NORMRET,		/*  3 = read */
58 	1, 2, NORMRET,		/*  4 = write */
59 	0, 2, NORMRET,		/*  5 = open */
60 	1, 0, NORMRET,		/*  6 = close */
61 	0, 0, TWORET,		/*  7 = wait */
62 	0, 2, NORMRET,		/*  8 = creat */
63 	0, 2, NORMRET,		/*  9 = link */
64 	0, 1, NORMRET,		/* 10 = unlink */
65 	0, 2, NORMRET,		/* 11 = exec */
66 	0, 1, NORMRET,		/* 12 = chdir */
67 	0, 0, LONGRET,		/* 13 = time */
68 	0, 3, NORMRET,		/* 14 = mknod */
69 	0, 2, NORMRET,		/* 15 = chmod */
70 	0, 2, NORMRET,		/* 16 = chown */
71 	0, 1, NORMRET,		/* 17 = break */
72 	0, 2, NORMRET,		/* 18 = stat */
73 	1, 2, NORMRET,		/* 19 = seek */
74 	0, 0, NORMRET,		/* 20 = getpid */
75 	0, 3, NORMRET,		/* 21 = mount */
76 	0, 1, NORMRET,		/* 22 = umount */
77 	1, 0, NORMRET,		/* 23 = setuid */
78 	0, 0, NORMRET,		/* 24 = getuid */
79 	2, 0, NORMRET,		/* 25 = stime */
80 	1, 3, NORMRET,		/* 26 = ptrace */
81 	1, 0, NORMRET,		/* 27 = alarm */
82 	1, 1, NORMRET,		/* 28 = fstat */
83 	0, 0, NORMRET,		/* 29 = pause */
84 	1, 1, NORMRET,		/* 30 = smdate */
85 	1, 1, NORMRET,		/* 31 = stty */
86 	1, 1, NORMRET,		/* 32 = gtty */
87 	0, 2, NORMRET,		/* 33 = access */
88 	1, 0, NORMRET,		/* 34 = nice */
89 	1, 0, NORMRET,		/* 35 = sleep */
90 	0, 0, NORMRET,		/* 36 = sync */
91 	1, 1, NORMRET,		/* 37 = kill */
92 	0, 0, NORMRET,		/* 38 = switch */
93 	ILLSYS, 0, NORMRET,	/* 39 = x */
94 	1, 0, LONGRET,		/* 40 = tell */
95 	1, 0, NORMRET,		/* 41 = dup */
96 	0, 0, TWORET,		/* 42 = pipe */
97 	0, 1, NORMRET,		/* 43 = times */
98 	0, 4, NORMRET,		/* 44 = prof */
99 	ILLSYS, 0, NORMRET,	/* 45 = tiu */
100 	1, 0, NORMRET,		/* 46 = setgid */
101 	0, 0, NORMRET,		/* 47 = getgid */
102 	0, 2, NORMRET,		/* 48 = sig */
103 	ILLSYS, 0, NORMRET,	/* 49 = x */
104 	ILLSYS, 0, NORMRET,	/* 50 = x */
105 	ILLSYS, 0, NORMRET,	/* 51 = x */
106 	ILLSYS, 0, NORMRET,	/* 52 = x */
107 	ILLSYS, 0, NORMRET,	/* 53 = x */
108 	ILLSYS, 0, NORMRET,	/* 54 = x */
109 	ILLSYS, 0, NORMRET,	/* 55 = x */
110 	ILLSYS, 0, NORMRET,	/* 56 = x */
111 	2, 1, NORMRET,		/* 57 = pwbsys */
112 	ILLSYS, 0, NORMRET,	/* 58 = x */
113 	ILLSYS, 0, NORMRET,	/* 59 = x */
114 	ILLSYS, 0, NORMRET,	/* 60 = x */
115 	ILLSYS, 0, NORMRET,	/* 61 = x */
116 	0, 1, NORMRET,		/* 62 = idisys */
117 	ILLSYS, 0, NORMRET	/* 63 = x */
118 };
119