set_current_image_info: proc; /* passively determines the transaction code and indirect descriptor which currently apply to this record */ /* The validity of this algorithm while records are subject to asynch changes is guaranteed by the strict observance of a standard modification protocol */ do while ("1"b); /* loops on detecting asynch changes */ time_stamp = fixed (time_stamp_struct.time_last_modified); /* to detect asynch change */ cur_mod = stat_struct.prev_mod; ref_cnt = block_ptr -> stat_struct.ref_count; if cur_mod = -3 /* creation in progress */ then ind_desc = -1; else if block_ptr -> record_block.indirect then ind_desc = ind_struct.prev_desc; else if block_ptr -> record_block.after_applies then do; ind_des.comp = stat_struct.ind_comp; ind_des.offset = time_stamp_struct.ind_offset; mod = stat_struct.modifier; cur_mod = mod; ref_cnt = stat_struct.ref_count_after; go to check_time; /* validate snapshot */ end; else ind_desc = current_descrip; /* compact case */ mod = stat_struct.modifier; if block_ptr -> record_block.lock_flag /* before image may not be valid */ then if mod > 0 /* transaction may be in progress on this record */ then if mod ^= cur_mod /* before and after are different */ then do; new_ind_des.comp = stat_struct.ind_comp; new_ind_des.offset = time_stamp_struct.ind_offset; if cur_mod = stat_struct.prev_mod /* in case of asynch change */ then do; /* must look in tcf to see which applies */ if ^transaction/* no tcf available */ then do; /* abort with non-zero code */ code = error_table_$higher_inconsistency; /* can't tell which image is the one to use */ return; /* abort */ end; unspec (gk_inf.flags) = "0"b; gk_inf.input_key = "1"b; gk_inf.key_len = 4; gk_inf.head_size = 4; gk_key = mod; /* current transaction using this record */ call iox_$control (tcfp, "get_key", addr (gk_inf), er_code); if er_code = 0 then if gk_inf.descrip = -1 /* past checkpoint */ then do; /* use after image info */ cur_mod = mod; ind_desc = new_ind_desc; ref_cnt = stat_struct.ref_count_after; return; /* done */ end; else ; else if er_code = error_table_$no_key then code = error_table_$higher_inconsistency; end; end; if cur_mod = stat_struct.prev_mod /* same as at previous reference */ then if cur_mod > 0 /* modifier is unique for this record image */ then return; else do; check_time: if fixed (time_stamp_struct.time_last_modified) = time_stamp then return; /* will use time_stamp for verification */ end; if clock () > timeout /* time limit is exhausted */ then do; code = error_table_$record_busy; return; end; end; /* keep trying until reference succeeds */ dcl er_code fixed (35); dcl 1 new_ind_des based (addr (new_ind_desc)), 2 comp fixed (17) unal, 2 offset bit (18) unal; dcl new_ind_desc fixed (35); dcl gk_key fixed (35) based (addr (gk_inf.key)); dcl 1 gk_inf, 2 header like gk_header, 2 key char (4); end set_current_image_info; dcl 1 ind_des like ind_des_structure based (addr (ind_desc)); dcl 1 stat_struct like stat_structure based (block_ptr); dcl 1 ind_struct like ind_structure based (block_ptr); dcl 1 time_stamp_struct like time_stamp_structure based (addr (stat_struct.time_stamp_words)); dcl 1 record_block like record_block_structure based (block_ptr); */ ----------------------------------------------------------- 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 */