1 /* BEGIN INCLUDE................... imp_wired_buffers ........... */
  2 
  3 /* FOR IMP DIM */
  4 
  5 /* This file defines the structure of wired buffers
  6    to be used by IMP DIM for sending messages out. */
  7 
  8 
  9 /* Structure maintained in imp_data so that it remains wired
 10    all the time. It is needed by the interrupt side to
 11    determine whether or not a page is wired before touching the page */
 12 
 13 dcl  imp_data$wbuf ext aligned;
 14 dcl 1 wbuf based aligned,
 15     2 swb_pages fixed bin,                                  /* number of pages in use for small wired buffers */
 16     2 lwb_pages fixed bin,                                  /* number of pages in use for large wired buffers */
 17     2 total_pages fixed bin,                                /* = swb_pages + lwb_pages + 1 (for emergency) */
 18     2 page_wired (0:35) bit (1) unaligned,                  /* If on corresponding page _^Hm_^Hu_^Hs_^Ht be wired */
 19     2 page_tobe_unwired (0:35) bit (1) unaligned;           /* If on corresponding page _^Hm_^Ha_^Hy be unwired. */
 20 
 21 dcl (buffers_wired,
 22      buffers_tobe_unwired) bit (36) aligned based;          /* Structure for examining entire array */
 23 
 24 /* Actual buffers are in the segment imp_wired_buffers$.
 25    This segment consists of pages. Each page has
 26    a page header at the beginning followed by buffers.
 27    A page contains either small or large buffers but
 28    not both kinds. The page header for both the
 29    large and small buffer pages are identical except
 30    except for one bit which is on in the small
 31    buffer pages and off in the large buffer pages. */
 32 
 33 
 34 dcl  imp_wired_buffers$ ext aligned;
 35 
 36 
 37 /* Structure of the wired buffer segment */
 38 
 39 dcl 1 iwb based aligned,
 40     2 pages (0:255) bit (36*1024) aligned;                  /* It is a sequence of pages */
 41 
 42 
 43 /* Structure of (buffer) pages */
 44 
 45 dcl 1 swbpage aligned based,                                /* small wired buffer page */
 46     2 header like wbp_header,                               /* It is a page header followed by ... */
 47     2 buffer (0:30) like swbuffer;                          /* an array of small wired buffers */
 48 
 49 dcl 1 lwbpage based aligned,                                /* large wired buffer page */
 50     2 header like wbp_header,                               /* It is a page header followed by ... */
 51     2 buffer (0:3) like lwbuffer;                           /* an array of large wired buffers */
 52 
 53 
 54 /* Structure of buffer page header (common to small and large) */
 55 
 56 dcl 1 wbp_header based aligned,                             /* _^Hwired _^Hbuffer _^Hpage header */
 57     2 small_buffers bit (1) aligned,                        /* On if page contains small buffers */
 58     2 wiring_needed fixed bin,                              /* Number of buffers that are wired in this page */
 59     2 times_unwired fixed bin,                              /* Number of times this page has been unwired. */
 60     2 filler1 fixed bin,
 61     2 total_time_wired fixed bin (71),
 62     2 time_last_wired fixed bin (71),
 63     2 filler2 (24) bit (36) aligned;                        /* Page header is 32 words long */
 64 
 65 
 66 /* Structure of small and large buffers and a structure common to both */
 67 
 68 dcl 1 swbuffer aligned based,                               /* Structure of _^Hsmall _^Hwired buffer */
 69     2 header like wbheader,                                 /* It is buffer header followed by .... */
 70     2 text bit (936);                                       /* the text. */
 71 
 72 dcl 1 lwbuffer aligned based,                               /* Structure of _^Hlarge _^Hwired buffer */
 73     2 header like wbheader,                                 /* It is buffer header followed by .... */
 74     2 text bit (8040),                                      /* the text, followed by .... */
 75     2 filler bit (648);                                     /* the filler */
 76 
 77 dcl 1 wbuffer aligned based,                                /* Structure common to small and large buffers */
 78     2 header like wbheader,
 79     2 text bit (4096);
 80 
 81 dcl  wbufferp pointer;                                      /* Pointer used to reference a wired buffer */
 82 
 83 
 84 /* Structure of buffer header */
 85 
 86 dcl 1 wbheader aligned based,
 87     2 misc aligned,
 88       3 filler1 bit (2) unaligned,
 89       3 in_use bit (1) unaligned,
 90       3 page bit (9) unaligned,                             /* The page number where this page belongs */
 91       3 filler bit (24) unaligned,
 92     2 thread aligned,                                       /* bufferq thread */
 93       3 (forward,
 94      backward) bit (18) unaligned,
 95     2 (max_bits,
 96      bit_offset,
 97      bit_length) fixed bin,
 98     2 filler bit (36);                                      /* Wired buffer header is six words long */
 99 
100 
101 /* The foolowing structure represents user supplied area in which
102    wired buffer page headers may be copied. */
103 
104 dcl 1 wbp_header_array (0:255) aligned based,
105     2 wbp_header like wbp_header;
106 
107 
108 /* END INCLUDE.................... imp_wired_buffers............ */