1 | /* This file contains the table used to map system call numbers onto the
|
---|
2 | * routines that perform them.
|
---|
3 | */
|
---|
4 |
|
---|
5 | #define _TABLE
|
---|
6 |
|
---|
7 | #include "pm.h"
|
---|
8 | #include <minix/callnr.h>
|
---|
9 | #include <signal.h>
|
---|
10 | #include "mproc.h"
|
---|
11 | #include "param.h"
|
---|
12 |
|
---|
13 | /* Miscellaneous */
|
---|
14 | char core_name[] = "core"; /* file name where core images are produced */
|
---|
15 |
|
---|
16 | _PROTOTYPE (int (*call_vec[NCALLS]), (void) ) = {
|
---|
17 | no_sys, /* 0 = unused */
|
---|
18 | do_pm_exit, /* 1 = exit */
|
---|
19 | do_fork, /* 2 = fork */
|
---|
20 | no_sys, /* 3 = read */
|
---|
21 | no_sys, /* 4 = write */
|
---|
22 | no_sys, /* 5 = open */
|
---|
23 | no_sys, /* 6 = close */
|
---|
24 | do_waitpid, /* 7 = wait */
|
---|
25 | no_sys, /* 8 = creat */
|
---|
26 | no_sys, /* 9 = link */
|
---|
27 | no_sys, /* 10 = unlink */
|
---|
28 | do_waitpid, /* 11 = waitpid */
|
---|
29 | no_sys, /* 12 = chdir */
|
---|
30 | do_time, /* 13 = time */
|
---|
31 | no_sys, /* 14 = mknod */
|
---|
32 | no_sys, /* 15 = chmod */
|
---|
33 | no_sys, /* 16 = chown */
|
---|
34 | do_brk, /* 17 = break */
|
---|
35 | no_sys, /* 18 = stat */
|
---|
36 | no_sys, /* 19 = lseek */
|
---|
37 | do_getset, /* 20 = getpid */
|
---|
38 | no_sys, /* 21 = mount */
|
---|
39 | no_sys, /* 22 = umount */
|
---|
40 | do_getset, /* 23 = setuid */
|
---|
41 | do_getset, /* 24 = getuid */
|
---|
42 | do_stime, /* 25 = stime */
|
---|
43 | do_trace, /* 26 = ptrace */
|
---|
44 | do_alarm, /* 27 = alarm */
|
---|
45 | no_sys, /* 28 = fstat */
|
---|
46 | do_pause, /* 29 = pause */
|
---|
47 | no_sys, /* 30 = utime */
|
---|
48 | no_sys, /* 31 = (stty) */
|
---|
49 | no_sys, /* 32 = (gtty) */
|
---|
50 | no_sys, /* 33 = access */
|
---|
51 | no_sys, /* 34 = (nice) */
|
---|
52 | no_sys, /* 35 = (ftime) */
|
---|
53 | no_sys, /* 36 = sync */
|
---|
54 | do_kill, /* 37 = kill */
|
---|
55 | no_sys, /* 38 = rename */
|
---|
56 | no_sys, /* 39 = mkdir */
|
---|
57 | no_sys, /* 40 = rmdir */
|
---|
58 | no_sys, /* 41 = dup */
|
---|
59 | no_sys, /* 42 = pipe */
|
---|
60 | do_times, /* 43 = times */
|
---|
61 | no_sys, /* 44 = (prof) */
|
---|
62 | no_sys, /* 45 = unused */
|
---|
63 | do_getset, /* 46 = setgid */
|
---|
64 | do_getset, /* 47 = getgid */
|
---|
65 | no_sys, /* 48 = (signal)*/
|
---|
66 | no_sys, /* 49 = unused */
|
---|
67 | no_sys, /* 50 = unused */
|
---|
68 | no_sys, /* 51 = (acct) */
|
---|
69 | no_sys, /* 52 = (phys) */
|
---|
70 | no_sys, /* 53 = (lock) */
|
---|
71 | no_sys, /* 54 = ioctl */
|
---|
72 | no_sys, /* 55 = fcntl */
|
---|
73 | no_sys, /* 56 = (mpx) */
|
---|
74 | no_sys, /* 57 = unused */
|
---|
75 | no_sys, /* 58 = unused */
|
---|
76 | do_exec, /* 59 = execve */
|
---|
77 | no_sys, /* 60 = umask */
|
---|
78 | no_sys, /* 61 = chroot */
|
---|
79 | do_getset, /* 62 = setsid */
|
---|
80 | do_getset, /* 63 = getpgrp */
|
---|
81 |
|
---|
82 | no_sys, /* 64 = unused */
|
---|
83 | no_sys, /* 65 = UNPAUSE */
|
---|
84 | no_sys, /* 66 = unused */
|
---|
85 | no_sys, /* 67 = REVIVE */
|
---|
86 | no_sys, /* 68 = TASK_REPLY */
|
---|
87 | no_sys, /* 69 = unused */
|
---|
88 | no_sys, /* 70 = unused */
|
---|
89 | do_sigaction, /* 71 = sigaction */
|
---|
90 | do_sigsuspend, /* 72 = sigsuspend */
|
---|
91 | do_sigpending, /* 73 = sigpending */
|
---|
92 | do_sigprocmask, /* 74 = sigprocmask */
|
---|
93 | do_sigreturn, /* 75 = sigreturn */
|
---|
94 | do_reboot, /* 76 = reboot */
|
---|
95 | do_svrctl, /* 77 = svrctl */
|
---|
96 | do_procstat, /* 78 = procstat */
|
---|
97 | do_getsysinfo, /* 79 = getsysinfo */
|
---|
98 | do_getprocnr, /* 80 = getprocnr */
|
---|
99 | no_sys, /* 81 = unused */
|
---|
100 | no_sys, /* 82 = fstatfs */
|
---|
101 | do_allocmem, /* 83 = memalloc */
|
---|
102 | do_freemem, /* 84 = memfree */
|
---|
103 | no_sys, /* 85 = select */
|
---|
104 | no_sys, /* 86 = fchdir */
|
---|
105 | no_sys, /* 87 = fsync */
|
---|
106 | do_getsetpriority, /* 88 = getpriority */
|
---|
107 | do_getsetpriority, /* 89 = setpriority */
|
---|
108 | do_time, /* 90 = gettimeofday */
|
---|
109 | do_getset, /* 91 = seteuid */
|
---|
110 | do_getset, /* 92 = setegid */
|
---|
111 | no_sys, /* 93 = truncate */
|
---|
112 | no_sys, /* 94 = ftruncate */
|
---|
113 | };
|
---|
114 | /* This should not fail with "array size is negative": */
|
---|
115 | extern int dummy[sizeof(call_vec) == NCALLS * sizeof(call_vec[0]) ? 1 : -1];
|
---|