1 /*        BEGIN INCLUDE FILE ... ect_structures.incl.pl1 ... Jan 1981 */
  2 
  3 /* Modified 1984-10-28 by E. Swenson for new ipc validation and to move
  4    event_channel_name declarations from here to event_channel_name.incl.pl1 */
  5 
  6 
  7 /****^  HISTORY COMMENTS:
  8   1) change(86-08-12,Kissel), approve(86-08-12,MCR7473),
  9      audit(86-10-08,Fawcett), install(86-11-03,MR12.0-1206):
 10      Changed to support control point management.  These changes were actually
 11      done in February 1985 by G. Palter.
 12   2) change(86-08-12,Kissel), approve(86-08-12,MCR7479),
 13      audit(86-10-08,Fawcett), install(86-11-03,MR12.0-1206):
 14      Modified to eke out some flag bits by making the type fixed bin (8) in
 15      order to support async event channels.
 16                                                    END HISTORY COMMENTS */
 17 
 18 
 19 /* format: style3 */
 20 
 21 
 22 /* Definition of the Event Channel Table (ECT) header */
 23 
 24 dcl       1 ect_header        aligned based (ect_ptr),
 25             2 ect_areap       ptr,                          /* pointer to area in which ECT entries are allocated */
 26             2 ect_area_size   fixed bin (19),               /* number of words in ECT area */
 27             2 count           (-1:5) fixed bin,             /* totals of entries allocated */
 28                                                             /* -1 = waiting control points */
 29                                                             /* 0 = total entries, 1 = wait channels */
 30                                                             /* 2 = call channels, 3 = call channel messages */
 31                                                             /* 4 = ITT messages, 5 = wait channel messages */
 32             2 entry_list_ptrs (5),                          /* head and tail of lists in ECT */
 33                                                             /* 1 = wait channels, 2 = call channels */
 34                                                             /* 3 = call channel messages, 4 = ITT messages */
 35                                                             /* 5 = wait channel messages */
 36               3 firstp        ptr,                          /* head of list */
 37               3 lastp         ptr,                          /* tail of list */
 38             2 meters,
 39               3 total_wakeups fixed bin (33),               /* total wakeups sent on all channels */
 40               3 total_wait_wakeups
 41                               fixed bin (33),               /* wakeups sent on wait channels */
 42               3 total_call_wakeups
 43                               fixed bin (33),               /* wakeups sent on call channels */
 44               3 ittes_tossed  fixed bin (33),               /* number invalid ITT messages received, ignored */
 45             2 seed            fixed bin (33),               /* used to generate uid portion of channel name */
 46             2 flags,
 47               3 call_priority bit (1) unal,                 /* = "0"b if wait chns have priority - default */
 48                                                             /* = "1"b if call chans have priority */
 49               3 wakeup_control_points                       /** ON => we must wakeup other control points before */
 50                               bit (1) unaligned,            /* ... processing any event messages */
 51               3 unused1       bit (16) unaligned,
 52               3 mask_call_count
 53                               fixed bin (17) unal,          /* number times event call chans masked */
 54             2 ecit_ptr        ptr,                          /* pointer to the ECIT */
 55             2 ecit_lth        fixed bin (17),               /* length of the ECIT (see below) */
 56             2 r_offset        fixed bin (18),               /* operand used to encode/decode channel names */
 57             2 r_factor        fixed bin (35),               /* operand used to encode/decode channel names */
 58             2 last_fast_channel_events                      /** prior fast channel settings */
 59                               bit (36) aligned;
 60 
 61 dcl       ect_ptr             pointer;
 62 
 63 dcl       TOTAL               fixed bin (8) static options (constant) init (0);
 64 dcl       WAIT                fixed bin (8) static options (constant) init (1);
 65 dcl       CALL                fixed bin (8) static options (constant) init (2);
 66 dcl       EV_CALL_MESSAGE     fixed bin (8) static options (constant) init (3);
 67 dcl       ITT_MESSAGE         fixed bin (8) static options (constant) init (4);
 68 dcl       EV_WAIT_MESSAGE     fixed bin (8) static options (constant) init (5);
 69 dcl       WAITING_CP          fixed bin (8) static options (constant) init (-1);
 70                                                             /* used to index count and entry_list_ptrs arrays */
 71 
 72 
 73 /* Definition of the Event Channel Index Table (ECIT) -- Given an event channel
 74    name, ipc_validate_$decode_event_channel_name will yield an index into this
 75    table which contains a pointer to the definition of the channel (its ECT) */
 76 
 77 dcl       1 ecit              aligned based (ecit_ptr),
 78             2 ecte_ptr        (ecit_lth) pointer unaligned;
 79 
 80 dcl       ecit_ptr            pointer;
 81 dcl       ecit_lth            fixed binary (17);
 82 
 83 
 84 /* Definition of an event wait channel */
 85 
 86 dcl       1 wait_channel      aligned based (ectep),
 87             2 word_0,
 88               3 unused1       fixed bin (17) unal,
 89               3 flags         unal,
 90                 4 async_call  bit (1) unal,                 /* Only checked for call channels. */
 91                 4 pad         bit (8) unal,
 92               3 type          fixed bin (8) unal,           /* = WAIT */
 93             2 next_chanp      ptr unal,                     /* pointer to next wait channel */
 94             2 prev_chanp      ptr unal,                     /* pointer to previous wait channel */
 95             2 word_3,
 96               3 fast_channel  bit (1) unal,                 /* ON => this is a fast channel */
 97               3 inhibit_count fixed bin (16) unal,          /* number of times message reception has been inhibited */
 98               3 wakeup_control_points                       /** ON => wakeup the control points waiting on this channel */
 99                               bit (1) unaligned,
