xref: /minix/minix/servers/pm/table.c (revision 9f988b79)
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 
12 #define CALL(n)	[((n) - PM_BASE)]
13 
14 int (* const call_vec[NR_PM_CALLS])(void) = {
15 	CALL(PM_EXIT)		= do_exit,		/* _exit(2) */
16 	CALL(PM_FORK)		= do_fork,		/* fork(2) */
17 	CALL(PM_WAIT4)		= do_wait4,		/* wait4(2) */
18 	CALL(PM_GETPID)		= do_get,		/* get[p]pid(2) */
19 	CALL(PM_SETUID)		= do_set,		/* setuid(2) */
20 	CALL(PM_GETUID)		= do_get,		/* get[e]uid(2) */
21 	CALL(PM_STIME)		= do_stime,		/* stime(2) */
22 	CALL(PM_PTRACE)		= do_trace,		/* ptrace(2) */
23 	CALL(PM_SETGROUPS)	= do_set,		/* setgroups(2) */
24 	CALL(PM_GETGROUPS)	= do_get,		/* getgroups(2) */
25 	CALL(PM_KILL)		= do_kill,		/* kill(2) */
26 	CALL(PM_SETGID)		= do_set,		/* setgid(2) */
27 	CALL(PM_GETGID)		= do_get,		/* get[e]gid(2) */
28 	CALL(PM_EXEC)		= do_exec,		/* execve(2) */
29 	CALL(PM_SETSID)		= do_set,		/* setsid(2) */
30 	CALL(PM_GETPGRP)	= do_get,		/* getpgrp(2) */
31 	CALL(PM_ITIMER)		= do_itimer,		/* [gs]etitimer(2) */
32 	CALL(PM_GETMCONTEXT)	= do_getmcontext,	/* getmcontext(2) */
33 	CALL(PM_SETMCONTEXT)	= do_setmcontext,	/* setmcontext(2) */
34 	CALL(PM_SIGACTION)	= do_sigaction,		/* sigaction(2) */
35 	CALL(PM_SIGSUSPEND)	= do_sigsuspend,	/* sigsuspend(2) */
36 	CALL(PM_SIGPENDING)	= do_sigpending,	/* sigpending(2) */
37 	CALL(PM_SIGPROCMASK)	= do_sigprocmask,	/* sigprocmask(2) */
38 	CALL(PM_SIGRETURN)	= do_sigreturn,		/* sigreturn(2) */
39 	CALL(PM_SYSUNAME)	= do_sysuname,		/* sysuname(2) */
40 	CALL(PM_GETPRIORITY)	= do_getsetpriority,	/* getpriority(2) */
41 	CALL(PM_SETPRIORITY)	= do_getsetpriority,	/* setpriority(2) */
42 	CALL(PM_GETTIMEOFDAY)	= do_time,		/* gettimeofday(2) */
43 	CALL(PM_SETEUID)	= do_set,		/* geteuid(2) */
44 	CALL(PM_SETEGID)	= do_set,		/* setegid(2) */
45 	CALL(PM_ISSETUGID)	= do_get,		/* issetugid */
46 	CALL(PM_GETSID)		= do_get,		/* getsid(2) */
47 	CALL(PM_CLOCK_GETRES)	= do_getres,		/* clock_getres(2) */
48 	CALL(PM_CLOCK_GETTIME)	= do_gettime,		/* clock_gettime(2) */
49 	CALL(PM_CLOCK_SETTIME)	= do_settime,		/* clock_settime(2) */
50 	CALL(PM_GETRUSAGE)	= do_getrusage,		/* getrusage(2) */
51 	CALL(PM_REBOOT)		= do_reboot,		/* reboot(2) */
52 	CALL(PM_SVRCTL)		= do_svrctl,		/* svrctl(2) */
53 	CALL(PM_SPROF)		= do_sprofile,		/* sprofile(2) */
54 	CALL(PM_SRV_FORK)	= do_srv_fork,		/* srv_fork(2) */
55 	CALL(PM_SRV_KILL)	= do_srv_kill,		/* srv_kill(2) */
56 	CALL(PM_EXEC_NEW)	= do_newexec,
57 	CALL(PM_EXEC_RESTART)	= do_execrestart,
58 	CALL(PM_GETEPINFO)	= do_getepinfo,		/* getepinfo(2) */
59 	CALL(PM_GETPROCNR)	= do_getprocnr,		/* getprocnr(2) */
60 	CALL(PM_GETSYSINFO)	= do_getsysinfo		/* getsysinfo(2) */
61 };
62