1: # 2: /* 3: */ 4: 5: /* 6: * This table is the switch used to transfer 7: * to the appropriate routine for processing a system call. 8: * Each row contains the number of arguments expected 9: * and a pointer to the routine. 10: */ 11: int sysent[] 12: { 13: 0, &nullsys, /* 0 = indir */ 14: 0, &rexit, /* 1 = exit */ 15: 0, &fork, /* 2 = fork */ 16: 2, &read, /* 3 = read */ 17: 2, &write, /* 4 = write */ 18: 2, &open, /* 5 = open */ 19: 0, &close, /* 6 = close */ 20: 0, &wait, /* 7 = wait */ 21: 2, &creat, /* 8 = creat */ 22: 2, &link, /* 9 = link */ 23: 1, &unlink, /* 10 = unlink */ 24: 2, &exec, /* 11 = exec */ 25: 1, &chdir, /* 12 = chdir */ 26: 0, >ime, /* 13 = time */ 27: 3, &mknod, /* 14 = mknod */ 28: 2, &chmod, /* 15 = chmod */ 29: 2, &chown, /* 16 = chown */ 30: 1, &sbreak, /* 17 = break */ 31: 2, &stat, /* 18 = stat */ 32: 2, &seek, /* 19 = seek */ 33: 0, &getpid, /* 20 = getpid */ 34: 3, &smount, /* 21 = mount */ 35: 1, &sumount, /* 22 = umount */ 36: 0, &setuid, /* 23 = setuid */ 37: 0, &getuid, /* 24 = getuid */ 38: 0, &stime, /* 25 = stime */ 39: 3, &ptrace, /* 26 = ptrace */ 40: 0, &nosys, /* 27 = x */ 41: 1, &fstat, /* 28 = fstat */ 42: 0, &nosys, /* 29 = x */ 43: 1, &nullsys, /* 30 = smdate; inoperative */ 44: 1, &stty, /* 31 = stty */ 45: 1, >ty, /* 32 = gtty */ 46: 0, &nosys, /* 33 = x */ 47: 0, &nice, /* 34 = nice */ 48: 0, &sslep, /* 35 = sleep */ 49: 0, &sync, /* 36 = sync */ 50: 1, &kill, /* 37 = kill */ 51: 0, &getswit, /* 38 = switch */ 52: 0, &nosys, /* 39 = x */ 53: 0, &nosys, /* 40 = x */ 54: 0, &dup, /* 41 = dup */ 55: 0, &pipe, /* 42 = pipe */ 56: 1, ×, /* 43 = times */ 57: 4, &profil, /* 44 = prof */ 58: 0, &nosys, /* 45 = tiu */ 59: 0, &setgid, /* 46 = setgid */ 60: 0, &getgid, /* 47 = getgid */ 61: 2, &ssig, /* 48 = sig */ 62: 0, &nosys, /* 49 = x */ 63: 0, &nosys, /* 50 = x */ 64: 0, &nosys, /* 51 = x */ 65: 0, &nosys, /* 52 = x */ 66: 0, &nosys, /* 53 = x */ 67: 0, &nosys, /* 54 = x */ 68: 0, &nosys, /* 55 = x */ 69: 0, &nosys, /* 56 = x */ 70: 0, &nosys, /* 57 = x */ 71: 0, &nosys, /* 58 = x */ 72: 0, &nosys, /* 59 = x */ 73: 0, &nosys, /* 60 = x */ 74: 0, &nosys, /* 61 = x */ 75: 0, &nosys, /* 62 = x */ 76: 0, &nosys /* 63 = x */ 77: };