#
/*
 *	UKC System changes which apply to this file:
 *	see changes.h
 *
 *	STOPUNIX
 *	ACCT
 *	NEW_SLEEP
 */
#include "../param.h"

/*
 * These lines included to stop new Version 7 compiler
 * complaining about undefined routines
 */
int alarm();
int chdir();
int chmod();
int chown();
int close();
int creat();
int dup();
int exec();
int fork();
int fstat();
int getgid();
int getpid();
int getswit();
#ifdef TELL
long tell();
#endif
int getuid();
int gtime();
int gtty();
int kill();
int link();
int mknod();
int nice();
int nosys();
int nullsys();
int open();
int pause();
int pipe();
int profil();
int ptrace();
int read();
int rexit();
int sbreak();
int seek();
int setgid();
int setuid();
int smount();
int ssig();
int sslep();
int stat();
int stime();
int stopunix();
int stty();
int sumount();
int sync();
int sysacct();
int terms();
int times();
int unlink();
int wait();
int write();
/*
 * This table is the switch used to transfer
 * to the appropriate routine for processing a system call.
 * Each row contains the number of arguments expected
 * and a pointer to the routine.
 */
int	sysent[]
{
	0, &nullsys,			/*  0 = indir */
	0, &rexit,			/*  1 = exit */
	0, &fork,			/*  2 = fork */
	2, &read,			/*  3 = read */
	2, &write,			/*  4 = write */
	2, &open,			/*  5 = open */
	0, &close,			/*  6 = close */
	0, &wait,			/*  7 = wait */
	2, &creat,			/*  8 = creat */
	2, &link,			/*  9 = link */
	1, &unlink,			/* 10 = unlink */
	2, &exec,			/* 11 = exec */
	1, &chdir,			/* 12 = chdir */
	0, &gtime,			/* 13 = time */
	3, &mknod,			/* 14 = mknod */
	2, &chmod,			/* 15 = chmod */
	2, &chown,			/* 16 = chown */
	1, &sbreak,			/* 17 = break */
	2, &stat,			/* 18 = stat */
	2, &seek,			/* 19 = seek */
	0, &getpid,			/* 20 = getpid */
	3, &smount,			/* 21 = mount */
	1, &sumount,			/* 22 = umount */
	0, &setuid,			/* 23 = setuid */
	0, &getuid,			/* 24 = getuid */
	0, &stime,			/* 25 = stime */
	3, &ptrace,			/* 26 = ptrace */
	2,&terms,			/* 27 = terms */
	1, &fstat,			/* 28 = fstat */
	0, &nosys,			/* 29 = x */
	1, &nullsys,			/* 30 = smdate; inoperative */
	1, &stty,			/* 31 = stty */
	1, &gtty,			/* 32 = gtty */
	0, &nosys,			/* 33 = x */
	0, &nice,			/* 34 = nice */
	0, &sslep,			/* 35 = sleep */
	0, &sync,			/* 36 = sync */
	1, &kill,			/* 37 = kill */
	0, &getswit,			/* 38 = switch */
	0, &nosys,			/* 39 = x */
#ifdef TELL
	0, &tell,			/* 40 = tell */
#else
	0, &nosys,			/* 40 = x */
#endif
	0, &dup,			/* 41 = dup */
	0, &pipe,			/* 42 = pipe */
	1, &times,			/* 43 = times */
	4, &profil,			/* 44 = prof */
	0, &nosys,			/* 45 = tiu */
	0, &setgid,			/* 46 = setgid */
	0, &getgid,			/* 47 = getgid */
	2, &ssig,			/* 48 = sig */
	0, &nosys,			/* 49 = x */
	0, &nosys,			/* 50 = x */
#ifndef ACCT
	0, &nosys,			/* 51 = x */
#endif
#ifdef ACCT
	1, &sysacct,			/* 51 = turn acct on/off */
#endif
	0, &nosys,			/* 52 = x */
	0, &nosys,			/* 53 = x */
	0, &nosys,			/* 54 = x */
	0, &nosys,			/* 55 = x */
	0, &nosys,			/* 56 = x */
	0, &nosys,			/* 57 = x */
	0, &nosys,			/* 58 = x */
	0, &nosys,			/* 59 = x */
#ifdef NEW_SLEEP
	/*
	 *	NOTE: these values are non standard
 	 *	because of terms call already compiled
	 *	into millions of places in the system
	 */
	0, &pause,			/* 60 = pause */
	0, &alarm,			/* 61 = alarm */
#else
	0, &nosys,			/* 60 = x */
	0, &nosys,			/* 61 = x */
#endif
	0, &nosys,			/* 62 = x */
	0, &stopunix			/* 63 = stop Unix system - added in by Peter C to allow system halt  */
};
