COMPILATION LISTING OF SEGMENT linus_close Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 0952.0 mst Tue Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(86-01-13,Dupuis), approve(86-01-13,MCR7188), audit(86-07-23,GWMay), 14* install(86-07-29,MR12.0-1106): 15* 84-12-01 Al Dupuis: Renamed sfr_ptr to force_retrieve_scope_info_ptr and 16* force_ret structure to forced_retrieve_scope_info. 17* END HISTORY COMMENTS */ 18 19 20 linus_close: 21 proc (sci_ptr, lcb_ptr); 22 23 /* DESCRIPTION: 24* 25* The data base is closed in the user specified mode via a call to dsl_$close. 26* 27* Linus Command: close (c) 28* 29* 30* HISTORY: 31* 32* 77-03-01 J. C. C. Jagernauth: Initially written. 33* 34* 78-09-01 J. C. C. Jagernauth: Modified for MR7.0. 35* 36* 80-06-01 Jim Gray : Modified to allow close to work even when database 37* already closed outside of linus, without blowing up, and to clean up close 38* processing. 39* 40* 81-11-06 Rickie E. Brinegar: Removed calls to linus_free_se as the 41* selection expression is now allocated in the lila temporary segment. 42* 43* 82-02-09 Paul W. Benjamin: ssu_ conversion. 44* 45* 82-06-03 DJ Schimke: Added code to set si_ptr to null denying any 46* succeeding opening access to the processed selection expression from 47* this opening (TR phx13269). 48* 49**/ 50 1 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 1 7* install(86-07-29,MR12.0-1106): 1 8* Added general_work_area_ptr and renamed sfr_ptr to 1 9* force_retrieve_scope_ptr. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* HISTORY: 1 14* 1 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 1 16* 1 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 1 18* a part of the attribute level control work. 1 19* 1 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 1 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 1 22* scope information. 1 23* 1 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 1 25* retaining various vcpu times to be collected when in timing mode. The 1 26* times to be collected are: LINUS parsing time, LINUS processing time, and 1 27* MRDS processing time. 1 28* 1 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 1 30* part of the line numbering implementation. This allows for possible later 1 31* LINUS control of the build defaults. 1 32* 1 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 1 34* information is now retained by ssu_. Removed parse_timer as no longer 1 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 1 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 1 37* 1 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 1 39* subsystem_invocation_level, and selection_expression_identifier. 1 40* 1 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 1 42* table_control_info_ptr. 1 43* 1 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 1 45* 1 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 1 47* 1 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 1 49* 1 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 1 51**/ 1 52 1 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 1 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 1 55 2 rb_len fixed bin (21), /* length of request buffer */ 1 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 1 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 1 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 1 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 1 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 1 61 2 test_flag bit (1) unal, /* on if in test mode */ 1 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 1 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 1 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 1 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 1 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 1 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 1 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 1 69 2 reserved bit (27) unal, 1 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 1 71 2 rb_ptr ptr, /* ptr to request buffer */ 1 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 1 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 1 74 2 ttn_ptr ptr, /* pointer to table info structure */ 1 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 1 76 2 lv_ptr ptr, /* pointer linus variables */ 1 77 2 si_ptr ptr, /* pointer to select_info structure */ 1 78 2 setfi_ptr ptr, /* pointer to set function information */ 1 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 1 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 1 81 2 lit_ptr ptr, /* pointer to literal pool */ 1 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 1 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 1 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 1 85* (MR7.0) */ 1 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 1 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 1 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 1 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 1 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 1 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 1 92* for current lila expression */ 1 93 2 unused_timer float bin (63), /* future expansion */ 1 94 2 request_time float bin (63), /* How much request time was spent 1 95* in LINUS. (-1 = user has just enabled 1 96* timing, do not report) */ 1 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 1 98 2 build_increment fixed bin, /* default increment for build mode */ 1 99 2 build_start fixed bin, /* default start count for build mode */ 1 100 2 linus_version char (4), /* current version of LINUS */ 1 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 1 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 1 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 1 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 1 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 1 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 1 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 1 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 1 109 2 word_pad (6) bit (36) unal, 1 110 /* procedures that will be optionally */ 1 111 /* replaced by the user. Saved so they */ 1 112 /* can be reinstated if desired. */ 1 113 2 ssu_abort_line entry options (variable), 1 114 2 ssu_post_request_line variable entry (ptr), 1 115 2 ssu_pre_request_line variable entry (ptr), 1 116 1 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 1 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 1 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 1 120 1 121 dcl lcb_ptr ptr; 1 122 1 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 51 52 2 1 /* BEGIN INCLUDE FILE linus_forced_scope_info.incl.pl1 */ 2 2 2 3 /* 2 4* This include file is to keep track of scope that must be forced, 2 5* and then later changed back to what it originally was. 2 6**/ 2 7 /****^ HISTORY COMMENTS: 2 8* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 2 9* install(86-07-29,MR12.0-1106): 2 10* Written: Al Dupuis - 01/23/85. 2 11* END HISTORY COMMENTS */ 2 12 2 13 dcl 1 forced_retrieve_scope_info aligned based (forced_retrieve_scope_info_ptr), 2 14 2 number_of_relations_scope_is_set_for fixed bin, 2 15 2 relations (frsi_init_number_of_relations refer 2 16 (forced_retrieve_scope_info.number_of_relations_scope_is_set_for)), 2 17 3 name char (32) unaligned, 2 18 3 retrieve_scope_was_forced bit (1) unaligned; 2 19 2 20 dcl forced_retrieve_scope_info_ptr ptr; 2 21 dcl frsi_init_number_of_relations fixed bin; 2 22 2 23 /* END INCLUDE FILE linus_forced_scope_info.incl.pl1 */ 53 54 3 1 /* BEGIN INCLUDE FILE linus_ready_data.incl.pl1 -- jccj 9/29/78 */ 3 2 3 3 dcl 1 ready_data aligned based (rd_ptr), 3 4 2 mode fixed bin, 3 5 2 nfiles fixed bin, 3 6 2 file (rd_nfiles_init refer (ready_data.nfiles)), 3 7 3 name char (32) unal, 3 8 3 active bit (1) unal; 3 9 3 10 dcl rd_ptr ptr; 3 11 dcl rd_nfiles_init fixed bin; 3 12 3 13 /* END INCLUDE FILE linus_ready_data.incl.pl1 */ 55 56 4 1 /* BEGIN INCLUDE FILE linus_ready_table.incl.pl1 -- jccj 10/10/78 */ 4 2 4 3 dcl 1 ready_table aligned based (rt_ptr), 4 4 2 ntabs fixed bin, 4 5 2 tab (ntabs_init refer (ready_table.ntabs)), 4 6 3 name char (32) unal, 4 7 3 active bit (1) unal; 4 8 4 9 dcl rt_ptr ptr; 4 10 dcl ntabs_init fixed bin; 4 11 4 12 /* END INCLUDE FILE linus_ready_table.incl.pl1 */ 57 58 5 1 /* BEGIN INCLUDE FILE linus_temp_tab_names.incl.pl1 -- jaw 6/16/77 */ 5 2 5 3 dcl temp_tab_names (mrds_data_$max_temp_rels) char (32) based (ttn_ptr); /* names of temp rels in slot corr. to rel. index */ 5 4 5 5 dcl ttn_ptr ptr; 5 6 5 7 /* END INCLUDE FILE linus_temp_tab_names.incl.pl1 */ 59 60 61 62 dcl sci_ptr ptr; /* for ssu_ */ 63 64 dcl dsl_$close entry options (variable); /* MRDS Subroutine */ 65 dcl ( 66 linus_data_$c_id, /* Linus data */ 67 linus_error_$no_db, /* Linus error code */ 68 linus_error_$no_input_arg_reqd, 69 mrds_data_$max_temp_rels, 70 sys_info$max_seg_size 71 ) ext fixed bin (35); 72 73 dcl initial_mrds_vclock float bin (63); 74 75 dcl cleanup condition; 76 77 dcl i fixed bin; 78 79 dcl (addr, fixed, null, rel, vclock) builtin; 80 81 dcl nargs fixed; 82 83 dcl (icode, code, out_code) fixed bin (35); 84 85 dcl linus_print_error entry (fixed bin (35), char (*)); 86 dcl linus_convert_code entry (fixed bin (35), fixed bin (35), fixed bin (35)); 87 dcl ssu_$arg_count entry (ptr, fixed bin); 88 89 on cleanup call clean_up; 90 91 icode, code = 0; 92 call ssu_$arg_count (sci_ptr, nargs); 93 if nargs ^= 0 then 94 call linus_print_error (linus_error_$no_input_arg_reqd, ""); 95 /* No argument should be 96* passed */ 97 else if lcb.db_index = 0 then 98 call linus_print_error (linus_error_$no_db, ""); 99 else call main_close; 100 101 main_close: 102 proc; 103 104 declare temp_index fixed bin (35); 105 106 if lcb.db_index ^= 0 then do; 107 temp_index = lcb.db_index; /* use force close philosophy */ 108 lcb.db_index = 0; 109 if lcb.timing_mode then 110 initial_mrds_vclock = vclock; 111 call dsl_$close (temp_index, icode); /* Try to close data base */ 112 if lcb.timing_mode then 113 lcb.mrds_time = lcb.mrds_time + vclock - initial_mrds_vclock; 114 end; 115 116 117 if icode ^= 0 then do; 118 call linus_convert_code (icode, out_code, linus_data_$c_id); 119 /* Convert system error code */ 120 call linus_print_error (out_code, ""); /* Print linus error */ 121 end; 122 123 if lcb.force_retrieve_scope_info_ptr ^= null then do; 124 free lcb.force_retrieve_scope_info_ptr -> forced_retrieve_scope_info; 125 lcb.force_retrieve_scope_info_ptr = null; 126 end; 127 128 lcb.si_ptr = null; /* delete processed selection expression */ 129 130 if lcb.ttn_ptr ^= null then do; 131 ttn_ptr = lcb.ttn_ptr; 132 do i = 1 to mrds_data_$max_temp_rels; 133 temp_tab_names (i) = ""; 134 end; 135 end; 136 137 if lcb.rd_ptr ^= null then do; 138 free lcb.rd_ptr -> ready_data; 139 lcb.rd_ptr = null; 140 end; 141 if lcb.rt_ptr ^= null then do; 142 free lcb.rt_ptr -> ready_table; 143 lcb.rt_ptr = null; 144 end; 145 146 end main_close; 147 148 149 150 clean_up: 151 proc; 152 153 call main_close; 154 155 end clean_up; 156 157 158 end linus_close; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0936.7 linus_close.pl1 >special_ldd>install>MR12.0-1106>linus_close.pl1 51 1 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.incl.pl1 53 2 07/29/86 0937.9 linus_forced_scope_info.incl.pl1 >special_ldd>install>MR12.0-1106>linus_forced_scope_info.incl.pl1 55 3 11/23/82 1327.2 linus_ready_data.incl.pl1 >ldd>include>linus_ready_data.incl.pl1 57 4 03/27/82 0434.5 linus_ready_table.incl.pl1 >ldd>include>linus_ready_table.incl.pl1 59 5 03/27/82 0434.5 linus_temp_tab_names.incl.pl1 >ldd>include>linus_temp_tab_names.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. cleanup 000104 stack reference condition dcl 75 ref 89 code 000115 automatic fixed bin(35,0) dcl 83 set ref 91* db_index based fixed bin(35,0) level 2 dcl 1-53 set ref 97 106 107 108* dsl_$close 000010 constant entry external dcl 64 ref 111 force_retrieve_scope_info_ptr 30 based pointer level 2 dcl 1-53 set ref 123 124 125* forced_retrieve_scope_info based structure level 1 dcl 2-13 ref 124 i 000112 automatic fixed bin(17,0) dcl 77 set ref 132* 133* icode 000114 automatic fixed bin(35,0) dcl 83 set ref 91* 111* 117 118* initial_mrds_vclock 000102 automatic float bin(63) dcl 73 set ref 109* 112 lcb based structure level 1 dcl 1-53 lcb_ptr parameter pointer dcl 1-121 ref 20 97 106 107 108 109 112 112 112 123 124 125 128 130 131 137 138 139 141 142 143 linus_convert_code 000024 constant entry external dcl 86 ref 118 linus_data_$c_id 000012 external static fixed bin(35,0) dcl 65 set ref 118* linus_error_$no_db 000014 external static fixed bin(35,0) dcl 65 set ref 97* linus_error_$no_input_arg_reqd 000016 external static fixed bin(35,0) dcl 65 set ref 93* linus_print_error 000022 constant entry external dcl 85 ref 93 97 120 mrds_data_$max_temp_rels 000020 external static fixed bin(35,0) dcl 65 ref 132 mrds_time 74 based float bin(63) level 2 dcl 1-53 set ref 112* 112 nargs 000113 automatic fixed bin(17,0) dcl 81 set ref 92* 93 nfiles 1 based fixed bin(17,0) level 2 dcl 3-3 ref 138 ntabs based fixed bin(17,0) level 2 dcl 4-3 ref 142 null builtin function dcl 79 ref 123 125 128 130 137 139 141 143 number_of_relations_scope_is_set_for based fixed bin(17,0) level 2 dcl 2-13 ref 124 out_code 000116 automatic fixed bin(35,0) dcl 83 set ref 118* 120* rd_ptr 50 based pointer level 2 dcl 1-53 set ref 137 138 139* ready_data based structure level 1 dcl 3-3 ref 138 ready_table based structure level 1 dcl 4-3 ref 142 rt_ptr 52 based pointer level 2 dcl 1-53 set ref 141 142 143* sci_ptr parameter pointer dcl 62 set ref 20 92* si_ptr 34 based pointer level 2 dcl 1-53 set ref 128* ssu_$arg_count 000026 constant entry external dcl 87 ref 92 temp_index 000100 automatic fixed bin(35,0) dcl 104 set ref 107* 111* temp_tab_names based char(32) array unaligned dcl 5-3 set ref 133* timing_mode 15(05) based bit(1) level 2 packed unaligned dcl 1-53 ref 109 112 ttn_ptr 26 based pointer level 2 in structure "lcb" dcl 1-53 in procedure "linus_close" ref 130 131 ttn_ptr 000100 automatic pointer dcl 5-5 in procedure "linus_close" set ref 131* 133 vclock builtin function dcl 79 ref 109 112 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. addr builtin function dcl 79 fixed builtin function dcl 79 forced_retrieve_scope_info_ptr automatic pointer dcl 2-20 frsi_init_number_of_relations automatic fixed bin(17,0) dcl 2-21 ntabs_init automatic fixed bin(17,0) dcl 4-10 rd_nfiles_init automatic fixed bin(17,0) dcl 3-11 rd_ptr automatic pointer dcl 3-10 rel builtin function dcl 79 rt_ptr automatic pointer dcl 4-9 sys_info$max_seg_size external static fixed bin(35,0) dcl 65 NAMES DECLARED BY EXPLICIT CONTEXT. clean_up 000361 constant entry internal dcl 150 ref 89 linus_close 000014 constant entry external dcl 20 main_close 000123 constant entry internal dcl 101 ref 99 153 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 532 562 370 542 Length 1066 370 30 270 142 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_close 96 external procedure is an external procedure. on unit on line 89 70 on unit main_close 77 internal procedure is called by several nonquick procedures. clean_up internal procedure shares stack frame of on unit on line 89. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_close 000100 ttn_ptr linus_close 000102 initial_mrds_vclock linus_close 000112 i linus_close 000113 nargs linus_close 000114 icode linus_close 000115 code linus_close 000116 out_code linus_close main_close 000100 temp_index main_close THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return enable ext_entry int_entry free_based vclock THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. dsl_$close linus_convert_code linus_print_error ssu_$arg_count THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. linus_data_$c_id linus_error_$no_db linus_error_$no_input_arg_reqd mrds_data_$max_temp_rels LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 20 000010 89 000021 91 000037 92 000041 93 000053 97 000073 99 000115 158 000121 101 000122 106 000130 107 000135 108 000136 109 000137 111 000150 112 000164 117 000202 118 000204 120 000217 123 000235 124 000245 125 000252 128 000260 130 000264 131 000271 132 000273 133 000304 134 000312 137 000314 138 000323 139 000331 141 000337 142 000345 143 000352 146 000360 150 000361 153 000362 155 000367 ----------------------------------------------------------- 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