home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / iobuf.h < prev    next >
Encoding:
Text File  |  1988-06-26  |  1.9 KB  |  50 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8.  
  9. #ident    "@(#)head.sys:iobuf.h    1.3"
  10.  
  11. /*
  12.  * Each IDFC controller has an iobuf, which contains private state data
  13.  * and 2 list heads: the b_forw/b_back list, which is doubly linked
  14.  * and has all the buffers currently associated with that major
  15.  * device; and the d_actf/d_actl list, which is private to the
  16.  * controller but in fact is always used for the head and tail
  17.  * of the I/O queue for the device.
  18.  * Various routines in bio.c look at b_forw/b_back
  19.  * (notice they are the same as in the buf structure)
  20.  * but the rest is private to each device controller.
  21.  */
  22. typedef struct iobuf
  23. {
  24.     int    b_flags;        /* see buf.h */
  25.     struct    buf *b_forw;        /* first buffer for this dev */
  26.     struct    buf *b_back;        /* last buffer for this dev */
  27.     struct    buf *b_actf;        /* head of I/O queue (b_forw)*/
  28.     struct     buf *b_actl;        /* tail of I/O queue (b_back)*/
  29.     dev_t    b_dev;            /* major+minor device name */
  30.     char    b_active;        /* busy flag */
  31.     char    b_errcnt;        /* error count (for recovery) */
  32.     int    jrqsleep;        /* process sleep counter on jrq full */
  33.     struct eblock    *io_erec;    /* error record */
  34.     int    io_nreg;        /* number of registers to log on errors */
  35.     paddr_t    io_addr;        /* local bus address */
  36.     physadr    io_mba;            /* mba address */
  37.     struct    iostat    *io_stp;    /* unit I/O statistics */
  38.     time_t    io_start;
  39.     int    sgreq;            /* SYSGEN required flag */
  40.     int    qcnt;            /* outstanding job request counter */
  41.     int    io_s1;            /* space for drivers to leave things */
  42.     int    io_s2;            /* space for drivers to leave things */
  43. } iobuf_t;
  44.  
  45. #define tabinit(dv,stat) {0,0,0,0,0,makedev(dv,0),0,00,0,0,0,0,0,stat,0,0,0,0,0}
  46. #define NDEVREG    (sizeof(struct device)/sizeof(int))
  47.  
  48. #define    B_ONCE    01    /* flag for once only driver operations */
  49. #define    B_TIME    04    /* for timeout use */
  50.