THIS FILE IS DAMAGED COMPILATION LISTING OF SEGMENT !BBBJPhCHzkXgMq Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 05/09/85 0954.0 mst Thu Options: table map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1985 * 4* * * 5* *********************************************************** */ 6 7 /* Definition of the message segment primitive operations (mseg_) */ 8 9 /* Created: April 1985 by G. Palter */ 10 11 /* format: style3,linecom */ 12 13 mseg_operations_: 14 procedure () options (variable); 15 16 17 declare 1 mops aligned, 18 2 (add_acl_entries_seg, add_message, chname_seg, close_seg, compact_seg, copy_seg_source, copy_seg_target, 19 count_messages, create_seg, delete_acl_entries_seg, delete_message, delete_seg, get_salvaged_flag_seg, 20 get_wakeup_state_seg, initiate_seg, list_acl_seg, list_acl_entries_seg, open_seg, read_message, 21 replace_acl_seg, reset_salvaged_flag_seg, reset_wakeup_state_seg, set_max_length_seg, 22 set_safety_switch_seg, set_wakeup_state_seg, update_message) 23 bit (36) aligned, 24 2 names (26) character (64) varying; 25 26 27 dcl 1 cds_data aligned like cds_args; 28 29 dcl code fixed binary (35); 30 dcl last_operation_id fixed binary (9); 31 32 dcl MSEG_OPERATIONS_ character (32) static options (constant) initial ("mseg_operations_"); 33 34 dcl error_table_$bigarg fixed binary (35) external; 35 dcl error_table_$out_of_bounds 36 fixed binary (35) external; 37 38 dcl com_err_ entry () options (variable); 39 dcl create_data_segment_ 40 entry (pointer, fixed binary (35)); 41 42 dcl (addr, currentsize, hbound, length, maxlength, null, string) 43 builtin; 44 45 /* Define the mseg_operations_$OPERATION and mseg_operations_$names constants */ 46 47 last_operation_id = 0; 48 49 call operation (mops.add_acl_entries_seg, "mseg_$add_acl_entries_seg", MSEG_REQUIRED_FOR_FS_INTERFACE, 50 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 51 52 call operation (mops.add_message, "mseg_$add_message", MSEG_REQUIRED_FOR_MESSAGE, 53 MSEG_BEGIN_FOR_MESSAGE | MSEG_INITIALIZE_HEADER, MSEG_FINISH_FOR_MESSAGE); 54 55 call operation (mops.chname_seg, "mseg_$chname_seg", MSEG_REQUIRE_PATHNAME | MSEG_REQUIRE_MSEG_PTR, 56 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 57 58 call operation (mops.close_seg, "mseg_$close_seg", MSEG_REQUIRE_MSEG_PTR | MSEG_REQUIRE_MSEG_INDEX, 59 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 60 61 call operation (mops.compact_seg, "mseg_$compact_seg", MSEG_REQUIRED_FOR_SEGMENT, MSEG_BEGIN_FOR_MESSAGE, 62 MSEG_FINISH_FOR_MESSAGE); /* compaction requires working with the individual messages */ 63 64 call operation (mops.copy_seg_source, "mseg_$copy_seg", MSEG_REQUIRED_FOR_SEGMENT, MSEG_BEGIN_FOR_MESSAGE, 65 MSEG_FINISH_FOR_MESSAGE); /* copying requires working with the individual messages */ 66 call operation (mops.copy_seg_target, "mseg_$copy_seg", MSEG_REQUIRED_FOR_SEGMENT, MSEG_LOCK_SEGMENT, 67 MSEG_FINISH_FOR_SEGMENT); 68 69 call operation (mops.count_messages, "mseg_$count_messages", MSEG_REQUIRE_MSEG_PTR | MSEG_REQUIRE_ACCESS_INFO, 70 MSEG_BEGIN_FOR_MESSAGE, MSEG_FINISH_FOR_MESSAGE); 71 /* there's no individual message for which we'd need info */ 72 73 call operation (mops.create_seg, "mseg_$create_seg", MSEG_REQUIRED_FOR_FS_INTERFACE, 74 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 75 76 call operation (mops.delete_acl_entries_seg, "mseg_$delete_acl_entries_seg", MSEG_REQUIRED_FOR_FS_INTERFACE, 77 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 78 79 call operation (mops.delete_message, "mseg_$delete_message", MSEG_REQUIRED_FOR_MESSAGE, MSEG_BEGIN_FOR_MESSAGE, 80 MSEG_FINISH_FOR_MESSAGE); 81 82 call operation (mops.delete_seg, "mseg_$delete_seg", MSEG_REQUIRE_MSEG_PTR, 83 MSEG_LOCK_SEGMENT | MSEG_DONT_CHECK_LOCK_RESULTS, MSEG_FINISH_FOR_FS_INTERFACE); 84 85 call operation (mops.get_salvaged_flag_seg, "mseg_$get_salvaged_flag_seg", MSEG_REQUIRED_FOR_SEGMENT, 86 MSEG_BEGIN_FOR_SEGMENT, MSEG_FINISH_FOR_SEGMENT); 87 88 call operation (mops.get_wakeup_state_seg, "mseg_$get_wakeup_state_seg", 89 MSEG_REQUIRED_FOR_SEGMENT | MSEG_REQUIRE_WAKEUP_STATE_VERSION, MSEG_BEGIN_FOR_SEGMENT, 90 MSEG_FINISH_FOR_SEGMENT); 91 92 call operation (mops.initiate_seg, "mseg_$initiate_seg", MSEG_REQUIRED_FOR_FS_INTERFACE, 93 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 94 95 call operation (mops.list_acl_seg, "mseg_$list_acl_seg", MSEG_REQUIRED_FOR_FS_INTERFACE, 96 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 97 98 call operation (mops.list_acl_entries_seg, "mseg_$list_acl_entries_seg", MSEG_REQUIRED_FOR_FS_INTERFACE, 99 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 100 101 call operation (mops.open_seg, "mseg_$open_seg", MSEG_REQUIRE_MSEG_PTR, MSEG_BEGIN_FOR_FS_INTERFACE, 102 MSEG_FINISH_FOR_FS_INTERFACE); 103 104 call operation (mops.read_message, "mseg_$read_message", MSEG_REQUIRED_FOR_MESSAGE, MSEG_BEGIN_FOR_MESSAGE, 105 MSEG_FINISH_FOR_MESSAGE); 106 107 call operation (mops.replace_acl_seg, "mseg_$replace_acl_seg", MSEG_REQUIRED_FOR_FS_INTERFACE, 108 MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 109 110 call operation (mops.reset_salvaged_flag_seg, "mseg_$reset_salvaged_flag_seg", 111 MSEG_REQUIRED_FOR_SEGMENT | MSEG_REQUIRE_ACCESS_INFO, MSEG_BEGIN_FOR_SEGMENT, MSEG_FINISH_FOR_SEGMENT); 112 113 call operation (mops.reset_wakeup_state_seg, "mseg_$reset_wakeup_state_seg", MSEG_REQUIRED_FOR_SEGMENT, 114 MSEG_BEGIN_FOR_SEGMENT, MSEG_FINISH_FOR_SEGMENT); 115 116 call operation (mops.set_max_length_seg, "mseg_$set_max_length_seg", MSEG_REQUIRED_FOR_SEGMENT, 117 MSEG_BEGIN_FOR_SEGMENT | MSEG_CHECK_COUNT_CONSISTENCY, MSEG_FINISH_FOR_SEGMENT); 118 119 call operation (mops.set_safety_switch_seg, "mseg_$set_safety_switch_seg", 120 MSEG_REQUIRE_PATHNAME | MSEG_REQUIRE_MSEG_PTR, MSEG_BEGIN_FOR_FS_INTERFACE, MSEG_FINISH_FOR_FS_INTERFACE); 121 122 call operation (mops.set_wakeup_state_seg, "mseg_$set_wakeup_state_seg", 123 MSEG_REQUIRED_FOR_SEGMENT | MSEG_REQUIRE_WAKEUP_STATE, MSEG_BEGIN_FOR_SEGMENT, MSEG_FINISH_FOR_SEGMENT); 124 125 call operation (mops.update_message, "mseg_$update_message", MSEG_REQUIRED_FOR_MESSAGE, MSEG_BEGIN_FOR_MESSAGE, 126 MSEG_FINISH_FOR_MESSAGE); 127 128 129 /* Create the data segment */ 130 131 cds_data.sections (1).p = addr (mops); 132 cds_data.sections (1).len = currentsize (mops); 133 cds_data.sections (1).struct_name = "mops"; 134 135 cds_data.seg_name = MSEG_OPERATIONS_; 136 cds_data.num_exclude_names = 0; 137 cds_data.exclude_array_ptr = null (); 138 string (cds_data.switches) = ""b; 139 cds_data.have_text = "1"b; 140 141 call create_data_segment_ (addr (cds_data), code); 142 if code ^= 0 143 then call com_err_ (code, MSEG_OPERATIONS_); 144 145 RETURN_FROM_MSEG_OPERATIONS_: 146 return; 147 148 /* Define a single operation */ 149 150 operation: 151 procedure (p_operation_value, p_operation_name, p_required_for_operation, p_begin_for_operation, 152 p_finish_for_operation); 153 154 dcl p_operation_value bit (36) aligned parameter; 155 dcl p_operation_name character (*) parameter; 156 dcl (p_required_for_operation, p_begin_for_operation, p_finish_for_operation) 157 bit (9) aligned parameter; 158 159 if last_operation_id >= hbound (mops.names, 1) 160 then do; 161 call com_err_ (error_table_$out_of_bounds, MSEG_OPERATIONS_, 162 "^/^5xIncrease the dimension of the mops.names array and recompile."); 163 go to RETURN_FROM_MSEG_OPERATIONS_; 164 end; 165 166 last_operation_id = last_operation_id + 1; 167 168 mseg_operation_data_ptr = addr (p_operation_value); 169 mseg_operation_data.operation_id = last_operation_id; 170 string (mseg_operation_data.required_data) = p_required_for_operation; 171 string (mseg_operation_data.begin_flags) = p_begin_for_operation; 172 string (mseg_operation_data.finish_flags) = p_finish_for_operation; 173 174 if length (p_operation_name) > maxlength (mops.names (last_operation_id)) 175 then do; 176 call com_err_ (error_table_$bigarg, MSEG_OPERATIONS_, 177 "Operation name ""^a"".^/^5xIncrease the maxlength of mops.names and recompile.", 178 p_operation_name); 179 go to RETURN_FROM_MSEG_OPERATIONS_; 180 end; 181 182 mops.names (last_operation_id) = p_operation_name; 183 184 return; 185 186 end operation; 187 188 /* format: off */ 189 /* BEGIN INCLUDE FILE ... mseg_operation_data.incl.pl1 */ 1 2 /* Created: April 1985 by G. Palter */ 1 3 1 4 /* format: style3,linecom */ 1 5 1 6 1 7 /* Description of a message segment primitive operation (mseg_) */ 1 8 1 9 declare 1 mseg_operation_data 1 10 aligned based (mseg_operation_data_ptr), 1 11 2 operation_id /* identifies which operation is being performed */ 1 12 fixed binary (9) unaligned unsigned, 1 13 2 required_data unaligned, /* which parts of mseg_operation must the caller supply */ 1 14 3 pathname bit (1) unaligned, 1 15 3 mseg_ptr bit (1) unaligned, 1 16 3 mseg_index bit (1) unaligned, 1 17 3 access_info bit (1) unaligned, 1 18 3 md_ptr bit (1) unaligned, 1 19 3 message_info bit (1) unaligned, 1 20 3 wakeup_state bit (1) unaligned, 1 21 3 wakeup_state_version 1 22 bit (1) unaligned, 1 23 3 pad bit (1) unaligned, 1 24 2 begin_flags unaligned, /* controls mseg_utils_$begin_operation ... */ 1 25 3 lock_segment bit (1) unaligned, /* ON => lock the segment */ 1 26 3 dont_check_lock_results /* ON => caller (delete_seg) will check that the lock is OK */ 1 27 bit (1) unaligned, 1 28 3 check_header_consistency /* ON => check that the header looks OK */ 1 29 bit (1) unaligned, 1 30 3 initialize_header /* ON => initialize the header if the segment's empty */ 1 31 bit (1) unaligned, 1 32 3 check_count_consistency /* ON => check that the message count and chains are OK */ 1 33 bit (1) unaligned, 1 34 3 pad bit (4) unaligned, 1 35 2 finish_flags unaligned, /* controls mseg_utils_$(finish abort)_operation */ 1 36 3 truncate_if_possible /* ON => truncate if the segment is empty */ 1 37 bit (1) unaligned, 1 38 3 already_salvaged /* ON => we've already tried to salvage this segment once */ 1 39 bit (1) unaligned, 1 40 3 unlock_segment /* ON => unlock the segment */ 1 41 bit (1) unaligned, 1 42 3 pad bit (6) unaligned; 1 43 1 44 declare mseg_operation_data_ptr 1 45 pointer; 1 46 1 47 1 48 /* Data in mseg_operations_ used only by mseg_utils_ */ 1 49 1 50 declare mseg_operations_$names 1 51 (26) character (64) varying external; 1 52 1 53 /* Named constants used in mseg_operations_.cds to build the above data structures */ 1 54 1 55 /* format: idind31 */ 1 56 1 57 declare ( 1 58 /*** Individual required fields */ 1 59 MSEG_REQUIRE_PATHNAME initial ("400"b3), 1 60 MSEG_REQUIRE_MSEG_PTR initial ("200"b3), 1 61 MSEG_REQUIRE_MSEG_INDEX initial ("100"b3), 1 62 MSEG_REQUIRE_ACCESS_INFO initial ("040"b3), 1 63 MSEG_REQUIRE_MD_PTR initial ("020"b3), 1 64 MSEG_REQUIRE_MESSAGE_INFO initial ("010"b3), 1 65 MSEG_REQUIRE_WAKEUP_STATE initial ("004"b3), 1 66 MSEG_REQUIRE_WAKEUP_STATE_VERSION 1 67 initial ("002"b3) 1 68 ) bit (9) aligned static options (constant); 1 69 1 70 declare ( 1 71 /*** Commonly used groupings of required fields */ 1 72 MSEG_REQUIRED_FOR_MESSAGE initial ("250"b3), /* mseg_ptr, access_info, message_info */ 1 73 MSEG_REQUIRED_FOR_SEGMENT initial ("200"b3), /* mseg_ptr */ 1 74 MSEG_REQUIRED_FOR_FS_INTERFACE initial ("400"b3) /* pathname */ 1 75 ) bit (9) aligned static options (constant); 1 76 1 77 declare ( 1 78 /*** Individual begin_operation flags */ 1 79 MSEG_LOCK_SEGMENT initial ("400"b3), 1 80 MSEG_DONT_CHECK_LOCK_RESULTS initial ("200"b3), 1 81 MSEG_CHECK_HEADER_CONSISTENCY initial ("100"b3), 1 82 MSEG_INITIALIZE_HEADER initial ("040"b3), 1 83 MSEG_CHECK_COUNT_CONSISTENCY initial ("020"b3) 1 84 ) bit (9) aligned static options (constant); 1 85 1 86 declare ( 1 87 /*** Commonly used groupings of begin_operation flags */ 1 88 MSEG_BEGIN_FOR_MESSAGE initial ("520"b3), /* lock, check header, check count */ 1 89 MSEG_BEGIN_FOR_SEGMENT initial ("500"b3), /* lock, check header */ 1 90 MSEG_BEGIN_FOR_FS_INTERFACE initial ("000"b3) /* no actions need be taken */ 1 91 ) bit (9) aligned static options (constant); 1 92 1 93 declare ( 1 94 /*** Individual finish_operation flags */ 1 95 MSEG_TRUNCATE_IF_POSSIBLE initial ("400"b3), 1 96 MSEG_ALREADY_SALVAGED initial ("200"b3), 1 97 MSEG_UNLOCK_SEGMENT initial ("100"b3) 1 98 ) bit (9) aligned static options (constant); 1 99 1 100 declare ( 1 101 /*** Commonly used groupings of finish_operation flags */ 1 102 MSEG_FINISH_FOR_MESSAGE initial ("400"b3), /* truncate if possible */ 1 103 MSEG_FINISH_FOR_SEGMENT initial ("400"b3), /* truncate if possible */ 1 104 MSEG_FINISH_FOR_FS_INTERFACE initial ("000"b3) /* no actions need be taken */ 1 105 ) bit (9) aligned static options (constant); 1 106 1 107 /* END INCLUDE FILE ... mseg_operation_data.incl.pl1 */ 189 190 /* BEGIN INCLUDE FILE cds_args.incl.pl1 */ 2 2 2 3 dcl 1 cds_args based aligned, 2 4 2 sections (2), 2 5 3 p ptr, /* pointer to data for text/static section */ 2 6 3 len fixed bin (18), /* size of text/static section */ 2 7 3 struct_name char (32), /* name of declared structure for this section */ 2 8 2 seg_name char (32), /* name to create segment by */ 2 9 2 num_exclude_names fixed bin, /* number of names in exclude array */ 2 10 2 exclude_array_ptr ptr, /* pointer to array of exclude names */ 2 11 2 switches, /* control switches */ 2 12 3 defs_in_link bit (1) unal, /* says put defs in linkage */ 2 13 3 separate_static bit (1) unal, /* says separate static section is wanted */ 2 14 3 have_text bit (1) unal, /* ON if text sectMultics ? L^ MR MX.25 ASCII_CRT_E L^ *eF BNg Bdp BNg CDC L} L9u[X.25 ASCII_CRT_E L@' t Curry