1 /* BEGIN INCLUDE FILE ... mseg_operation_data.incl.pl1 */
  2 /* Created:  April 1985 by G. Palter */
  3 
  4 /* format: style3,linecom */
  5 
  6 
  7 /* Description of a message segment primitive operation (mseg_) */
  8 
  9 declare   1 mseg_operation_data
 10                               aligned based (mseg_operation_data_ptr),
 11             2 operation_id                                  /* identifies which operation is being performed */
 12                               fixed binary (9) unaligned unsigned,
 13             2 required_data   unaligned,                    /* which parts of mseg_operation must the caller supply */
 14               3 pathname      bit (1) unaligned,
 15               3 mseg_ptr      bit (1) unaligned,
 16               3 mseg_index    bit (1) unaligned,
 17               3 access_info   bit (1) unaligned,
 18               3 md_ptr        bit (1) unaligned,
 19               3 message_info  bit (1) unaligned,
 20               3 wakeup_state  bit (1) unaligned,
 21               3 wakeup_state_version
 22                               bit (1) unaligned,
 23               3 pad           bit (1) unaligned,
 24             2 begin_flags     unaligned,                    /* controls mseg_utils_$begin_operation ... */
 25               3 lock_segment  bit (1) unaligned,            /* ON => lock the segment */
 26               3 dont_check_lock_results                     /* ON => caller (delete_seg) will check that the lock is OK */
 27                               bit (1) unaligned,
 28               3 check_header_consistency                    /* ON => check that the header looks OK */
 29                               bit (1) unaligned,
 30               3 initialize_header                           /* ON => initialize the header if the segment's empty */
 31                               bit (1) unaligned,
 32               3 check_count_consistency                     /* ON => check that the message count and chains are OK */
 33                               bit (1) unaligned,
 34               3 pad           bit (4) unaligned,
 35             2 finish_flags    unaligned,                    /* controls mseg_utils_$(finish abort)_operation */
 36               3 truncate_if_possible                        /* ON => truncate if the segment is empty */
 37                               bit (1) unaligned,
 38               3 already_salvaged                            /* ON => we've already tried to salvage this segment once */
 39                               bit (1) unaligned,
 40               3 unlock_segment                              /* ON => unlock the segment */
 41                               bit (1) unaligned,
 42               3 pad           bit (6) unaligned;
 43 
 44 declare   mseg_operation_data_ptr
 45                               pointer;
 46 
 47 
 48 /* Data in mseg_operations_ used only by mseg_utils_ */
 49 
 50 declare   mseg_operations_$names
 51                               (26) character (64) varying external;
 52 %page;
 53 /* Named constants used in mseg_operations_.cds to build the above data structures */
 54 
 55 /* format: idind31 */
 56 
 57 declare   (
 58      /*** Individual required fields */
 59           MSEG_REQUIRE_PATHNAME          initial ("400"b3),
 60           MSEG_REQUIRE_MSEG_PTR          initial ("200"b3),
 61           MSEG_REQUIRE_MSEG_INDEX        initial ("100"b3),
 62           MSEG_REQUIRE_ACCESS_INFO       initial ("040"b3),
 63           MSEG_REQUIRE_MD_PTR            initial ("020"b3),
 64           MSEG_REQUIRE_MESSAGE_INFO      initial ("010"b3),
 65           MSEG_REQUIRE_WAKEUP_STATE      initial ("004"b3),
 66           MSEG_REQUIRE_WAKEUP_STATE_VERSION
 67                                          initial ("002"b3)
 68           )                              bit (9) aligned static options (constant);
 69 
 70 declare   (
 71      /*** Commonly used groupings of required fields */
 72           MSEG_REQUIRED_FOR_MESSAGE      initial ("250"b3), /* mseg_ptr, access_info, message_info */
 73           MSEG_REQUIRED_FOR_SEGMENT      initial ("200"b3), /* mseg_ptr */
 74           MSEG_REQUIRED_FOR_FS_INTERFACE initial ("400"b3)  /* pathname */
 75           )                              bit (9) aligned static options (constant);
 76 
 77 declare   (
 78      /*** Individual begin_operation flags */
 79           MSEG_LOCK_SEGMENT              initial ("400"b3),
 80           MSEG_DONT_CHECK_LOCK_RESULTS   initial ("200"b3),
 81           MSEG_CHECK_HEADER_CONSISTENCY  initial ("100"b3),
 82           MSEG_INITIALIZE_HEADER         initial ("040"b3),
 83           MSEG_CHECK_COUNT_CONSISTENCY   initial ("020"b3)
 84           )                              bit (9) aligned static options (constant);
 85 
 86 declare   (
 87      /*** Commonly used groupings of begin_operation flags */
 88           MSEG_BEGIN_FOR_MESSAGE         initial ("520"b3), /* lock, check header, check count */
 89           MSEG_BEGIN_FOR_SEGMENT         initial ("500"b3), /* lock, check header */
 90           MSEG_BEGIN_FOR_FS_INTERFACE    initial ("000"b3)  /* no actions need be taken */
 91           )                              bit (9) aligned static options (constant);
 92 
 93 declare   (
 94      /*** Individual finish_operation flags */
 95           MSEG_TRUNCATE_IF_POSSIBLE      initial ("400"b3),
 96           MSEG_ALREADY_SALVAGED          initial ("200"b3),
 97           MSEG_UNLOCK_SEGMENT            initial ("100"b3)
 98           )                              bit (9) aligned static options (constant);
 99 
100 declare   (
101      /*** Commonly used groupings of finish_operation flags */
102           MSEG_FINISH_FOR_MESSAGE        initial ("400"b3), /* truncate if possible */
103           MSEG_FINISH_FOR_SEGMENT        initial ("400"b3), /* truncate if possible */
104           MSEG_FINISH_FOR_FS_INTERFACE   initial ("000"b3)  /* no actions need be taken */
105           )                              bit (9) aligned static options (constant);
106 
107 /* END INCLUDE FILE ... mseg_operation_data.incl.pl1 */