COMPILATION LISTING OF SEGMENT vrmu_cv_vf_desc_to_ptr Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/23/85 1345.4 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 vrmu_cv_vf_desc_to_ptr: proc (I_iocb_ptr, I_vfile_desc, O_record_ptr, O_record_len, O_code); 7 8 /* BEGIN_DESCRIPTION 9* 10*The purpose of this procedure is to convert a vfile descriptor to 11*a pointer to the vfile_record. 12* 13* END_DESCRIPTION 14* 15*HISTORY 16* 17*83-05-18 Roger Lackey : Originally written. 18* 19*84-12-17 Thanh Nguyen : Added code to return code as mrds_error_$inconsistent_data_length 20*in case of record length is zero or record was deleted by another process 21*running in parallel. 22**/ 23 24 dcl I_iocb_ptr ptr parameter; 25 dcl I_vfile_desc fixed bin (35) aligned parameter; 26 dcl O_record_ptr ptr parameter; 27 dcl O_record_len fixed bin (21) parameter; 28 dcl O_code fixed bin (35) parameter; 29 dcl code fixed bin (35); 30 dcl com_err_ entry () options (variable); 31 32 33 O_code, code = 0; 34 O_record_ptr = null; 35 O_record_len = 0; 36 37 indx_cb_ptr = I_iocb_ptr -> iocb.open_data_ptr; 38 desc = I_vfile_desc; 39 40 vfd_ptr = addr (desc); 41 42 loop: if vfd.comp > hbound (seg_ptr_array, 1) then call extend_seg_ptr_array; 43 44 if seg_ptr_array (vfd.comp) = null then do; 45 call msf_manager_$get_ptr (indx_cb.fcb_ptr, (vfd.comp), DONT_CREATE, 46 seg_ptr_array (vfd.comp), bcnt, O_code); 47 if O_code ^= 0 then 48 return; 49 end; 50 51 block_ptr = addrel (seg_ptr_array (vfd.comp), vfd.offset); 52 if block_ptr -> record_block_structure.reserved.stationary = "0"b then do; 53 record_len = length (block_ptr -> record_block_structure.block_tail.record); 54 O_record_ptr = addrel (addr (block_ptr -> record_block_structure.block_tail.record), 1); 55 end; 56 else do; 57 if block_ptr -> record_block_structure.reserved.indirect then do; 58 desc = block_ptr -> ind_structure.prev_desc; 59 goto loop; 60 end; 61 record_len = length (block_ptr -> stat_structure.record); 62 O_record_ptr = addrel (addr (block_ptr -> stat_structure.record), 1); 63 end; 64 if record_len = 0 | block_ptr -> block_head.is_this_block_free = "1"b then O_code = mrds_error_$inconsistent_data_length; 65 else O_record_len = record_len; 66 67 return; 68 69 extend_seg_ptr_array: proc; 70 71 old_array_limit = seg_ptr_array_limit; 72 old_array_ptr = seg_ptr_array_ptr; 73 f_b_ptr = indx_cb.file_base_ptr; 74 seg_ptr_array_limit = file_base.last_comp_num; 75 allocate seg_ptr_array in (get_system_free_area_ () -> cb_area) set (seg_ptr_array_ptr); 76 77 do i = 0 to old_array_limit; 78 seg_ptr_array (i) = old_array (i); 79 end; 80 do i = old_array_limit + 1 to seg_ptr_array_limit; 81 seg_ptr_array (i) = null (); 82 end; 83 84 free old_array; /* in systemfree */ 85 86 87 dcl cb_area area based; 88 dcl get_system_free_area_ entry () returns (ptr); 89 dcl i fixed bin; 90 dcl old_array_limit fixed bin; 91 dcl old_array_ptr ptr; 92 dcl old_array (0:old_array_limit) ptr based (old_array_ptr); 93 94 end extend_seg_ptr_array; 95 96 1 1 /* the control block */ 1 2 dcl indx_cb_ptr ptr; 1 3 dcl 1 indx_cb based (indx_cb_ptr), /* except as noted, init by create cb */ 1 4 2 fcb_ptr ptr, 1 5 2 file_base_ptr ptr, 1 6 2 node_length fixed, /* number of bytes in node, init by create_seg_ptrs */ 1 7 2 half_node_length fixed, /* init by create_seg_ptrs */ 1 8 2 max_record_size fixed (21), /* init by create_seg_ptrs */ 1 9 2 seg_ptr_array_ptr ptr, /* init by create seg_ptrs */ 1 10 2 seg_ptr_array_limit 1 11 fixed, /* init by create seg_ptrs */ 1 12 2 mode fixed, 1 13 2 is_sequential_open bit (1) aligned, 1 14 2 is_read_only bit (1) aligned, 1 15 2 is_ks_out bit (1) aligned, /* position info */ 1 16 2 position_stack_ptr ptr, /* init by create_position stack */ 1 17 2 position_stack_height 1 18 fixed, /* init by create position stack */ 1 19 2 root_position_ptr ptr, /* init by create_position_stack */ 1 20 2 file_position_ptr ptr, /* not init */ 1 21 2 change_position_ptr 1 22 ptr, /* not init */ 1 23 /* auxiliary variables */ 1 24 2 rover_seg_ptr ptr, /* init by create_seg_ptrs */ 1 25 2 index_state_ptr ptr, /* init by create_seg_ptrs */ 1 26 2 old_index_height fixed, 1 27 2 old_last_comp_num fixed, 1 28 2 last_change_count fixed (35), 1 29 2 wait_time fixed (35), 1 30 2 old_rover_comp_num fixed, 1 31 2 file_state_ptr ptr, 1 32 2 o_s_ptr ptr, 1 33 2 repeating bit (1) aligned, 1 34 2 next_substate fixed, 1 35 2 file_program_version 1 36 fixed, /* used for record_lock compatibility */ 1 37 2 leave_locked bit (1) aligned, /* indicates use of set_file_lock order */ 1 38 2 dup_ok bit (1) aligned, /* if set, duplicate keys may occur */ 1 39 2 read_exclu bit (1) aligned, /* set when lock excludes readers */ 1 40 2 pos_incorrect bit (1) aligned, /* indicates index position is not current */ 1 41 2 saved_lock_copy bit (36) aligned, /* copy of process lock_id */ 1 42 2 min_key_len fixed, /* non-zero only in old programs */ 1 43 2 stat bit (1) aligned, /* causes write_record to create stationary records */ 1 44 2 current_subset fixed (34), /* used with select order */ 1 45 2 last_subset fixed (34), 1 46 2 subset_count fixed (34), /* count of descriptors in current subset */ 1 47 2 temp_iocbp ptr, /* temporary file used to implement select order */ 1 48 2 trans bit (1) aligned, /* set if -transaction attachment */ 1 49 2 transaction_code fixed (35), /* set for control switch only */ 1 50 2 tcfp ptr, /* ptr to iocb for transaction control switch--if applicable */ 1 51 2 reflp ptr, /* ptr to ref list file, set only in transaction control file */ 1 52 2 uid bit (36) aligned, /* used under -transaction */ 1 53 2 collection_delay_time 1 54 fixed (35), /* microseconds to wait before garbage removal */ 1 55 2 min_res fixed (21), /* for min_block_size order */ 1 56 2 min_cap fixed (21), /* also for min_block_size order */ 1 57 2 subset_selected bit (2) aligned, /* first bit for select, second 1 58* bit is for exclude */ 1 59 2 error, /* for error_status order */ 1 60 3 type fixed, /* only one error type supported now */ 1 61 3 requested fixed (34), /* skip arg given to position entry */ 1 62 3 received fixed (34), /* actual successful skips */ 1 63 2 state_vars, 1 64 3 fixed_state_part, 1 65 4 shared bit (1) aligned, 1 66 4 next_record_position 1 67 fixed, /* 0, 1, or 2 */ 1 68 4 current_record_is_valid 1 69 bit (1) aligned, 1 70 4 ready_to_write bit (1) aligned, 1 71 4 at_eof_or_bof, 1 72 5 at_bof bit (1) unal, 1 73 5 at_eof bit (1) unal, 1 74 5 pad bit (36) unal, 1 75 4 outside_index bit (1) aligned, /* set after deleting current key or after use of record_status with locate switch */ 1 76 4 current_descrip 1 77 fixed (35), /* needed when outside index */ 1 78 4 saved_descrip fixed (35), /* for restoring index position */ 1 79 4 skip_state fixed, /* controls scanning of deleted entries */ 1 80 3 new_key char (256) var; 1 81 1 82 dcl current_t_code fixed (35) based (addr (indx_cb.tcfp -> iocb.open_data_ptr -> indx_cb.transaction_code)); 1 83 1 84 /* component locator structures */ 1 85 dcl seg_ptr_array (0:seg_ptr_array_limit) ptr based (seg_ptr_array_ptr); 1 86 dcl seg_ptr ptr; 1 87 dcl seg_array (0:262143) fixed (19) based (seg_ptr) aligned; 1 88 dcl designator fixed (35); 1 89 dcl 1 ind_des_structure based, 1 90 2 comp fixed (17) unal, 1 91 2 offset bit (18) unal; 1 92 dcl 1 stat_structure based, 1 93 2 pad bit (26) unal, 1 94 2 ref_count_after fixed (16) unsigned unal, 1 95 2 ind_comp fixed (13) unal, 1 96 2 ref_count fixed (16) unsigned unal, 1 97 2 record_lock bit (36) aligned, 1 98 2 modifier fixed (35), 1 99 2 time_stamp_words fixed (71) aligned, 1 100 2 prev_mod fixed (35), 1 101 2 record char (1000000) var; 1 102 dcl 1 ind_structure based, 1 103 2 pad bit (26) unal, 1 104 2 ref_count_after fixed (16) unsigned unal, 1 105 2 ind_comp fixed (13) unal, 1 106 2 ref_count fixed (16) unsigned unal, 1 107 2 record_lock bit (36) aligned, 1 108 2 modifier fixed (35), 1 109 2 time_stamp_words fixed (71) aligned, 1 110 2 prev_mod fixed (35), 1 111 2 prev_desc fixed (35); 1 112 dcl 1 time_stamp_structure based, 1 113 2 ind_offset bit (18) unal, 1 114 2 time_last_modified fixed (54) unsigned unal; 1 115 dcl 1 record_block_structure 1 116 based, 1 117 2 reserved aligned, /* data used by change_record_list */ 1 118 3 pad bit (2) unal, 1 119 3 block_size fixed (19) unal, 1 120 3 lock_flag bit (1) unal, /* record lock flag */ 1 121 3 stationary bit (1) unal, 1 122 3 indirect bit (1) unal, 1 123 3 after_applies bit (1) unal, 1 124 3 mbz bit (10) unal, 1 125 2 block_tail, /* structure varies with record type */ 1 126 3 record char (1000000) var; /* non-stat record location */ 1 127 dcl 1 designator_struct aligned based (addr (designator)), 1 128 2 comp_num fixed (17) unal, 1 129 2 offset bit (18) unal; 1 130 1 131 /* position and node templates */ 1 132 dcl 1 position_frame based (pos_ptr), /* ref8 */ 1 133 2 parent_position_ptr 1 134 ptr, 1 135 2 son_position_ptr ptr, 1 136 2 node_ptr ptr, 1 137 2 node fixed (35), 1 138 2 branch_num fixed; 1 139 dcl 1 node_block based (node_ptr), /* ref9) */ 1 140 2 last_branch_num fixed, 1 141 2 low_key_pos fixed, 1 142 2 scat_space fixed, 1 143 2 branch_and_descrip (1 refer (node_block.last_branch_num)), 1 144 /* in last element only branch is used */ 1 145 3 branch fixed (35), 1 146 3 descrip, 1 147 4 key_descrip, 1 148 5 key_pos fixed (17) unal, 1 149 5 key_length fixed (17) unal, 1 150 4 record_descrip, 1 151 5 record_designator 1 152 fixed (35); 1 153 dcl keys char (4096 /* 4*node_size */) based (node_ptr); 1 154 1 155 /* file base and states */ 1 156 dcl f_b_ptr ptr; 1 157 dcl 1 file_base based (f_b_ptr), /* ref10 */ 1 158 2 common_header, 1 159 3 file_code fixed (35), 1 160 3 lock_word bit (36) aligned, 1 161 3 words (2) fixed, 1 162 2 file_version fixed, 1 163 2 program_version fixed, 1 164 2 node_size fixed (19), 1 165 2 minimum_key_length fixed, 1 166 2 minimum_block_size fixed (19), 1 167 2 max_seg_limit fixed (19), 1 168 2 root_node_block, 1 169 3 last_branch_num_root 1 170 fixed, /* =1 */ 1 171 3 word fixed, 1 172 3 reserved fixed, 1 173 3 only_branch_in_root 1 174 fixed (35), 1 175 2 file_state fixed, 1 176 2 change_count fixed (34), /* record state info, ref12 */ 1 177 2 old_number_of_free_blocks 1 178 fixed (34), 1 179 2 prior_block_size fixed (19), 1 180 2 old_record_length fixed (21), 1 181 2 need_new_seg bit (1) aligned, 1 182 2 old_residue fixed, 1 183 2 new_last_comp_num fixed, 1 184 2 old_prev_free_block 1 185 fixed (18), 1 186 2 old_next_free_block 1 187 fixed (18), 1 188 2 new_record_length fixed (21), 1 189 2 old_record_designator 1 190 fixed (35), 1 191 2 prec_block_was_free 1 192 bit (1) aligned, 1 193 2 next_block_was_free 1 194 bit (1) aligned, 1 195 2 former_block_size fixed (19), 1 196 2 old_init_offset fixed (18), 1 197 2 old_block_size fixed (19), 1 198 2 prev_block_size fixed (19), 1 199 2 former_rover_comp_num 1 200 fixed, 1 201 2 former_rover_offset 1 202 fixed (18), 1 203 2 next_block_size fixed (19), 1 204 2 next_prev_free_block 1 205 fixed (18), 1 206 2 next_next_free_block 1 207 fixed (18), 1 208 2 saved_ks_out bit (1) aligned, 1 209 2 new_descriptor fixed (35), 1 210 2 old_last_branch_num 1 211 fixed, 1 212 2 old_low_key_pos fixed, 1 213 2 old_scat_space fixed, 1 214 2 old_key_pos fixed, 1 215 2 rover_comp_num fixed, 1 216 2 rover_offset fixed (18), 1 217 2 old_key_length fixed, 1 218 2 b_space fixed, 1 219 2 last_b_num fixed, 1 220 2 count fixed, 1 221 2 first_count fixed, 1 222 2 second_count fixed, 1 223 2 split_num fixed, 1 224 2 must_compact_dest bit (1) aligned, 1 225 2 first_branch fixed (35), 1 226 2 min_source_key_pos fixed, 1 227 2 min_dest_key_pos fixed, 1 228 2 new_low_key_pos fixed, 1 229 2 new_scat_space fixed, 1 230 2 old_seg_lim fixed (19), 1 231 2 old_number_of_free_nodes 1 232 fixed, 1 233 2 old_next_node_designator 1 234 fixed (35), 1 235 2 new_index_comp_num fixed, 1 236 2 out_of_index bit (1) aligned, 1 237 2 saved_min_res fixed (21), 1 238 2 saved_min_cap fixed (21), 1 239 2 was_stat bit (1) aligned, 1 240 2 was_ind bit (1) aligned, 1 241 2 old_ind_desc fixed (35), 1 242 2 after_desc fixed (35), 1 243 2 old_ref_count fixed (34), 1 244 2 new_ref_count fixed (34), 1 245 2 old_num_free fixed (34), 1 246 2 old_file_ch_count fixed (35), 1 247 2 y_count, /* for conversion of pre-MR6.9 files */ 1 248 2 old_modifier fixed (35), 1 249 2 was_transaction bit (1) aligned, /* state blocks */ 1 250 2 index_state fixed, 1 251 2 index_state_blocks (0:1), 1 252 3 words (104), 1 253 2 reserved (30), /* this free space might come in handy */ 1 254 2 old_prev_mod fixed (35), 1 255 2 needed_blksz fixed (35), 1 256 2 new_desc_val fixed (35), 1 257 2 is_partial_deletion 1 258 bit (1) aligned, 1 259 2 reserved2 (42), 1 260 2 file_state_blocks (0:1), 1 261 3 words (size (file_state_block)) fixed, 1 262 /* component info */ 1 263 2 max_comp_num fixed, 1 264 2 last_comp_num fixed, 1 265 2 first_free_comp_num, /* not yet supported */ 1 266 2 comp_table_start (size (comp_table)); /* start of comp_array */ 1 267 1 268 dcl 1 comp_table (0:true_max_comp_num) based (addr (file_base.comp_table_start)) aligned, 1 269 2 seg_limit fixed (19), /* abs value is offset of first free word in seg, max val=max 1 270* seg_limit and this indicates full seg */ 1 271 2 comp_link fixed (17) unal, 1 272 2 init_offset fixed (18) unsigned unal; 1 273 1 274 dcl 1 file_header based (f_b_ptr), 1 275 2 first_three_pages (3, 1024) fixed, 1 276 2 spare_node char (4096) aligned; 1 277 1 278 /* The File State */ 1 279 dcl fs_ptr ptr; 1 280 dcl 1 file_state_block based (fs_ptr), 1 281 2 file_action fixed, 1 282 2 file_substate fixed, 1 283 2 number_of_keys fixed (34), 1 284 2 duplicate_keys fixed (34), /* 0 if no duplications */ 1 285 2 dup_key_bytes fixed (34), 1 286 2 total_key_length fixed (34), 1 287 2 number_of_records fixed (34), 1 288 2 total_record_length 1 289 fixed (34), 1 290 2 number_of_allocated_records 1 291 fixed (34), 1 292 2 number_of_free_blocks 1 293 fixed (34), 1 294 2 words (2) fixed; 1 295 1 296 /* The Index State */ 1 297 dcl is_ptr ptr; 1 298 dcl 1 index_state_block based (is_ptr), /* if this declaration is changed, 1 299* index_state_blocks must be adjusted */ 1 300 2 number_of_nodes fixed (34), 1 301 2 free_node_designator 1 302 fixed (35), 1 303 2 index_tail_comp_num 1 304 fixed, 1 305 2 index_height fixed, 1 306 2 index_action fixed, 1 307 2 index_substate fixed, 1 308 2 current_node fixed (35), 1 309 2 change_node fixed (35), 1 310 2 fake_node, /* equivalent to a short node because of storage map. It holds 1 311* the new key, new record descrip, and new branch in a fashion 1 312* convenient for overflow-underflow in change_index. */ 1 313 3 fake_head_and_descrip, 1 314 4 word1 fixed, /* last_branch_num in real node */ 1 315 4 word2 fixed, /* low_key_pos in real node */ 1 316 4 word3 fixed, /* normally scat_space */ 1 317 4 word4 fixed, /* first branch in real node */ 1 318 4 new_key_pos fixed (17) unal, /* set by initializefile to denote first char 1 319* in new_key_string, never changed */ 1 320 4 new_key_length fixed (17) unal, 1 321 4 new_record_descrip, 1 322 5 new_record_designator 1 323 fixed (35), 1 324 4 new_branch fixed (35), 1 325 3 new_key_string char (256), 1 326 2 branch_num_adjust fixed, 1 327 2 pos_array (10), 1 328 3 saved_node fixed (35), 1 329 3 saved_branch_num fixed; 1 330 1 331 dcl 1 old_file_base based (f_b_ptr), 1 332 2 words1 (15) fixed, /* same in both file versions */ 1 333 2 old_file_state_blocks 1 334 (0:1), 1 335 3 words (5) fixed, 1 336 2 words2 (7) fixed, 1 337 2 record_state fixed, 1 338 2 record_state_blocks 1 339 (0:1), 1 340 3 words (4) fixed, 1 341 2 words3 (14) fixed, /* rover info same in both versions */ 1 342 2 old_version_index_height 1 343 fixed, 1 344 2 old_version_number_of_nodes 1 345 fixed (34), 1 346 2 words4 (157) fixed, 1 347 2 old_version_index_tail_comp_num 1 348 fixed, 1 349 2 old_version_free_node_designator 1 350 fixed (35), 1 351 2 words5 (10) fixed, 1 352 2 old_version_comp_info 1 353 fixed, 1 354 2 word, 1 355 2 x_count fixed; /* always zero in old version files */ 1 356 1 357 /* External Procedures */ 1 358 dcl clock_ entry returns (fixed (71)); 1 359 dcl alloc_cb_file entry (fixed, /* size of block in words */ 1 360 ptr); /* ptr to block */ 1 361 dcl free_cb_file entry (fixed, ptr); 1 362 dcl get_seg_ptr entry (ptr, fixed) returns (ptr); 1 363 dcl make_designator entry (fixed, fixed (18), fixed (35)); 1 364 dcl create_seg_ptrs entry (ptr); 1 365 dcl free_seg_ptrs entry (ptr); 1 366 dcl get_new_seg entry (ptr, fixed, ptr, fixed, label); 1 367 dcl free_seg entry (ptr, fixed, ptr); 1 368 dcl set_bitcounts entry (ptr); 1 369 dcl create_position_stack entry (ptr); 1 370 dcl extend_position_stack entry (ptr); 1 371 dcl free_position_stack entry (ptr); 1 372 dcl change_index entry (ptr, label); 1 373 dcl change_record_list entry (ptr, fixed, ptr, label); 1 374 1 375 /* State Constants */ 2 1 dcl bumping_count static internal options (constant) init (-14); 2 2 dcl rollback_action static options (constant) init (-13); 2 3 dcl adjust_action static options (constant) init (-12); 2 4 dcl unshared_opening static internal fixed options (constant) init (-11); 2 5 dcl non_eof_delete static internal fixed options (constant) init (-10); 2 6 dcl free_action static options (constant) init (-10); 2 7 dcl write_trunc static internal fixed options (constant) init (-9); 2 8 dcl allocate_action static options (constant) init (-9); 2 9 dcl reassigning_key static options (constant) init (-8); 2 10 dcl read_exclude static options (constant) init (-7); 2 11 dcl adding_record static options (constant) init (-6); 2 12 dcl deleting_key static options (constant) init (-5); 2 13 dcl adding_key static options (constant) init (-4); 2 14 dcl delete_action static options (constant) init (-3); 2 15 dcl eof_delete static internal fixed options (constant) init (-3); 2 16 dcl replace_action static options (constant) init (-2); 2 17 dcl rewrite_action static internal fixed options (constant) init (-2); 2 18 dcl insert_action static options (constant) init (-1); 2 19 dcl append_action static internal fixed options (constant) init (-1); 2 20 dcl truncate_action static internal fixed options (constant) init (1); 2 21 dcl must_adjust static internal fixed options (constant) init (2); 2 22 dcl must_rollback static internal fixed options (constant) init (3); 1 376 1 377 1 378 /* Other constants */ 1 379 dcl true_max_comp_num static options (constant) init (1250); 1 380 dcl stat_header_size static internal fixed options (constant) init (8); 1 381 1 382 /* builtins */ 1 383 dcl (verify, reverse) builtin; 1 384 dcl addr builtin; 1 385 dcl divide builtin; 1 386 dcl length builtin; 1 387 dcl null builtin; 1 388 dcl substr builtin; 1 389 dcl size builtin; 1 390 dcl abs builtin; 1 391 dcl unspec builtin; 1 392 dcl fixed builtin; 1 393 dcl bit builtin; 1 394 dcl max builtin; 1 395 dcl min builtin; 1 396 dcl rel builtin; 1 397 97 98 3 1 /* BEGIN INCLUDE vfile_indx_block_header.incl.pl1 */ 3 2 3 3 /* 12-17-84 Thanh Nguyen : Extracted from module change_record_list.pl1. 3 4* So the following structure can be accessible by other modules. 3 5* */ 3 6 3 7 dcl block_head_ptr ptr; 3 8 dcl 1 block_head based (block_head_ptr), 3 9 2 is_preceding_block_free 3 10 bit (1) unal, 3 11 2 is_this_block_free bit (1) unal, 3 12 2 block_size fixed (19) unal, 3 13 2 flags, 3 14 3 lock_flag bit (1) unal, 3 15 3 stationary bit (1) unal, 3 16 3 indirect bit (1) unal, 3 17 3 after_applies bit (1) unal, 3 18 3 pad bit (6) unal, 3 19 3 excess_words fixed (3) unal, /* only used in indirect allocations */ 3 20 2 prev_free_block fixed (18) aligned, 3 21 2 next_free_block fixed (18) aligned; 3 22 3 23 /* END INCLUDE vfile_indx_block_header.incl.pl1 */ 99 100 4 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 4 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 4 3* version number to IOX2. */ 4 4 /* format: style2 */ 4 5 4 6 dcl 1 iocb aligned based, /* I/O control block. */ 4 7 2 version character (4) aligned, /* IOX2 */ 4 8 2 name char (32), /* I/O name of this block. */ 4 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 4 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 4 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 4 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 4 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 4 14 2 reserved bit (72), /* Reserved for future use. */ 4 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 4 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 4 17 /* open(p,mode,not_used,s) */ 4 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 4 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 4 20 /* get_line(p,bufptr,buflen,actlen,s) */ 4 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 4 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 4 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 4 24 /* put_chars(p,bufptr,buflen,s) */ 4 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 4 26 /* modes(p,newmode,oldmode,s) */ 4 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 4 28 /* position(p,u1,u2,s) */ 4 29 2 control entry (ptr, char (*), ptr, fixed (35)), 4 30 /* control(p,order,infptr,s) */ 4 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 4 32 /* read_record(p,bufptr,buflen,actlen,s) */ 4 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 4 34 /* write_record(p,bufptr,buflen,s) */ 4 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 4 36 /* rewrite_record(p,bufptr,buflen,s) */ 4 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 4 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 4 39 /* seek_key(p,key,len,s) */ 4 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 4 41 /* read_key(p,key,len,s) */ 4 42 2 read_length entry (ptr, fixed (21), fixed (35)), 4 43 /* read_length(p,len,s) */ 4 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 4 45 /* open_file(p,mode,desc,not_used,s) */ 4 46 2 close_file entry (ptr, char (*), fixed bin (35)), 4 47 /* close_file(p,desc,s) */ 4 48 2 detach entry (ptr, char (*), fixed bin (35)); 4 49 /* detach(p,desc,s) */ 4 50 4 51 declare iox_$iocb_version_sentinel 4 52 character (4) aligned external static; 4 53 4 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 101 102 103 dcl vfd_ptr ptr; 104 dcl 1 vfd based (vfd_ptr), 105 2 comp fixed bin (17) unal, 106 2 offset bit (18) unal; 107 108 dcl addrel builtin; 109 dcl bcnt fixed bin (24); 110 dcl DONT_CREATE bit (1) int static options (constant) init ("0"b); 111 dcl msf_manager_$get_ptr entry (ptr, fixed bin, bit (1), ptr, fixed bin (24), fixed bin (35)); 112 dcl pos_ptr ptr; /* This var is not referenced 113* but a compiler warning is issued 114* if it isn't here */ 115 dcl block_ptr ptr; 116 dcl mrds_error_$inconsistent_data_length fixed bin (35) ext static; 117 dcl hbound builtin; 118 dcl record_len fixed bin (21); 119 dcl desc fixed bin (35) aligned; 120 121 end vrmu_cv_vf_desc_to_ptr; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/23/85 1341.9 vrmu_cv_vf_desc_to_ptr.pl1 >spec>on>mrds.pbf-04/23/85>vrmu_cv_vf_desc_to_ptr.pl1 97 1 07/19/79 1547.0 vfile_indx.incl.pl1 >ldd>include>vfile_indx.incl.pl1 1-376 2 07/19/79 1547.0 vfile_action_codes.incl.pl1 >ldd>include>vfile_action_codes.incl.pl1 99 3 02/20/85 1610.2 vfile_indx_block_header.incl.pl1 >ldd>include>vfile_indx_block_header.incl.pl1 101 4 05/20/83 1846.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. DONT_CREATE 000001 constant bit(1) initial unaligned dcl 110 set ref 45* I_iocb_ptr parameter pointer dcl 24 ref 6 37 I_vfile_desc parameter fixed bin(35,0) dcl 25 ref 6 38 O_code parameter fixed bin(35,0) dcl 28 set ref 6 33* 45* 47 64* O_record_len parameter fixed bin(21,0) dcl 27 set ref 6 35* 65* O_record_ptr parameter pointer dcl 26 set ref 6 34* 54* 62* addr builtin function dcl 1-384 ref 40 54 62 addrel builtin function dcl 108 ref 51 54 62 bcnt 000110 automatic fixed bin(24,0) dcl 109 set ref 45* block_head based structure level 1 unaligned dcl 3-8 block_ptr 000112 automatic pointer dcl 115 set ref 51* 52 53 54 57 58 61 62 64 block_tail 1 based structure level 2 unaligned dcl 1-115 cb_area based area(1024) dcl 87 ref 75 code 000100 automatic fixed bin(35,0) dcl 29 set ref 33* comp based fixed bin(17,0) level 2 packed unaligned dcl 104 ref 42 44 45 45 51 desc 000115 automatic fixed bin(35,0) dcl 119 set ref 38* 40 58* f_b_ptr 000104 automatic pointer dcl 1-156 set ref 73* 74 fcb_ptr based pointer level 2 dcl 1-3 set ref 45* file_base based structure level 1 unaligned dcl 1-157 file_base_ptr 2 based pointer level 2 dcl 1-3 ref 73 file_state_block based structure level 1 unaligned dcl 1-280 ref 74 fs_ptr automatic pointer dcl 1-279 ref 74 get_system_free_area_ 000014 constant entry external dcl 88 ref 75 hbound builtin function dcl 117 ref 42 i 000124 automatic fixed bin(17,0) dcl 89 set ref 77* 78 78* 80* 81* ind_structure based structure level 1 unaligned dcl 1-102 indirect 0(24) based bit(1) level 3 packed unaligned dcl 1-115 ref 57 indx_cb based structure level 1 unaligned dcl 1-3 indx_cb_ptr 000102 automatic pointer dcl 1-2 set ref 37* 42 42 44 45 45 51 71 72 73 74 75 75 78 80 81 iocb based structure level 1 dcl 4-6 is_this_block_free 0(01) based bit(1) level 2 packed unaligned dcl 3-8 ref 64 last_comp_num based fixed bin(17,0) level 2 dcl 1-157 ref 74 length builtin function dcl 1-386 ref 53 61 mrds_error_$inconsistent_data_length 000012 external static fixed bin(35,0) dcl 116 ref 64 msf_manager_$get_ptr 000010 constant entry external dcl 111 ref 45 null builtin function dcl 1-387 ref 34 44 81 offset 0(18) based bit(18) level 2 packed unaligned dcl 104 ref 51 old_array based pointer array dcl 92 ref 78 84 old_array_limit 000125 automatic fixed bin(17,0) dcl 90 set ref 71* 77 80 84 old_array_ptr 000126 automatic pointer dcl 91 set ref 72* 78 84 open_data_ptr 22 based pointer level 2 dcl 4-6 ref 37 prev_desc 7 based fixed bin(35,0) level 2 dcl 1-102 ref 58 record 1 based varying char(1000000) level 3 in structure "record_block_structure" dcl 1-115 in procedure "vrmu_cv_vf_desc_to_ptr" set ref 53 54 record 7 based varying char(1000000) level 2 in structure "stat_structure" dcl 1-92 in procedure "vrmu_cv_vf_desc_to_ptr" set ref 61 62 record_block_structure based structure level 1 unaligned dcl 1-115 record_len 000114 automatic fixed bin(21,0) dcl 118 set ref 53* 61* 64 65 reserved based structure level 2 dcl 1-115 seg_ptr_array based pointer array dcl 1-85 set ref 42 44 45* 51 75 78* 81* seg_ptr_array_limit 12 based fixed bin(17,0) level 2 dcl 1-3 set ref 42 71 74* 75 80 seg_ptr_array_ptr 10 based pointer level 2 dcl 1-3 set ref 42 44 45 51 72 75* 78 81 size builtin function dcl 1-389 ref 74 stat_structure based structure level 1 unaligned dcl 1-92 stationary 0(23) based bit(1) level 3 packed unaligned dcl 1-115 ref 52 vfd based structure level 1 packed unaligned dcl 104 vfd_ptr 000106 automatic pointer dcl 103 set ref 40* 42 44 45 45 51 51 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. abs builtin function dcl 1-390 adding_key internal static fixed bin(17,0) initial dcl 2-13 adding_record internal static fixed bin(17,0) initial dcl 2-11 adjust_action internal static fixed bin(17,0) initial dcl 2-3 alloc_cb_file 000000 constant entry external dcl 1-359 allocate_action internal static fixed bin(17,0) initial dcl 2-8 append_action internal static fixed bin(17,0) initial dcl 2-19 bit builtin function dcl 1-393 block_head_ptr automatic pointer dcl 3-7 bumping_count internal static fixed bin(17,0) initial dcl 2-1 change_index 000000 constant entry external dcl 1-372 change_record_list 000000 constant entry external dcl 1-373 clock_ 000000 constant entry external dcl 1-358 com_err_ 000000 constant entry external dcl 30 comp_table based structure array level 1 dcl 1-268 create_position_stack 000000 constant entry external dcl 1-369 create_seg_ptrs 000000 constant entry external dcl 1-364 current_t_code based fixed bin(35,0) dcl 1-82 delete_action internal static fixed bin(17,0) initial dcl 2-14 deleting_key internal static fixed bin(17,0) initial dcl 2-12 designator automatic fixed bin(35,0) dcl 1-88 designator_struct based structure level 1 dcl 1-127 divide builtin function dcl 1-385 eof_delete internal static fixed bin(17,0) initial dcl 2-15 extend_position_stack 000000 constant entry external dcl 1-370 file_header based structure level 1 unaligned dcl 1-274 fixed builtin function dcl 1-392 free_action internal static fixed bin(17,0) initial dcl 2-6 free_cb_file 000000 constant entry external dcl 1-361 free_position_stack 000000 constant entry external dcl 1-371 free_seg 000000 constant entry external dcl 1-367 free_seg_ptrs 000000 constant entry external dcl 1-365 get_new_seg 000000 constant entry external dcl 1-366 get_seg_ptr 000000 constant entry external dcl 1-362 ind_des_structure based structure level 1 packed unaligned dcl 1-89 index_state_block based structure level 1 unaligned dcl 1-298 insert_action internal static fixed bin(17,0) initial dcl 2-18 iox_$iocb_version_sentinel external static char(4) dcl 4-51 is_ptr automatic pointer dcl 1-297 keys based char(4096) unaligned dcl 1-153 make_designator 000000 constant entry external dcl 1-363 max builtin function dcl 1-394 min builtin function dcl 1-395 must_adjust internal static fixed bin(17,0) initial dcl 2-21 must_rollback internal static fixed bin(17,0) initial dcl 2-22 node_block based structure level 1 unaligned dcl 1-139 non_eof_delete internal static fixed bin(17,0) initial dcl 2-5 old_file_base based structure level 1 unaligned dcl 1-331 pos_ptr automatic pointer dcl 112 position_frame based structure level 1 unaligned dcl 1-132 read_exclude internal static fixed bin(17,0) initial dcl 2-10 reassigning_key internal static fixed bin(17,0) initial dcl 2-9 rel builtin function dcl 1-396 replace_action internal static fixed bin(17,0) initial dcl 2-16 reverse builtin function dcl 1-383 rewrite_action internal static fixed bin(17,0) initial dcl 2-17 rollback_action internal static fixed bin(17,0) initial dcl 2-2 seg_array based fixed bin(19,0) array dcl 1-87 seg_ptr automatic pointer dcl 1-86 set_bitcounts 000000 constant entry external dcl 1-368 stat_header_size internal static fixed bin(17,0) initial dcl 1-380 substr builtin function dcl 1-388 time_stamp_structure based structure level 1 packed unaligned dcl 1-112 true_max_comp_num internal static fixed bin(17,0) initial dcl 1-379 truncate_action internal static fixed bin(17,0) initial dcl 2-20 unshared_opening internal static fixed bin(17,0) initial dcl 2-4 unspec builtin function dcl 1-391 verify builtin function dcl 1-383 write_trunc internal static fixed bin(17,0) initial dcl 2-7 NAMES DECLARED BY EXPLICIT CONTEXT. extend_seg_ptr_array 000210 constant entry internal dcl 69 ref 42 loop 000040 constant label dcl 42 ref 59 vrmu_cv_vf_desc_to_ptr 000015 constant entry external dcl 6 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 374 412 306 404 Length 654 306 16 226 66 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME vrmu_cv_vf_desc_to_ptr 117 external procedure is an external procedure. extend_seg_ptr_array internal procedure shares stack frame of external procedure vrmu_cv_vf_desc_to_ptr. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME vrmu_cv_vf_desc_to_ptr 000100 code vrmu_cv_vf_desc_to_ptr 000102 indx_cb_ptr vrmu_cv_vf_desc_to_ptr 000104 f_b_ptr vrmu_cv_vf_desc_to_ptr 000106 vfd_ptr vrmu_cv_vf_desc_to_ptr 000110 bcnt vrmu_cv_vf_desc_to_ptr 000112 block_ptr vrmu_cv_vf_desc_to_ptr 000114 record_len vrmu_cv_vf_desc_to_ptr 000115 desc vrmu_cv_vf_desc_to_ptr 000124 i extend_seg_ptr_array 000125 old_array_limit extend_seg_ptr_array 000126 old_array_ptr extend_seg_ptr_array THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry alloc_based free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_system_free_area_ msf_manager_$get_ptr THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mrds_error_$inconsistent_data_length LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000010 33 000022 34 000025 35 000027 37 000030 38 000034 40 000036 42 000040 44 000054 45 000072 47 000117 51 000122 52 000142 53 000145 54 000147 55 000154 57 000155 58 000160 59 000162 61 000163 62 000165 63 000172 64 000173 65 000205 67 000207 69 000210 71 000211 72 000214 73 000216 74 000220 75 000222 77 000242 78 000251 79 000256 80 000260 81 000271 82 000276 84 000300 94 000305 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved