vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

systab.h (3182B)


      1 #include "sys.h"
      2 
      3 typedef long Syscall(uint32*);
      4 
      5 Syscall sysr1;
      6 Syscall sys_errstr;
      7 Syscall sysbind;
      8 Syscall syschdir;
      9 Syscall sysclose;
     10 Syscall sysdup;
     11 Syscall sysalarm;
     12 Syscall sysexec;
     13 Syscall sysexits;
     14 Syscall sys_fsession;
     15 Syscall sysfauth;
     16 Syscall sys_fstat;
     17 Syscall syssegbrk;
     18 Syscall sys_mount;
     19 Syscall sysopen;
     20 Syscall sys_read;
     21 Syscall sysoseek;
     22 Syscall syssleep;
     23 Syscall sys_stat;
     24 Syscall sysrfork;
     25 Syscall sys_write;
     26 Syscall syspipe;
     27 Syscall syscreate;
     28 Syscall sysfd2path;
     29 Syscall sysbrk_;
     30 Syscall sysremove;
     31 Syscall sys_wstat;
     32 Syscall sys_fwstat;
     33 Syscall sysnotify;
     34 Syscall sysnoted;
     35 Syscall syssegattach;
     36 Syscall syssegdetach;
     37 Syscall syssegfree;
     38 Syscall syssegflush;
     39 Syscall sysrendezvous;
     40 Syscall sysunmount;
     41 Syscall sys_wait;
     42 Syscall syssemacquire;
     43 Syscall syssemrelease;
     44 Syscall sysseek;
     45 Syscall sysfversion;
     46 Syscall syserrstr;
     47 Syscall sysstat;
     48 Syscall sysfstat;
     49 Syscall syswstat;
     50 Syscall sysfwstat;
     51 Syscall sysmount;
     52 Syscall sysawait;
     53 Syscall syspread;
     54 Syscall syspwrite;
     55 Syscall	sysdeath;
     56 
     57 Syscall *systab[]={
     58 	[SYSR1]		sysr1,
     59 	[_ERRSTR]	sys_errstr,
     60 	[BIND]		sysbind,
     61 	[CHDIR]		syschdir,
     62 	[CLOSE]		sysclose,
     63 	[DUP]		sysdup,
     64 	[ALARM]		sysalarm,
     65 	[EXEC]		sysexec,
     66 	[EXITS]		sysexits,
     67 	[_FSESSION]	sys_fsession,
     68 	[FAUTH]		sysfauth,
     69 	[_FSTAT]	sys_fstat,
     70 	[SEGBRK]	syssegbrk,
     71 	[_MOUNT]	sys_mount,
     72 	[OPEN]		sysopen,
     73 	[_READ]		sys_read,
     74 	[OSEEK]		sysoseek,
     75 	[SLEEP]		syssleep,
     76 	[_STAT]		sys_stat,
     77 	[RFORK]		sysrfork,
     78 	[_WRITE]	sys_write,
     79 	[PIPE]		syspipe,
     80 	[CREATE]	syscreate,
     81 	[FD2PATH]	sysfd2path,
     82 	[BRK_]		sysbrk_,
     83 	[REMOVE]	sysremove,
     84 	[_WSTAT]	sys_wstat,
     85 	[_FWSTAT]	sys_fwstat,
     86 	[NOTIFY]	sysnotify,
     87 	[NOTED]		sysnoted,
     88 	[SEGATTACH]	syssegattach,
     89 	[SEGDETACH]	syssegdetach,
     90 	[SEGFREE]	syssegfree,
     91 	[SEGFLUSH]	syssegflush,
     92 	[RENDEZVOUS]	sysrendezvous,
     93 	[UNMOUNT]	sysunmount,
     94 	[_WAIT]		sys_wait,
     95 	[SEMACQUIRE]	syssemacquire,
     96 	[SEMRELEASE]	syssemrelease,
     97 	[SEEK]		sysseek,
     98 	[FVERSION]	sysfversion,
     99 	[ERRSTR]	syserrstr,
    100 	[STAT]		sysstat,
    101 	[FSTAT]		sysfstat,
    102 	[WSTAT]		syswstat,
    103 	[FWSTAT]	sysfwstat,
    104 	[MOUNT]		sysmount,
    105 	[AWAIT]		sysawait,
    106 	[PREAD]		syspread,
    107 	[PWRITE]	syspwrite,
    108 };
    109 
    110 char *sysctab[]={
    111 	[SYSR1]		"Running",
    112 	[_ERRSTR]	"_errstr",
    113 	[BIND]		"Bind",
    114 	[CHDIR]		"Chdir",
    115 	[CLOSE]		"Close",
    116 	[DUP]		"Dup",
    117 	[ALARM]		"Alarm",
    118 	[EXEC]		"Exec",
    119 	[EXITS]		"Exits",
    120 	[_FSESSION]	"_fsession",
    121 	[FAUTH]		"Fauth",
    122 	[_FSTAT]	"_fstat",
    123 	[SEGBRK]	"Segbrk",
    124 	[_MOUNT]	"_mount",
    125 	[OPEN]		"Open",
    126 	[_READ]		"_read",
    127 	[OSEEK]		"Oseek",
    128 	[SLEEP]		"Sleep",
    129 	[_STAT]		"_stat",
    130 	[RFORK]		"Rfork",
    131 	[_WRITE]	"_write",
    132 	[PIPE]		"Pipe",
    133 	[CREATE]	"Create",
    134 	[FD2PATH]	"Fd2path",
    135 	[BRK_]		"Brk",
    136 	[REMOVE]	"Remove",
    137 	[_WSTAT]	"_wstat",
    138 	[_FWSTAT]	"_fwstat",
    139 	[NOTIFY]	"Notify",
    140 	[NOTED]		"Noted",
    141 	[SEGATTACH]	"Segattach",
    142 	[SEGDETACH]	"Segdetach",
    143 	[SEGFREE]	"Segfree",
    144 	[SEGFLUSH]	"Segflush",
    145 	[RENDEZVOUS]	"Rendez",
    146 	[UNMOUNT]	"Unmount",
    147 	[_WAIT]		"_wait",
    148 	[SEMACQUIRE]	"Semacquire",
    149 	[SEMRELEASE]	"Semrelease",
    150 	[SEEK]		"Seek",
    151 	[FVERSION]	"Fversion",
    152 	[ERRSTR]	"Errstr",
    153 	[STAT]		"Stat",
    154 	[FSTAT]		"Fstat",
    155 	[WSTAT]		"Wstat",
    156 	[FWSTAT]	"Fwstat",
    157 	[MOUNT]		"Mount",
    158 	[AWAIT]		"Await",
    159 	[PREAD]		"Pread",
    160 	[PWRITE]	"Pwrite",
    161 };
    162 
    163 int nsyscall = (sizeof systab/sizeof systab[0]);