|
|
1.1 ! root 1: /* $Header: /y/coh.386/RCS/var.c,v 1.3 92/03/12 11:26:41 hal Exp $ */ ! 2: /* (lgl- ! 3: * The information contained herein is a trade secret of Mark Williams ! 4: * Company, and is confidential information. It is provided under a ! 5: * license agreement, and may be copied or disclosed only under the ! 6: * terms of that agreement. Any reproduction or disclosure of this ! 7: * material without the express written authorization of Mark Williams ! 8: * Company or persuant to the license agreement is unlawful. ! 9: * ! 10: * COHERENT Version 2.3.37 ! 11: * Copyright (c) 1982, 1983, 1984. ! 12: * An unpublished work by Mark Williams Company, Chicago. ! 13: * All rights reserved. ! 14: -lgl) */ ! 15: /* ! 16: * Coherent. ! 17: * Variables. ! 18: * ! 19: */ ! 20: #include <sys/coherent.h> ! 21: #include <sys/buf.h> ! 22: #include <sys/con.h> ! 23: #include <sys/inode.h> ! 24: #include <sys/mount.h> ! 25: #include <sys/proc.h> ! 26: #include <sys/ptrace.h> ! 27: #include <sys/seg.h> ! 28: #include <sys/timeout.h> ! 29: #include <sys/systab.h> ! 30: #include <sys/mmu.h> ! 31: ! 32: int debflag = 0; /* coherent.h */ ! 33: ! 34: int batflag; /* coherent.h */ ! 35: int dev_loaded; /* coherent.h */ ! 36: int DUMP_LIM=512*1024; /* coherent.h */ ! 37: int outflag; /* coherent.h */ ! 38: int ttyflag; /* coherent.h */ ! 39: unsigned utimer; /* coherent.h */ ! 40: long lbolt; /* coherent.h */ ! 41: TIM stimer; /* coherent.h */ ! 42: unsigned asize; /* coherent.h */ ! 43: paddr_t clistp; /* coherent.h */ ! 44: MAKESR(blockp, _blockp); /* coherent.h */ ! 45: MAKESR(allocp, _allocp); /* coherent.h */ ! 46: struct all *allkp; /* coherent.h */ ! 47: #if USE_SLOT ! 48: int NSLOT = 64; /* coherent.h */ ! 49: int slotsz = 64; /* coherent.h */ ! 50: int * slotp; /* coherent.h */ ! 51: #endif ! 52: unsigned total_mem; /* coherent.h */ ! 53: ! 54: unsigned bufseqn; /* buf.h */ ! 55: int bufneed; /* buf.h */ ! 56: BUF swapbuf; /* buf.h */ ! 57: BUF *bufl; /* buf.h */ ! 58: ! 59: int cltwant; /* clist.h */ ! 60: cmap_t cltfree; /* clist.h */ ! 61: ! 62: INODE *inodep; /* inode.h */ ! 63: INODE *acctip; /* inode.h */ ! 64: ! 65: MOUNT *mountp; /* mount.h */ ! 66: ! 67: #ifdef TRACER /* mwc_coherent.h */ ! 68: unsigned t_errno = 0; ! 69: unsigned t_hal = 0; ! 70: unsigned t_piggy = 0; ! 71: unsigned t_vlad =0; ! 72: unsigned t_con =0; ! 73: #endif /* TRACER */ ! 74: ! 75: int ISTSIZE = 2048; /* sys/param.h */ ! 76: int quantum; /* proc.h */ ! 77: int disflag; /* proc.h */ ! 78: int intflag; /* proc.h */ ! 79: int cpid; /* proc.h */ ! 80: #if QWAKEUP ! 81: int ntowake; /* proc.h */ ! 82: #endif ! 83: GATE pnxgate; /* proc.h */ ! 84: PROC procq; /* proc.h */ ! 85: PROC *iprocp; /* proc.h */ ! 86: PROC *eprocp; /* proc.h */ ! 87: PROC *cprocp = &procq; /* proc.h */ ! 88: PLINK linkq[NHPLINK]; /* proc.h */ ! 89: ! 90: struct ptrace pts; /* ptrace.h */ ! 91: ! 92: int sexflag; /* seg.h */ ! 93: GATE seglink; /* seg.h */ ! 94: #if MONITOR ! 95: int swmflag; /* seg.h */ ! 96: #endif ! 97: SEG segswap; /* seg.h */ ! 98: SEG segmq; /* seg.h */ ! 99: SEG segdq; /* seg.h */ ! 100: SEG segiom; /* seg.h */ ! 101: SYSMEM sysmem; /* mmu.h */ ! 102: ! 103: extern vaddr_t aicodep; ! 104: extern vaddr_t aicodes; ! 105: ! 106: char *icodep = (char *)&aicodep; /* coherent.h */ ! 107: int icodes = (int)&aicodes; /* coherent.h */ ! 108: ! 109: TIM * timq[256]; /* timeout.h */ ! 110: ! 111: int vtactive; ! 112: ! 113: /* ! 114: * System call functions. ! 115: */ ! 116: int unone(); ! 117: int unull(); ! 118: int uexit(); ! 119: int ufork(); ! 120: int uread(); ! 121: int uwrite(); ! 122: int uopen(); ! 123: int uclose(); ! 124: int uwait(); ! 125: int ucreat(); ! 126: int ulink(); ! 127: int uunlink(); ! 128: int uexece(); ! 129: int uchdir(); ! 130: int umknod(); ! 131: int uchmod(); ! 132: int uchown(); ! 133: char *ubrk(); ! 134: int ustat(); ! 135: long ulseek(); ! 136: int ugetpid(); ! 137: int umount(); ! 138: int uumount(); ! 139: int usetuid(); ! 140: int ugetuid(); ! 141: int ustime(); ! 142: int uptrace(); ! 143: int ualarm(); ! 144: int ufstat(); ! 145: int upause(); ! 146: int uutime(); ! 147: int ustty(); ! 148: int ugtty(); ! 149: int uaccess(); ! 150: int unice(); ! 151: int uftime(); ! 152: int usync(); ! 153: int ukill(); ! 154: int udup(); ! 155: int upipe(); ! 156: int utimes(); ! 157: int utime(); ! 158: int uprofil(); ! 159: int usetgid(); ! 160: int ugetgid(); ! 161: int (*usigsys())(); ! 162: int usload(); ! 163: int usuload(); ! 164: int uacct(); ! 165: int ulock(); ! 166: int uioctl(); ! 167: int ugetegid(); ! 168: int uumask(); ! 169: int uchroot(); ! 170: int ufcntl(); ! 171: int usetpgrp(); ! 172: int uulimit(); ! 173: int ufcntl(); ! 174: int upoll(); ! 175: int upgrp(); ! 176: int usysi86(); ! 177: int umsgsys(); ! 178: int ushmsys(); ! 179: int uutssys(); ! 180: int usemsys(); ! 181: int urmdir(); ! 182: int umkdir(); ! 183: int ugetdents(); ! 184: int ustatfs(); ! 185: int ufstatfs(); ! 186: int uadmin(); ! 187: /* ! 188: * Added by hal 91/10/10. ! 189: * These are undocumented Xenix/V7 compatibility calls. ! 190: */ ! 191: int ustty(); ! 192: int ugtty(); ! 193: ! 194: /* ! 195: * System call table. ! 196: */ ! 197: int ucohcall(); ! 198: struct systab cohcall = { ! 199: 6, INT, ucohcall ! 200: }; ! 201: struct systab sysitab[NMICALL] ={ ! 202: 0, INT, unone, /* 0 = ??? */ ! 203: 1, INT, uexit, /* 1 = exit */ ! 204: 0, INT, ufork, /* 2 = fork */ ! 205: 3, INT, uread, /* 3 = read */ ! 206: 3, INT, uwrite, /* 4 = write */ ! 207: 3, INT, uopen, /* 5 = open */ ! 208: 1, INT, uclose, /* 6 = close */ ! 209: 0, INT, uwait, /* 7 = wait */ ! 210: 2, INT, ucreat, /* 8 = creat */ ! 211: 2, INT, ulink, /* 9 = link */ ! 212: 1, INT, uunlink, /* 10 = unlink */ ! 213: 0, INT, unone, /* 11 = exec */ ! 214: 1, INT, uchdir, /* 12 = chdir */ ! 215: 0, INT, utime, /* 13 = utime */ ! 216: 3, INT, umknod, /* 14 = mknod */ ! 217: 2, INT, uchmod, /* 15 = chmod */ ! 218: 3, INT, uchown, /* 16 = chown */ ! 219: 1, INT, ubrk, /* 17 = break */ ! 220: 2, INT, ustat, /* 18 = stat */ ! 221: 3, LONG, ulseek, /* 19 = lseek */ ! 222: 0, INT, ugetpid, /* 20 = getpid */ ! 223: 3, INT, umount, /* 21 = mount */ ! 224: 1, INT, uumount, /* 22 = umount */ ! 225: 1, INT, usetuid, /* 23 = setuid */ ! 226: 0, INT, ugetuid, /* 24 = getuid */ ! 227: 1, INT, ustime, /* 25 = stime */ ! 228: 4, INT, uptrace, /* 26 = ptrace */ ! 229: 1, INT, ualarm, /* 27 = alarm */ ! 230: 2, INT, ufstat, /* 28 = fstat */ ! 231: 0, INT, upause, /* 29 = pause */ ! 232: 2, INT, uutime, /* 30 = utime */ ! 233: 2, INT, ustty, /* 31 = ustty */ ! 234: 2, INT, ugtty, /* 32 = ugtty */ ! 235: 2, INT, uaccess, /* 33 = access */ ! 236: 1, INT, unice, /* 34 = nice */ ! 237: 4, INT, ustatfs, /* 35 = statfs */ ! 238: 0, INT, usync, /* 36 = sync */ ! 239: 2, INT, ukill, /* 37 = kill */ ! 240: 4, INT, ufstatfs, /* 38 = ufstatfs */ ! 241: 1, INT, upgrp, /* 39 = pgrp */ ! 242: 0, LONG, unone, /* 40 = ??? */ ! 243: 1, INT, udup, /* 41 = dup */ ! 244: 0, INT, upipe, /* 42 = pipe */ ! 245: 1, INT, utimes, /* 43 = times */ ! 246: 4, INT, uprofil, /* 44 = profil */ ! 247: 1, INT, ulock, /* 45 = lock */ ! 248: 1, INT, usetgid, /* 46 = setgid */ ! 249: 0, INT, ugetgid, /* 47 = getgid */ ! 250: 2, INT, usigsys, /* 48 = signal */ ! 251: 6, LONG, umsgsys, /* 49 = msgsys */ ! 252: 5, LONG, usysi86, /* 50 = sysi86 */ ! 253: 1, INT, uacct, /* 51 = acct */ ! 254: 4, INT, ushmsys, /* 52 = shmsys */ ! 255: 5, INT, usemsys, /* 53 = semsys */ ! 256: 3, INT, uioctl, /* 54 = ioctl */ ! 257: 3, INT, uadmin, /* 55 = uadmin */ ! 258: 0, INT, unone, /* 56 = ??? */ ! 259: 3, INT, uutssys, /* 57 = utssys */ ! 260: 0, INT, unone, /* 58 = ??? */ ! 261: 3, INT, uexece, /* 59 = exec */ ! 262: 1, INT, uumask, /* 60 = umask */ ! 263: 1, INT, uchroot, /* 61 = chroot */ ! 264: 3, INT, ufcntl, /* 62 = fcntl */ ! 265: 2, INT, uulimit, /* 63 = ulimit - n/i */ ! 266: 0, INT, unone, /* 64 = ??? (sload) */ ! 267: 0, INT, unone, /* 65 = ??? (suload */ ! 268: 0, INT, unone, /* 66 = ??? (fcntl) */ ! 269: 0, INT, unone, /* 67 = ??? (poll) */ ! 270: 0, INT, unone, /* 68 = ??? (msgctl) */ ! 271: 0, INT, unone, /* 69 = ??? (msgget) */ ! 272: 0, INT, unone, /* 70 = ??? (msgrcv) */ ! 273: 0, INT, unone, /* 71 = ??? (msgsnd) */ ! 274: 0, LONG, unone, /* 72 = ??? (alarm2) */ ! 275: 0, LONG, unone, /* 73 = tick */ ! 276: 0, INT, unone, /* 74 = ??? */ ! 277: 0, INT, unone, /* 75 = ??? */ ! 278: 0, INT, unone, /* 76 = ??? */ ! 279: 0, INT, unone, /* 77 = ??? */ ! 280: 0, INT, unone, /* 78 = ??? */ ! 281: 1, INT, urmdir, /* 79 = rmdir */ ! 282: 2, INT, umkdir, /* 80 = mkdir */ ! 283: 3, INT, ugetdents, /* 81 = getdents */ ! 284: 0, INT, unone, /* 82 = ??? */ ! 285: 0, INT, unone, /* 83 = ??? */ ! 286: 0, INT, unone, /* 84 = ??? */ ! 287: 0, INT, unone, /* 85 = ??? */ ! 288: 0, INT, unone, /* 86 = ??? */ ! 289: 3, INT, upoll, /* 87 = poll */ ! 290: }; ! 291: extern CON nlcon; ! 292: int (*altclk)(); /* hook for polled devices */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.