100               3 wakeup_count  fixed bin (17) unal unsigned, /* number of wakeups received over this channel */
101             2 name            bit (72),                     /* event channel name associated with this channel */
102             2 first_ev_msgp   ptr unal,                     /* pointer to first message in queue */
103             2 last_ev_msgp    ptr unal,                     /* pointer to last message in queue */
104             2 first_wcpp      ptr unal,                     /* pointer to first control point waiting on this channel */
105             2 last_wcpp       ptr unal,                     /* pointer to last control point waiting on this channel */
106             2 fast_channel_id fixed binary,                 /* index into ipc_data_$fast_channel_events */
107             2 unused2         fixed binary;                 /* pad to 12 words */
108 
109 
110 /* Definition of an event call channel */
111 
112 dcl       1 call_channel      aligned based (ectep),
113             2 word_0,
114               3 priority      fixed bin (17) unal,          /* indicated priority relative to other call chns */
115               3 flags         unal,
116                 4 async_call  bit (1) unal,                 /* Send IPS "wkp_" on wakeup. */
117                 4 pad         bit (8) unal,
118               3 type          fixed bin (8) unal,           /* = CALL */
119             2 next_chanp      ptr unal,                     /* pointer to next call channel */
120             2 prev_chanp      ptr unal,                     /* pointer to prev call channel */
121             2 word_3,
122               3 call_inhibit  bit (1) unal,                 /* = "1"b if call to associated proc in progress */
123               3 inhibit_count fixed bin (16) unal,          /* number of times message reception has been inhibited */
124               3 wakeup_control_points                       /** ON => wakeup the control point waiting on this channel */
125                               bit (1) unaligned,
126               3 wakeup_count  fixed bin (17) unal unsigned, /* number of wakeups received over this channel */
127             2 name            bit (72),                     /* event channel name associated with this channel */
128             2 first_ev_msgp   ptr unal,                     /* pointer to first message in queue */
129             2 last_ev_msgp    ptr unal,                     /* pointer to last message in queue */
130             2 data_ptr        ptr unal,                     /* pointer to associated data base */
131             2 procedure_value,                              /* procedure to call when message arrives */
132               3 procedure_ptr ptr unal,                     /* pointer to entry point */
133               3 environment_ptr
134                               ptr unal,                     /* pointer to stack frame */
135             2 control_point_id                              /** ID of control point which "owns" this channel */
136                               bit (36) aligned;
137 
138 dcl       ectep               pointer;
139 
140 
141 /* Definition of a message for either an event wait or an event call channel */
142 
143 dcl       1 event_message     aligned based,
144             2 word_0,
145               3 priority      fixed bin (17) unal,          /* priority of call channel */
146               3 type          fixed bin (17) unal,          /* = EV_CALL_MESSAGE or EV_WAIT_MESSAGE */
147             2 chanp           ptr unal,                     /* pointer to associated event channel */
148             2 message_data    like event_message_data aligned,
149                                                             /* event message as returned from ipc_$block */
150             2 next_ev_msgp    ptr unal,                     /* pointer to next event call/wait channel message */
151             2 prev_ev_msgp    ptr unal,                     /* pointer to previous event call/wait channel message */
152             2 next_chan_msgp  ptr unal,                     /* pointer to next message for this channel */
153             2 prev_chan_msgp  ptr unal;                     /* pointer to previous message for this channel */
154 
155 
156 /* Definition of an ITT message as returned from ring 0 */
157 
158 dcl       1 itt_message       aligned based,
159             2 word_0,
160               3 unused1       fixed bin (17) unal,
161               3 type          fixed bin (17) unal,
162             2 next_itt_msgp   ptr unal,                     /* pointer to next itt message entry in ECT currently */
163             2 message_data    like event_message_data aligned,
164             2 unused2         (4) fixed bin;                /* pad to 12 words */
165 
166 
167 /* Definition of an event message as returned from ring 0 */
168 
169 dcl       1 event_message_data
170                               aligned based,
171             2 channel_id      fixed bin (71),               /* event channel name */
172             2 message         fixed bin (71),               /* 72 bit message associated with wakeup */
173             2 sender          bit (36),                     /* process ID of sender */
174             2 origin,
175               3 dev_signal    bit (18) unal,                /* "1"b if device signal */
176                                                             /* "0"b if user event */
177               3 ring          fixed bin (17) unal;          /* ring of sending process */
178 
179 
180 /* Definition of a control point which is blocked on a channel */
181 
182 dcl       1 waiting_control_point
183                               aligned based (wcpp),
184             2 word_0,
185               3 block_count   fixed binary (17) unaligned,  /* # of in-progress ipc_$block calls by this control point */
186               3 type          fixed binary (17) unaligned,  /* = WAITING_CP */
187             2 control_point_id                              /** ID of the waiting control point */
188                               bit (36) aligned,
189             2 chain,
190               3 next_wcpp     pointer,                      /* pointer to previous waiting control point */
191               3 prev_wcpp     pointer,                      /* pointer to next waiting control point */
192             2 unused          (6) bit (36) aligned;         /* pad to 12 words */
193 
194 dcl       wcpp                pointer;
195 
196 /*        END INCLUDE file ... ect_structures.incl.pl1 */