home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / include / saio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1979-01-10  |  863 b   |  66 lines

  1. /*
  2.  * header file for standalone package
  3.  */
  4.  
  5. /*
  6.  * io block: includes an
  7.  * inode, cells for the use of seek, etc,
  8.  * and a buffer.
  9.  */
  10. struct    iob {
  11.     char    i_flgs;
  12.     struct inode i_ino;
  13.     int i_unit;
  14.     daddr_t    i_boff;
  15.     daddr_t    i_cyloff;
  16.     off_t    i_offset;
  17.     daddr_t    i_bn;
  18.     char    *i_ma;
  19.     int    i_cc;
  20.     char    i_buf[512];
  21. };
  22.  
  23. #define F_READ    01
  24. #define F_WRITE    02
  25. #define F_ALLOC    04
  26. #define F_FILE    010
  27.  
  28.  
  29.  
  30.  
  31. /*
  32.  * dev switch
  33.  */
  34. struct devsw {
  35.     char    *dv_name;
  36.     int    (*dv_strategy)();
  37.     int    (*dv_open)();
  38.     int    (*dv_close)();
  39. };
  40.  
  41. struct devsw devsw[];
  42.  
  43. /*
  44.  * request codes. Must be the same a F_XXX above
  45.  */
  46. #define    READ    1
  47. #define    WRITE    2
  48.  
  49.  
  50. #define    NBUFS    4
  51.  
  52.  
  53. char    b[NBUFS][512];
  54. daddr_t    blknos[NBUFS];
  55.  
  56.  
  57.  
  58. #define NFILES    4
  59. struct    iob iob[NFILES];
  60.  
  61. /*
  62.  * Set to which 32Kw segment the code is physically running in.
  63.  * Must be set by the users main (or there abouts).
  64.  */
  65. int    segflag;
  66.