.N 1
List of monitor calls.
.DS B
-.ta 2n 8n 16n 32n 48n
-number name parameters results function
+.ta 4n 13n 29n 52n
+nr name parameters results function
- 1 Exit status:int Terminate this process
- 2 Fork e,flag,pid:int Spawn new process
- 3 Read fildes:int;buf:ptr;nbytes:unsp
- e:int;rbytes:unsp Read from file
- 4 Write fildes:int;buf:ptr;nbytes:unsp
- e:int;wbytes:unsp Write on a file
- 5 Open string:ptr;flag:int
- e,fildes:int Open file for read and/or write
- 6 Close fildes:int e:int Close a file
- 7 Wait e:int;status,pid:int2
- Wait for child
- 8 Creat string:ptr;mode:int
- e,fildes:int Create a new file
- 9 Link string1,string2:ptr
- e:int Link to a file
- 10 Unlink string:ptr e:int Remove directory entry
- 12 Chdir string:ptr e:int Change default directory
- 14 Mknod string:ptr;mode,addr:int2
- e:int Make a special file
- 15 Chmod string:ptr;mode:int2
- e:int Change mode of file
- 16 Chown string:ptr;owner,group:int2
- e:int Change owner/group of a file
- 18 Stat string,statbuf:ptr
- e:int Get file status
- 19 Lseek fildes:int;off:int4;whence:int
- e:int;oldoff:int4 Move read/write pointer
- 20 Getpid pid:int2 Get process identification
- 21 Mount special,string:ptr;rwflag:int
- e:int Mount file system
- 22 Umount special:ptr e:int Unmount file system
- 23 Setuid userid:int2 e:int Set user ID
- 24 Getuid e_uid,r_uid:int2 Get user ID
- 25 Stime time:int4 e:int Set time and date
- 26 Ptrace request:int;pid:int2;addr:ptr;data:int
- e,value:int Process trace
- 27 Alarm seconds:uns2 previous:uns2 Schedule signal
- 28 Fstat fildes:int;statbuf:ptr
- e:int Get file status
- 29 Pause Stop until signal
- 30 Utime string,timep:ptr
- e:int Set file times
- 33 Access string:ptr;mode:int
- e:int Determine file accessibility
- 34 Nice incr:int Set program priority
- 35 Ftime bufp:ptr e:int Get date and time
- 36 Sync Update filesystem
- 37 Kill pid:int2;sig:int
- e:int Send signal to a process
- 41 Dup fildes,newfildes:int
- e,fildes:int Duplicate a file descriptor
- 42 Pipe e,w_des,r_des:int
- Create a pipe
- 43 Times buffer:ptr Get process times
- 44 Profil buff:ptr;bufsiz,offset,scale:intp Execution time profile
- 46 Setgid gid:int2 e:int Set group ID
- 47 Getgid e_gid,r_gid:int Get group ID
- 48 Sigtrp trapno,signo:int
- e,prevtrap:int See below
- 51 Acct file:ptr e:int Turn accounting on or off
- 53 Lock flag:int e:int Lock a process
- 54 Ioctl fildes,request:int;argp:ptr
- e:int Control device
- 56 Mpxcall cmd:int;vec:ptr e:int Multiplexed file handling
- 59 Exece name,argv,envp:ptr
- e:int Execute a file
- 60 Umask complmode:int2 oldmask:int2 Set file creation mode mask
- 61 Chroot string:ptr e:int Change root directory
+1 Exit status:int Terminate this process
+2 Fork e,flag,pid:int Spawn new process
+3 Read fildes:int;buf:ptr;nbytes:unsp
+ e:int;rbytes:unsp Read from file
+4 Write fildes:int;buf:ptr;nbytes:unsp
+ e:int;wbytes:unsp Write on a file
+5 Open string:ptr;flag:int
+ e,fildes:int Open file for read and/or write
+6 Close fildes:int e:int Close a file
+7 Wait e:int;status,pid:int2
+ Wait for child
+8 Creat string:ptr;mode:int
+ e,fildes:int Create a new file
+9 Link string1,string2:ptr
+ e:int Link to a file
+10 Unlink string:ptr e:int Remove directory entry
+12 Chdir string:ptr e:int Change default directory
+14 Mknod string:ptr;mode,addr:int2
+ e:int Make a special file
+15 Chmod string:ptr;mode:int2
+ e:int Change mode of file
+16 Chown string:ptr;owner,group:int2
+ e:int Change owner/group of a file
+18 Stat string,statbuf:ptr
+ e:int Get file status
+19 Lseek fildes:int;off:int4;whence:int
+ e:int;oldoff:int4 Move read/write pointer
+20 Getpid pid:int2 Get process identification
+21 Mount special,string:ptr;rwflag:int
+ e:int Mount file system
+22 Umount special:ptr e:int Unmount file system
+23 Setuid userid:int2 e:int Set user ID
+24 Getuid e_uid,r_uid:int2 Get user ID
+25 Stime time:int4 e:int Set time and date
+26 Ptrace request:int;pid:int2;addr:ptr;data:int
+ e,value:int Process trace
+27 Alarm seconds:uns2 previous:uns2 Schedule signal
+28 Fstat fildes:int;statbuf:ptr
+ e:int Get file status
+29 Pause Stop until signal
+30 Utime string,timep:ptr
+ e:int Set file times
+33 Access string:ptr;mode:int
+ e:int Determine file accessibility
+34 Nice incr:int Set program priority
+35 Ftime bufp:ptr e:int Get date and time
+36 Sync Update filesystem
+37 Kill pid:int2;sig:int
+ e:int Send signal to a process
+41 Dup fildes,newfildes:int
+ e,fildes:int Duplicate a file descriptor
+42 Pipe e,w_des,r_des:int Create a pipe
+43 Times buffer:ptr Get process times
+44 Profil buff:ptr;bufsiz,offset,scale:intp
+ Execution time profile
+46 Setgid gid:int2 e:int Set group ID
+47 Getgid e_gid,r_gid:int Get group ID
+48 Sigtrp trapno,signo:int
+ e,prevtrap:int See below
+51 Acct file:ptr e:int Turn accounting on or off
+53 Lock flag:int e:int Lock a process
+54 Ioctl fildes,request:int;argp:ptr
+ e:int Control device
+56 Mpxcall cmd:int;vec:ptr e:int Multiplexed file handling
+59 Exece name,argv,envp:ptr
+ e:int Execute a file
+60 Umask mask:int2 oldmask:int2 Set file creation mode mask
+61 Chroot string:ptr e:int Change root directory
.DE 1
Codes 0, 11, 13, 17, 31, 32, 38, 39, 40, 45, 49, 50, 52,
55, 57, 58, 62, and 63 are
/* ----------- checking --------------*/
int ecodes[256],codes[256],lcodes[256] ;
-char eflags[256], flags[256];
-int elows[256], lows[256];
+char eflags[256], flags[256], lflags[256] ;
+int elows[256], lows[256], llows[256];
#define NMNEM (sp_lmnem-sp_fmnem+1)
#define MUST 1
#define MAY 2
#define FORB 3
-char negc[NMNEM], zc[NMNEM], posc[NMNEM] ;
+char negc[NMNEM], zc[NMNEM], posc[NMNEM], lnegc[NMNEM], lposc[NMNEM] ;
checkall() {
register i,flag ;
else if ( flag&OP_POS )
posc[opc]++ ;
break ;
- case OP16U :
case OP32 :
- case OP64 :
+ if ( flag&OP_NEG )
+ lnegc[opc]++ ;
+ else if ( flag&OP_POS )
+ lposc[opc]++ ;
+ break ;
+ case OP16U :
break ;
default :
error("Illegal type") ;
case OP64:
if ( lcodes[icode]!=-1 ) {
mess("Long opcode %d used by %s and %s",
- icode,ename(emc),ename(codes[icode])) ;
+ icode,ename(emc),ename(lcodes[icode])) ;
}
lcodes[icode]=emc;
+ lflags[icode]=flag;
+ llows[icode]=low;
break ;
}
}
if ( zc[emc]>1 ) mess("More then one OPNO for %s",ename(emc)) ;
if ( posc[emc]>1 ) mess("More then one OP16(pos) for %s",ename(emc)) ;
if ( negc[emc]>1 ) mess("More then one OP16(neg) for %s",ename(emc)) ;
+ if ( lposc[emc]>1 ) mess("More then one OP32(pos) for %s",ename(emc)) ;
+ if ( lnegc[emc]>1 ) mess("More then one OP32(neg) for %s",ename(emc)) ;
switch(zf) {
case MUST:
if ( zc[emc]==0 ) mess("No OPNO for %s",ename(emc)) ;
while (lcodes[i] != -1) {
if (!(i % 8)) printf("\n%d", i);
printf("\t%s", ename(lcodes[i]));
+ prx(lflags[i],llows[i],i);
i++;
}
while (i++ % 8) putchar('\t');
else putchar('l');
if (flg&OPWORD) putchar('w');
break;
+ case OP32:
+ if (flg&OP_POS) putchar('P');
+ else if (flg&OP_NEG) putchar('N');
+ else putchar('L');
+ if (flg&OPWORD) putchar('w');
+ break;
case OPSHORT:
if (flg & OPWORD) putchar('w');
else putchar('s');