|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1988 University of Utah. ! 3: * Copyright (c) 1990 The Regents of the University of California. ! 4: * All rights reserved. ! 5: * ! 6: * This code is derived from software contributed to Berkeley by ! 7: * the Systems Programming Group of the University of Utah Computer ! 8: * Science Department. ! 9: * ! 10: * Redistribution is only permitted until one year after the first shipment ! 11: * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and ! 12: * binary forms are permitted provided that: (1) source distributions retain ! 13: * this entire copyright notice and comment, and (2) distributions including ! 14: * binaries display the following acknowledgement: This product includes ! 15: * software developed by the University of California, Berkeley and its ! 16: * contributors'' in the documentation or other materials provided with the ! 17: * distribution and in all advertising materials mentioning features or use ! 18: * of this software. Neither the name of the University nor the names of ! 19: * its contributors may be used to endorse or promote products derived from ! 20: * this software without specific prior written permission. ! 21: * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 22: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 23: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 24: * ! 25: * from: Utah $Hdr: hilvar.h 1.1 89/08/22$ ! 26: * ! 27: * @(#)hilvar.h 7.1 (Berkeley) 5/8/90 ! 28: */ ! 29: ! 30: #ifndef TRUE ! 31: #define TRUE 1 ! 32: #define FALSE 0 ! 33: #endif ! 34: ! 35: #define NHILD 8 /* 7 actual + loop pseudo (dev 0) */ ! 36: #define NHILQ 8 /* must be <= sizeof(int) */ ! 37: ! 38: #define HILBUFSIZE 40 /* size of interrupt poll buffer */ ! 39: #define HILMAXCLIST 1024 /* max chars in clists for HPUX io */ ! 40: ! 41: #define HILLOOPDEV 0 /* loop device index */ ! 42: ! 43: /* ! 44: * XXX: HPUX minor numbers are of the form "D0" where D is the device number ! 45: * BSD uses "0D". For compatibility we accept either. Maybe we should just ! 46: * use the HPUX numbering. ! 47: */ ! 48: #define HILUNIT(d) (((((d)>>4)&7)==0)?((d)&7):(((d)>>4)&7)) ! 49: ! 50: #define hildevmask(d) (1 << (d)) ! 51: #define hilqmask(q) (1 << (q)) ! 52: ! 53: struct hiliqueue { ! 54: HILQ *hq_eventqueue; /* input queue shared with user */ ! 55: struct proc *hq_procp; /* process this queue belongs to */ ! 56: char hq_devmask; /* devices mapped to this queue */ ! 57: }; ! 58: ! 59: struct hilloopdev { ! 60: int hd_flags; /* device state */ ! 61: int hd_qmask; /* queues this device is mapped to */ ! 62: struct clist hd_queue; /* event queue for HPUX-style input */ ! 63: struct proc *hd_selr; /* process read selecting */ ! 64: uid_t hd_uid; /* uid of mapping process */ ! 65: }; ! 66: ! 67: /* hd_flags */ ! 68: #define HIL_ALIVE 0x01 /* device is present */ ! 69: #define HIL_PSEUDO 0x02 /* device is virtual */ ! 70: #define HIL_READIN 0x04 /* device using read() input interface */ ! 71: #define HIL_QUEUEIN 0x08 /* device using shared Q input interface */ ! 72: #define HIL_SELCOLL 0x10 /* select collision on device */ ! 73: #define HIL_NOBLOCK 0x20 /* device is in non-blocking read mode */ ! 74: #define HIL_ASLEEP 0x40 /* process awaiting input on device */ ! 75: #define HIL_DERROR 0x80 /* loop has reconfigured, reality altered */ ! 76: ! 77: struct hilloop { ! 78: struct hil_dev *hl_addr; /* base of hardware registers */ ! 79: u_char hl_cmddone; /* */ ! 80: u_char hl_cmdending; /* */ ! 81: u_char hl_actdev; /* current input device */ ! 82: u_char hl_cmddev; /* device to perform command on */ ! 83: u_char hl_pollbuf[HILBUFSIZE]; /* interrupt time input buffer */ ! 84: u_char hl_cmdbuf[HILBUFSIZE]; /* */ ! 85: u_char *hl_pollbp; /* pointer into hl_pollbuf */ ! 86: u_char *hl_cmdbp; /* pointer into hl_cmdbuf */ ! 87: struct hiliqueue hl_queue[NHILQ]; /* input queues */ ! 88: struct hilloopdev hl_device[NHILD]; /* device data */ ! 89: u_char hl_maxdev; /* number of devices on loop */ ! 90: u_char hl_kbddev; /* keyboard device on loop */ ! 91: u_char hl_kbdlang; /* keyboard language */ ! 92: u_char hl_kbdflags; /* keyboard state */ ! 93: }; ! 94: ! 95: /* hl_kbdflags */ ! 96: #define KBD_RAW 0x01 /* keyboard is raw */ ! 97: #define KBD_AR1 0x02 /* keyboard auto-repeat rate 1 */ ! 98: #define KBD_AR2 0x04 /* keyboard auto-repeat rate 2 */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.