1 /* BEGIN INCLUDE FILE ... mseg_wakeup_state.incl.pl1 */
 2 /* Created:  April 1985 by G. Palter */
 3 
 4 /* format: style3,linecom */
 5 
 6 /* Description of the wakeup state of a message segment --
 7 
 8    The wakeup state defines which process, if any, is willing to receive normal or urgent IPC wakeups when a message which
 9    requests such a wakeup is added to a message segment.  The process is allowed to separately accept or defer normal and
10    urgent wakeups.  Note that deferring a wakeup is not the same as not accepting wakeups.  A process is not allowed to
11    stop accepting wakeups once it has accepted them as to do so would introduce a relatively high badnwidth covert
12    channel.  (In the present implementation, urgent wakeups are really no different from normal wakeups.  Eventually,
13    urgent wakeups should be implemented using an IPS signal along with the IPC wakeup).
14 
15    mseg_$get_wakeup_state_seg requires that the caller supply the proper value for mseg_wakeup_state.version in the
16    mseg_operation.  If there is no wakeup state recorded in the message segment, mseg_$get_wakeup_state_seg will return
17    the status code error_table_$messages_off.
18 
19    mseg_$set_wakeup_state_seg ignores the values of the access_class, process_id, and lock_id elements supplied by the
20    caller in the mseg_operation.  mseg_$set_wakeup_state_seg will, instead, furnish the values of the process making the
21    call for these elements and will return these values to its caller.  In other words, mseg_$set_wakeup_state_seg can not
22    be used by one process to accept/defer wakeups on behalf of another process. */
23 
24 declare   1 mseg_wakeup_state aligned based (mseg_wakeup_state_ptr),
25             2 version         character (8) unaligned,
26             2 flags           aligned,
27               3 accepting_normal_wakeups                    /* ON => process has accepted normal wakeups */
28                               bit (1) unaligned,            /* OFF => process has deferred normal wakeups */
29               3 accepting_urgent_wakeups                    /* ON => process has accepted urgent wakeups */
30                               bit (1) unaligned,            /* OFF => process has deferred urgent wakeups */
31               3 pad           bit (34) unaligned,
32             2 pad             bit (36) aligned,
33             2 event_channel   fixed binary (71),            /* IPC event channel on which to send normal/urgent wakeups */
34             2 access_class    bit (72) aligned,             /* AIM access class of the process accepting wakeups */
35             2 process_id      bit (36) aligned,             /* ID of the process accepting wakeups */
36             2 lock_id         bit (36) aligned;             /* lock ID used to test if said process is still alive */
37 
38 declare   mseg_wakeup_state_ptr
39                               pointer;
40 
41 declare   MSEG_WAKEUP_STATE_VERSION_1
42                               character (8) static options (constant) initial ("msegwkp1");
43 
44 /* END INCLUDE FILE ... mseg_wakeup_state.incl.pl1 */