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