16804Srrh /* 2*16442Smckusick * unix7sys.h 4.3 84/05/05 36804Srrh */ 4*16442Smckusick 5*16442Smckusick /* From Lou Salkind: compat/RCS/unix7sys.h,v 1.2 84/01/31 13:34:22 */ 6*16442Smckusick 76804Srrh #define NSYSTRAPS 64 86804Srrh #define NSIGS 13 96804Srrh #define ILLSYS -1 106804Srrh #define NORMRET 0 116804Srrh #define LONGRET 1 126804Srrh #define TWORET 2 136804Srrh #define FORK 2 14*16442Smckusick #define READ 3 15*16442Smckusick #define WRITE 4 166804Srrh #define OPEN 5 17*16442Smckusick #define CLOSE 6 186804Srrh #define WAIT 7 196804Srrh #define CREAT 8 206804Srrh #define LINK 9 216804Srrh #define UNLNK 10 226804Srrh #define EXEC 11 236804Srrh #define CHDIR 12 2414308Skre #define TIME 13 256804Srrh #define MKNOD 14 266804Srrh #define BRK 17 276804Srrh #define STAT 18 286804Srrh #define SEEK 19 296804Srrh #define SETUID 23 306804Srrh #define GETUID 24 3114308Skre #define STIME 25 3214308Skre #define ALARM 27 336804Srrh #define FSTAT 28 3414308Skre #define PAUSE 29 3514308Skre #define UTIME 30 3614308Skre #define NICE 34 3714308Skre #define FTIME 35 3814308Skre #define SETPGRP 39 396804Srrh #define PIPE 42 406804Srrh #define TIMES 43 416804Srrh #define SETGID 46 426804Srrh #define GETGID 47 436804Srrh #define SIG 48 4414308Skre #define IOCTL 54 456804Srrh #define EXECE 59 466804Srrh /* 476804Srrh * The numerical entries in the following table are 486804Srrh * really composed of 3 parts. 496804Srrh * The first entry in each row indicates the number 506804Srrh * of register arguments for the system call, while 516804Srrh * the 2nd position is the number of memory arguments 526804Srrh * the 3rd position is LONGRET if the return is a long (r0 and r1) 536804Srrh * or is TWORET if the return is 2 ints ala pipe 546804Srrh * otherwise it is NORMRET. 556804Srrh */ 566804Srrh int sysargs[][3] = 576804Srrh { 586804Srrh 0, 0, NORMRET, /* 0 = indir */ 596804Srrh 1, 0, NORMRET, /* 1 = exit */ 606804Srrh 0, 0, NORMRET, /* 2 = fork */ 616804Srrh 1, 2, NORMRET, /* 3 = read */ 626804Srrh 1, 2, NORMRET, /* 4 = write */ 636804Srrh 0, 2, NORMRET, /* 5 = open */ 646804Srrh 1, 0, NORMRET, /* 6 = close */ 656804Srrh 0, 0, TWORET, /* 7 = wait */ 666804Srrh 0, 2, NORMRET, /* 8 = creat */ 676804Srrh 0, 2, NORMRET, /* 9 = link */ 686804Srrh 0, 1, NORMRET, /* 10 = unlink */ 696804Srrh 0, 2, NORMRET, /* 11 = exec */ 706804Srrh 0, 1, NORMRET, /* 12 = chdir */ 716804Srrh 0, 0, LONGRET, /* 13 = time */ 726804Srrh 0, 3, NORMRET, /* 14 = mknod */ 736804Srrh 0, 2, NORMRET, /* 15 = chmod */ 746804Srrh 0, 3, NORMRET, /* 16 = chown; now 3 args */ 756804Srrh 0, 1, NORMRET, /* 17 = break */ 766804Srrh 0, 2, NORMRET, /* 18 = stat */ 776804Srrh 1, 3, LONGRET, /* 19 = seek; now 3 args */ 786804Srrh 0, 0, NORMRET, /* 20 = getpid */ 796804Srrh 0, 3, NORMRET, /* 21 = mount */ 806804Srrh 0, 1, NORMRET, /* 22 = umount */ 816804Srrh 1, 0, NORMRET, /* 23 = setuid */ 826804Srrh 0, 0, TWORET, /* 24 = getuid */ 836804Srrh 2, 0, NORMRET, /* 25 = stime */ 846804Srrh 1, 3, NORMRET, /* 26 = ptrace */ 856804Srrh 1, 0, NORMRET, /* 27 = alarm */ 866804Srrh 1, 1, NORMRET, /* 28 = fstat */ 876804Srrh 0, 0, NORMRET, /* 29 = pause */ 886804Srrh 0, 2, NORMRET, /* 30 = utime */ 896804Srrh 1, 1, NORMRET, /* 31 = stty */ 906804Srrh 1, 1, NORMRET, /* 32 = gtty */ 916804Srrh 0, 2, NORMRET, /* 33 = access */ 926804Srrh 1, 0, NORMRET, /* 34 = nice */ 936804Srrh 0, 1, NORMRET, /* 35 = ftime; formerly sleep */ 946804Srrh 0, 0, NORMRET, /* 36 = sync */ 956804Srrh 1, 1, NORMRET, /* 37 = kill */ 966804Srrh 0, 0, NORMRET, /* 38 = switch; inoperative */ 976804Srrh 0, 0, NORMRET, /* 39 = setpgrp (not in yet) */ 986804Srrh ILLSYS, 0, NORMRET, /* 40 = tell (obsolete) */ 996804Srrh 2, 0, NORMRET, /* 41 = dup */ 1006804Srrh 0, 0, TWORET, /* 42 = pipe */ 1016804Srrh 0, 1, NORMRET, /* 43 = times */ 1026804Srrh 0, 4, NORMRET, /* 44 = prof */ 1036804Srrh ILLSYS, 0, NORMRET, /* 45 = unused */ 1046804Srrh 1, 0, NORMRET, /* 46 = setgid */ 1056804Srrh 0, 0, TWORET, /* 47 = getgid */ 1066804Srrh 0, 2, NORMRET, /* 48 = sig */ 1076804Srrh ILLSYS, 0, NORMRET, /* 49 = reserved for USG */ 1086804Srrh ILLSYS, 0, NORMRET, /* 50 = reserved for USG */ 1096804Srrh 0, 1, NORMRET, /* 51 = turn acct off/on */ 1106804Srrh 0, 3, NORMRET, /* 52 = set user physical addresses */ 1116804Srrh 0, 1, NORMRET, /* 53 = lock user in core */ 1126804Srrh 0, 3, NORMRET, /* 54 = ioctl */ 1136804Srrh ILLSYS, 0, NORMRET, /* 55 = readwrite (in abeyance) */ 1146804Srrh 0, 4, NORMRET, /* 56 = creat mpx comm channel */ 1156804Srrh ILLSYS, 0, NORMRET, /* 57 = reserved for USG */ 1166804Srrh ILLSYS, 0, NORMRET, /* 58 = reserved for USG */ 1176804Srrh 0, 3, NORMRET, /* 59 = exece */ 1186804Srrh 0, 1, NORMRET, /* 60 = umask */ 1196804Srrh 0, 1, NORMRET, /* 61 = chroot */ 1206804Srrh ILLSYS, 0, NORMRET, /* 62 = x */ 1216804Srrh ILLSYS, 0, NORMRET /* 63 = used internally */ 1226804Srrh }; 123