COMPILATION LISTING OF SEGMENT vrm_close Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/21/84 1336.7 mst Wed Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 vrm_close: close: proc (I_rel_opening_id, O_code); 8 9 /* BEGIN_DESCRIPTION 10* 11* . Close the opening for a relation. Free any storage 12* associated with the opening. 13* 14** END_DESCRIPTION */ 15 16 17 /* History: 18* 19* 82-08-20 R. Harvey: Initially written 20* 82-11-03 R. Harvey: Modified for open_info structure 21* 84-05-25 B. G. Moberg: Modified to not free the same structure twice 22* 23**/ 24 25 26 /* Parameters */ 27 28 dcl I_rel_opening_id bit (36) aligned; 29 dcl O_code fixed bin (35); 30 31 32 call vrm_open_man$get_open_info_ptr (I_rel_opening_id, vrm_open_info_ptr, O_code); 33 if O_code = 0 then do; 34 vrm_open_info.number_of_openings = vrm_open_info.number_of_openings - 1; 35 if vrm_open_info.number_of_openings < 1 36 then do; 37 vrm_com_ptr = vrm_open_info.com_ptr; 38 call vrm_open_man$remove_opening (vrm_open_info.opening_id); 39 call free_open_info (vrm_open_info_ptr); 40 end; 41 end; 42 43 return; 44 45 46 47 release_open_info: entry (I_vrm_open_info_ptr); 48 49 dcl I_vrm_open_info_ptr ptr parameter; 50 51 52 call free_open_info (I_vrm_open_info_ptr); 53 54 return; 55 56 free_open_info: proc (I_voi_ptr); 57 58 dcl I_voi_ptr ptr parameter; 59 60 dcl i fixed bin; 61 62 vrm_open_info_ptr = I_voi_ptr; 63 if vrm_open_info_ptr ^= null () then do; /* got something to free */ 64 vrm_com_ptr = vrm_open_info.com_ptr; 65 if vrm_open_info.relation_model_ptr -> vrm_rel_desc.switches.MRDS_compatible 66 then do; /* collection_info structure(s) were allocated */ 67 68 free vrm_open_info.relation_model_ptr -> vrm_rel_desc in (vrm_com.oid_area); 69 70 /* Although it looks like the next statement should be done, this is never 71* true because primary_key_info_ptr points at the same storage that 72* index_collection (1).info_ptr points at. Therefore, doing this statement 73* results in freeing the same structure twice. This statement is left 74* here, but commented out so that no one will be tempted to add it later 75* 76* if vrm_open_info.primary_key_info_ptr ^= null () 77* then free vrm_open_info.primary_key_info_ptr -> vrm_collection_info in (vrm_com.oid_area); 78* 79* */ 80 81 do i = 1 to vrm_open_info.number_of_index_collections; 82 if vrm_open_info.index_collection (i).info_ptr ^= null () 83 then free vrm_open_info.index_collection (i).info_ptr -> vrm_collection_info in (vrm_com.oid_area); 84 end; 85 end; /* collection_info structure(s) ... */ 86 87 call vrmu_iocb_manager$destroy_all_iocbs_for_oid (vrm_open_info_ptr, (0)); 88 89 free vrm_open_info in (vrm_com.oid_area); 90 91 end; /* got something to do */ 92 93 end free_open_info; 94 1 1 /* BEGIN INCLUDE vrm_open_info.incl.pl1 */ 1 2 1 3 /* R. Harvey 82-11-02 1 4* 82-09-82 Roger Lackey: added iocb_list_ptr */ 1 5 1 6 dcl 1 vrm_open_info aligned based (vrm_open_info_ptr), /* Vfile relation description */ 1 7 2 version char (8), /* Version number of this structure */ 1 8 2 opening_id bit (36) aligned, /* Opening id associated with this desc */ 1 9 2 file_uid bit (36) aligned, /* Unique id of msf dir */ 1 10 2 number_of_openings fixed bin, /* Number of separate calls to vrm$open */ 1 11 2 switches, 1 12 3 shared bit (1) unal, /* Open relation in shared mode */ 1 13 3 pad bit (35) unal init ("0"b), /* Unused must be zero */ 1 14 2 database_dir_path char (168) varying, /* Absolute path of database */ 1 15 2 relation_name char (30) varying, /* Name of relation */ 1 16 2 relation_model_ptr pointer, /* Pointer to the relation_model in the relation itself or a temp seg */ 1 17 2 com_ptr pointer, /* Temp seg for cursors and scratch space */ 1 18 2 iocb_list_ptr pointer, /* Pointer to first vrm_iocb_list_block */ 1 19 2 primary_key_info_ptr pointer, /* Special case collection info ptr */ 1 20 2 number_of_index_collections fixed bin, /* Count of index collections (include primary key) */ 1 21 2 index_collection (voi_no_of_index_collections 1 22 refer (vrm_open_info.number_of_index_collections)), 1 23 3 id bit (36), 1 24 3 info_ptr ptr unal; /* Points to more detailed info */ 1 25 1 26 1 27 dcl VRM_OPEN_INFO_VERSION_1 char (8) int static options (constant) init (" 1"); 1 28 dcl vrm_open_info_ptr ptr; 1 29 dcl voi_no_of_index_collections fixed bin; 1 30 1 31 /* END INCLUDE vrm_open_info.incl.pl1 */ 95 96 2 1 /* BEGIN INCLUDE vrm_collection_info.incl.pl1 */ 2 2 2 3 /* R. Harvey 82-11-02 */ 2 4 2 5 2 6 dcl 1 vrm_collection_info aligned based (vrm_collection_info_ptr), 2 7 /* Index collection description */ 2 8 2 record_id unal, 2 9 3 header bit (4) unal, /* collection type */ 2 10 3 id bit (8) unal, /* index id */ 2 11 2 unique bit (1) unal, 2 12 2 primary_key bit (1) unal, /* This is the MRDS primary key collection */ 2 13 2 pad bit (26) unal, 2 14 2 number_of_attributes 2 15 fixed bin, 2 16 2 attribute (vci_no_of_attributes refer (vrm_collection_info.number_of_attributes)), 2 17 3 attr_index fixed bin, /* Attribute number in relation description */ 2 18 3 key_offset fixed bin, /* Offset within key in bits */ 2 19 3 key_bit_len fixed bin ; /* Length of key in bits */ 2 20 2 21 dcl vrm_collection_info_ptr 2 22 ptr; 2 23 dcl vci_no_of_attributes fixed bin; 2 24 dcl vrm_collection_header_type 2 25 bit (4) unal int static options (constant) init ("1100"b); 2 26 dcl VRM_COLLECTION_KEY_HEAD char (16) int static options (constant) init ("@collection_info"); 2 27 2 28 /* END INCLUDE vrm_collection_info.incl.pl1 */ 97 98 3 1 /* BEGIN INCLUDE vrm_rel_desc.incl.pl1 */ 3 2 3 3 /* 83-05-26 Roger Lackey : Added vrm_attr_info.key_head bit for relation_cursors */ 3 4 3 5 dcl 1 vrm_rel_desc based (vrm_rel_desc_ptr), 3 6 2 record_id bit (12) unal, /* Distinguish us from tuples and collection records */ 3 7 2 version char (8), /* Version of this structure */ 3 8 2 file_id bit (7), /* Value of file id from model */ 3 9 2 rel_id bit (12), /* Relation id */ 3 10 2 switches, 3 11 3 MRDS_compatible bit (1) unal, /* For pre-relation_manager_ MRDS */ 3 12 3 stationary_records 3 13 bit (1) unal, /* On = stationary */ 3 14 3 indexed bit (1) unal, /* This relation has attributes with secondary indices */ 3 15 3 pad bit (33) unal, 3 16 2 var_offset fixed bin (35), /* Position of first varying attr */ 3 17 2 maximum_data_length 3 18 fixed bin (35), /* Maximum size of tuple in characters */ 3 19 2 number_primary_key_attrs 3 20 fixed bin, /* Number of attributes which make up the primary key */ 3 21 2 number_sec_indexes fixed bin, /* Number of attributes which have a secondary index */ 3 22 2 last_var_attr_no fixed bin, /* Attr index of last varying attribute */ 3 23 2 number_var_attrs fixed bin, /* Number of varying attributes */ 3 24 2 number_attrs fixed bin, /* Number of attribute in rel */ 3 25 2 attr (vrd_no_of_attrs /* Description of each attribute */ 3 26 refer (vrm_rel_desc.number_attrs)) aligned like vrm_attr_info; 3 27 3 28 dcl 1 vrm_attr_info based (vrm_attr_info_ptr), 3 29 /* Attribute specific info */ 3 30 2 name char (32), /* Name of the attribute */ 3 31 2 descriptor bit (36) aligned, /* domain descriptor */ 3 32 2 varying bit (1) unal, /* ON = This is a varying string */ 3 33 2 key_head bit (1) unal, /* ON = This attr can be a keyhead */ 3 34 2 primary_key_attr bit (1) unal, /* ON = This is a primary key attribute */ 3 35 2 pad bit (15) unal, /* unused */ 3 36 2 index_collextion_ix fixed bin (17) unal, /* Index into vrm_open_info.index_collection array if key_head is on */ 3 37 2 bit_length fixed bin (35), /* Maximum bit length of tuple */ 3 38 2 bit_offset fixed bin (35); /* Offset in tuple if fixed, index to offset in tuple if varying */ 3 39 3 40 3 41 dcl vrm_rel_desc_ptr pointer; 3 42 dcl vrd_no_of_attrs fixed bin; 3 43 dcl VRM_REL_DESC_RECORD_ID bit (12) unal int static options (constant) init ("100000000000"b); 3 44 dcl VRM_REL_DESC_VERSION_1 char (8) int static options (constant) init (" 1"); 3 45 dcl vrm_attr_info_ptr pointer; 3 46 dcl VRM_REL_DESC_KEY char (256) varying int static options (constant) init ("@relation_description"); 3 47 3 48 /* END INCLUDE vrm_rel_desc.incl.pl1 */ 99 100 4 1 /* BEGIN INCLUDE vrm_com.incl.pl1 */ 4 2 4 3 /* Written 82-08-23 by R. Harvey */ 4 4 4 5 dcl vrm_com_ptr ptr; 4 6 dcl 1 vrm_com aligned based (vrm_com_ptr), 4 7 2 get_seg_ptr ptr, /* temp seg for retrieve routines */ 4 8 2 put_seg_ptr ptr, /* temp seg for store routines */ 4 9 2 mod_seg_ptr ptr, /* temp seg for modify routines */ 4 10 2 work_area_ptr ptr, /* freeing area for oid_table sections and rel_descriptors */ 4 11 2 highest_oid bit (36) aligned, /* highest valid oid */ 4 12 2 next_free_oid bit (36) aligned, /* offset of first in free chain */ 4 13 2 first_assigned_oid bit (36) aligned, /* offset of first in assigned chain */ 4 14 2 oid_area area (sys_info$max_seg_size - fixed (rel (addr (vrm_com.work_area_ptr)))); 4 15 4 16 /* END INCLUDE vrm_com.incl.pl1 */ 101 102 103 dcl ( 104 addr, 105 fixed, 106 null, 107 rel 108 ) builtin; 109 110 dcl vrmu_iocb_manager$destroy_all_iocbs_for_oid entry (ptr, fixed bin (35)); 111 dcl vrm_open_man$get_open_info_ptr entry (bit (36) aligned, ptr, fixed bin (35)); 112 dcl vrm_open_man$remove_opening entry (bit (36) aligned); 113 114 dcl sys_info$max_seg_size fixed bin (35) ext static; 115 116 117 118 end vrm_close; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/21/84 0920.1 vrm_close.pl1 >special_ldd>online>mrds_install>vrm_close.pl1 95 1 10/14/83 1609.1 vrm_open_info.incl.pl1 >ldd>include>vrm_open_info.incl.pl1 97 2 10/14/83 1609.1 vrm_collection_info.incl.pl1 >ldd>include>vrm_collection_info.incl.pl1 99 3 10/14/83 1609.1 vrm_rel_desc.incl.pl1 >ldd>include>vrm_rel_desc.incl.pl1 101 4 10/14/83 1609.1 vrm_com.incl.pl1 >ldd>include>vrm_com.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. I_rel_opening_id parameter bit(36) dcl 28 set ref 7 7 32* I_voi_ptr parameter pointer dcl 58 ref 56 62 I_vrm_open_info_ptr parameter pointer dcl 49 set ref 47 52* MRDS_compatible 3(01) based bit(1) level 3 packed unaligned dcl 3-5 ref 65 O_code parameter fixed bin(35,0) dcl 29 set ref 7 7 32* 33 com_ptr 74 based pointer level 2 dcl 1-6 ref 37 64 i 000112 automatic fixed bin(17,0) dcl 60 set ref 81* 82 82* index_collection 103 based structure array level 2 dcl 1-6 info_ptr 104 based pointer array level 3 packed unaligned dcl 1-6 ref 82 82 null builtin function dcl 103 ref 63 82 number_attrs 13 based fixed bin(17,0) level 2 dcl 3-5 ref 68 number_of_attributes 2 based fixed bin(17,0) level 2 dcl 2-6 ref 82 number_of_index_collections 102 based fixed bin(17,0) level 2 dcl 1-6 ref 81 89 number_of_openings 4 based fixed bin(17,0) level 2 dcl 1-6 set ref 34* 34 35 oid_area 14 based area level 2 dcl 4-6 ref 68 82 89 opening_id 2 based bit(36) level 2 dcl 1-6 set ref 38* relation_model_ptr 72 based pointer level 2 dcl 1-6 ref 65 68 switches 3(01) based structure level 2 packed unaligned dcl 3-5 vrm_attr_info based structure level 1 unaligned dcl 3-28 vrm_collection_info based structure level 1 dcl 2-6 ref 82 vrm_com based structure level 1 dcl 4-6 vrm_com_ptr 000102 automatic pointer dcl 4-5 set ref 37* 64* 68 82 89 vrm_open_info based structure level 1 dcl 1-6 set ref 89 vrm_open_info_ptr 000100 automatic pointer dcl 1-28 set ref 32* 34 34 35 37 38 39* 62* 63 64 65 68 81 82 82 87* 89 vrm_open_man$get_open_info_ptr 000012 constant entry external dcl 111 ref 32 vrm_open_man$remove_opening 000014 constant entry external dcl 112 ref 38 vrm_rel_desc based structure level 1 unaligned dcl 3-5 ref 68 vrmu_iocb_manager$destroy_all_iocbs_for_oid 000010 constant entry external dcl 110 ref 87 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. VRM_COLLECTION_KEY_HEAD internal static char(16) initial unaligned dcl 2-26 VRM_OPEN_INFO_VERSION_1 internal static char(8) initial unaligned dcl 1-27 VRM_REL_DESC_KEY internal static varying char(256) initial dcl 3-46 VRM_REL_DESC_RECORD_ID internal static bit(12) initial unaligned dcl 3-43 VRM_REL_DESC_VERSION_1 internal static char(8) initial unaligned dcl 3-44 addr builtin function dcl 103 fixed builtin function dcl 103 rel builtin function dcl 103 sys_info$max_seg_size external static fixed bin(35,0) dcl 114 vci_no_of_attributes automatic fixed bin(17,0) dcl 2-23 voi_no_of_index_collections automatic fixed bin(17,0) dcl 1-29 vrd_no_of_attrs automatic fixed bin(17,0) dcl 3-42 vrm_attr_info_ptr automatic pointer dcl 3-45 vrm_collection_header_type internal static bit(4) initial unaligned dcl 2-24 vrm_collection_info_ptr automatic pointer dcl 2-21 vrm_rel_desc_ptr automatic pointer dcl 3-41 NAMES DECLARED BY EXPLICIT CONTEXT. close 000012 constant entry external dcl 7 free_open_info 000107 constant entry internal dcl 56 ref 39 52 release_open_info 000072 constant entry external dcl 47 vrm_close 000022 constant entry external dcl 7 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 316 334 212 326 Length 574 212 16 224 103 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME close 94 external procedure is an external procedure. free_open_info internal procedure shares stack frame of external procedure close. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME close 000100 vrm_open_info_ptr close 000102 vrm_com_ptr close 000112 i free_open_info THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. vrm_open_man$get_open_info_ptr vrm_open_man$remove_opening vrmu_iocb_manager$destroy_all_iocbs_for_oid NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 7 000006 32 000027 33 000042 34 000045 35 000050 37 000053 38 000055 39 000064 43 000066 47 000067 52 000077 54 000106 56 000107 62 000111 63 000114 64 000120 65 000122 68 000126 81 000133 82 000143 84 000161 87 000163 89 000175 93 000203 ----------------------------------------------------------- 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