home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / conf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  2.2 KB  |  114 lines

  1. /*
  2.  *    @(#) conf.h 2.2 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
  13.  * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
  14.  * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
  15.  * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
  16.  */
  17.  
  18.  
  19.  
  20. /*
  21.  * Declaration of block device switch. Each entry (row) is
  22.  * the only link between the main unix code and the driver.
  23.  * The initialization of the device switches is in the file conf.c.
  24.  */
  25. extern struct bdevsw
  26. {
  27.     char     *d_name;
  28.     int    (*d_open)();
  29.     int    (*d_close)();
  30.     int    (*d_strategy)();
  31.     struct iobuf    *d_tab;
  32. } bdevsw[];
  33.  
  34. /*
  35.  * Character device switch.
  36.  */
  37. extern struct cdevsw
  38. {
  39.     char     *d_name;
  40.     int    (*d_open)();
  41.     int    (*d_close)();
  42.     int    (*d_read)();
  43.     int    (*d_write)();
  44.     int    (*d_ioctl)();
  45.     struct tty     *d_ttys;
  46.     struct streamtab *d_str;
  47. } cdevsw[];
  48.  
  49. #define    FMNAMESZ    8
  50.  
  51. struct fmodsw {
  52.     char    f_name[FMNAMESZ+1];
  53.     struct  streamtab *f_str;
  54. };
  55. extern struct fmodsw fmodsw[];
  56.  
  57. extern    int    bdevcnt;
  58. extern    int    cdevcnt;
  59. extern    int    fmodcnt;
  60.  
  61. /*
  62.  * Line discipline switch.
  63.  */
  64. extern struct linesw
  65. {
  66.     int    (*l_open)();
  67.     int    (*l_close)();
  68.     int    (*l_read)();
  69.     int    (*l_write)();
  70.     int    (*l_ioctl)();
  71.     int    (*l_input)();
  72.     int    (*l_output)();
  73.     int    (*l_mdmint)();
  74. } linesw[];
  75.  
  76. extern    int    linecnt;
  77.  
  78. extern    int    (*vecintsw[])();
  79. extern    uchar_t    vecintflags[];
  80. extern    uchar_t    vecintlev[];
  81.  
  82. /*
  83.  * Definitions for vecintflags in c.c:
  84.  * info about vectors contained in vecintsw.
  85.  */
  86. #define SWITCH_INTR    0
  87. #define FAST_INTR    1
  88. #define    CLOCK_INTR    2
  89.  
  90. extern    int        vintmin, vintmax;
  91. extern    int        bdevcnt, bdevmax;
  92. extern    int        cdevcnt, cdevmax;
  93.  
  94. struct vecshrsw {
  95.     int        shr_ivec;        /* interrupt level */
  96.     int        (*shr_intr)( );        /* ptr to xxintr */
  97. };
  98.  
  99. extern    struct vecshrsw    vecshrsw[];
  100. extern    int        vshrcnt, vshrmax;
  101.  
  102. extern            nodev( ), nulldev( ), novec( );
  103. extern            shrvec( );
  104.  
  105. extern    int        (*dinitsw[])();
  106. extern    int        (*dhaltsw[])();
  107.  
  108. #define    EVLEN    15
  109.  
  110. struct evdevsw {            /* event devices */
  111.     char *devnam;            /* device name */
  112.     void (*eventizer)();        /* eventizing routine */
  113. };
  114.