|
|
1.1 ! root 1: #ifndef SDEV_H ! 2: #define SDEV_H ! 3: ! 4: /* ! 5: *-IMPORTS: ! 6: * <sys/compat.h> ! 7: * PROTO () ! 8: */ ! 9: ! 10: #include <sys/compat.h> ! 11: ! 12: #ifndef SYMBOL_T ! 13: #define SYMBOL_T ! 14: typedef struct symbol symbol_t; ! 15: #endif ! 16: ! 17: #ifndef MDEV_T ! 18: #define MDEV_T ! 19: typedef struct mdevice mdev_t; ! 20: #endif ! 21: ! 22: #ifndef SDEV_T ! 23: #define SDEV_T ! 24: typedef struct sdevice sdev_t; ! 25: #endif ! 26: ! 27: #ifndef SDLIST_T ! 28: #define SDLIST_T ! 29: typedef struct sdlist sdlist_t; ! 30: #endif ! 31: ! 32: ! 33: typedef unsigned int unit_t; ! 34: typedef unsigned int ipl_t; ! 35: typedef unsigned int itype_t; ! 36: typedef unsigned int vec_t; ! 37: typedef unsigned long cma_t; ! 38: typedef unsigned long ioa_t; ! 39: ! 40: ! 41: struct sdevice { ! 42: mdev_t * sd_mdevp; /* master device entry */ ! 43: sdev_t * sd_mnext; /* next unit on master device */ ! 44: sdev_t * sd_next; /* next unit on global thread */ ! 45: sdev_t * sd_link; /* for sorting */ ! 46: ! 47: symbol_t * sd_devname; /* device name */ ! 48: int sd_config; /* configuration flag */ ! 49: unit_t sd_unit; /* unit number */ ! 50: ipl_t sd_ipl; /* ipl to run interrupt routine */ ! 51: itype_t sd_itype; /* type of interrupt scheme */ ! 52: vec_t sd_vector; /* interrupt vector number */ ! 53: ! 54: ioa_t sd_ioa [2]; /* I/O address range */ ! 55: cma_t sd_cma [2]; /* controller address space range */ ! 56: }; ! 57: ! 58: ! 59: /* ! 60: * Structure for holding a list of "sdevice" structures. ! 61: */ ! 62: ! 63: struct sdlist { ! 64: sdev_t * sdl_first; ! 65: sdev_t * sdl_last; ! 66: int sdl_count; ! 67: }; ! 68: ! 69: ! 70: /* ! 71: * Types for predicate suitable for passing to sdev_sort () ! 72: */ ! 73: ! 74: typedef int (* ssel_t) PROTO ((sdev_t * _sdevp)); ! 75: typedef int (* scmp_t) PROTO ((sdev_t * _left, sdev_t * _right)); ! 76: ! 77: ! 78: enum { MAX_VECTOR = 15, ! 79: MAX_IPL = 8 ! 80: }; ! 81: ! 82: enum { INT_NONE, ! 83: INT_PER_CHANNEL, ! 84: INT_PER_DEVICE, ! 85: INT_SHAREABLE, ! 86: MAX_ITYPE = INT_SHAREABLE ! 87: }; ! 88: ! 89: ! 90: EXTERN_C_BEGIN ! 91: ! 92: void read_sdev_file PROTO ((CONST char * _name)); ! 93: int sdev_check_ioa PROTO ((CONST ioa_t * _check, sdev_t ** _who)); ! 94: int sdev_check_cma PROTO ((CONST cma_t * _check, sdev_t ** _who)); ! 95: int sdev_check_vector PROTO ((int _vec, sdev_t ** _who)); ! 96: void sdev_sort PROTO ((sdlist_t * _sdlistp, ssel_t _selpred, ! 97: scmp_t _cmppred, size_t _ptroff)); ! 98: ! 99: EXTERN_C_END ! 100: ! 101: #endif /* ! defined (SDEV_T) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.