COMPILATION LISTING OF SEGMENT mu_define_area Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-18_1124.39_Tue_mdt Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 mu_define_area: 19 define_area: 20 procedure (defined_area_ptr, area_size, area_name, extensible, no_freeing, 21 zero_on_alloc, zero_on_free, error_code); 22 23 /* DESCRIPTION: 24* 25* This is a general routine to encapsulate the call to define_area_ and the 26* initializing of the area_info structure needed for that call. Note that 27* the area defined by this call must be deleted by a call to release_area_ to 28* properly clean up any temp segments created. 29* 30* Notice: If the caller's temp segment should be placed in the MRDS temp 31* directory, the caller MUST call the define_temp_dir_area entry point which 32* uses mu_temp_segs to get the temp segment. The segment may then be released 33* by an appropriate call to mu_temp_segments. 34* 35* PARAMETERS: 36* 37* defined_area_ptr - - (input/output) pointer, points to the start of the 38* area to be defined by this call. also the address pointed by 39* defined_area_ptr must be even(0 mod 2). if null, then it's value is 40* assigned, and a temp segment for the area is created. 41* 42* dbi - - (input) fixed bin (35), the database index which is associated with 43* the area being defined. It is used for the call to mu_temp_segments. 44* 45* area_size - - (input) fixed bin(18), the size that the area will be defined 46* to have, the initial size for extensible areas 47* 48* area_name - - (input) char(11), a name for the area, it will be used with 49* extensible areas to name added segments following the {unique_name}.area. 50* they should be of the form MRDS.store or LINUS.modify for identification. 51* 52* extensible - - (input) bit(1) aligned, ON => define this as an extensible 53* area. This will also cause the 'system' bit to come on in order to get the 54* extension to be placed in the same directory. 55* 56* no_freeing - - (input) bit(1) aligned, ON => define this as an area that 57* will never have any freeing done, in order to make use of a faster allocate 58* method. 59* 60* zero_on_alloc - - (input) bit(1) aligned, ON => zero out storage of a block 61* to be allocated before returning from the allocation. 62* 63* zero_on_free - - (input) bit(1) aligned, ON => zero out storage of block at 64* the time it is being freed. 65* 66* error_code - - (output) fixed bin(35), 0 unless an error occured in the 67* call to define_area_ or while getting a temp segment. 68* 69* 70* 71* HISTORY: 72* 73* 80-02-01 Jim Gray : Originally written. 74* 75* 81-07-07 Rickie E. Brinegar: Modified to always pass define_area_ a 76* non-null pointer. MRDS now handles getting and releasing temp segments 77* only using define_area_ to reset the header of the area. 78* 79* 82-07-08 R. Harvey: Modified to set system bit on extensible areas and to 80* copy a static structure for speed. 81* 82* 83-01-27 R. Harvey: Added define_temp_dir_area entry point. 83* 84* 85-01-15 Thanh Nguyen: Added define_spec_temp_dir_area entry point to create 85* our own space manager in the economic way of allocate without freeing. 86**/ 87 88 /* initialize the area_info, based on input parameters */ 89 90 error_code = 0; 91 if defined_area_ptr = null then 92 call get_temp_segment_ (area_name, defined_area_ptr, error_code); 93 goto COMMON; 94 95 96 97 define_temp_dir_area: 98 entry (defined_area_ptr, dbi, area_size, area_name, extensible, 99 no_freeing, zero_on_alloc, zero_on_free, error_code); 100 101 error_code = 0; 102 if defined_area_ptr = null () then 103 call mu_temp_segments$get_temp_segment (dbi, area_name, defined_area_ptr, error_code); 104 105 106 107 COMMON: 108 if error_code = 0 then do; 109 static_area_info.control.extend = extensible; 110 static_area_info.control.zero_on_alloc = zero_on_alloc; 111 static_area_info.control.zero_on_free = zero_on_free; 112 static_area_info.control.no_freeing = no_freeing; 113 if extensible then static_area_info.control.system = "1"b; 114 static_area_info.owner = area_name; 115 static_area_info.size = area_size; 116 static_area_info.areap = defined_area_ptr; 117 118 /* now make the call to define the area according to the parameters */ 119 120 call define_area_ (addr (static_area_info), error_code); 121 end; /* error_code = 0 */ 122 123 124 return; 125 126 define_spec_temp_dir_area: entry (defined_area_ptr, dbi, area_name, error_code); 127 128 /* This entry defines a special area which is the temporary segment is created 129* as any other temporary segment in MRDS, but it only be initialized by 130* subroutine mrds_area_initialize (mrds_area_initialize.incl.pl1) and 131* allocated by function allocate (mdbm_allocate.incl.pl1). 132* 133* For now, this entry is only called by mrds_dsl_retrieve, mrds_dsl_modify, 134* mrds_dsl_store, mrds_dsl_compile and mrds_dsl_define_temp_rel to create the 135* "mrds area" for the allocation of value_for_user in module mu_retrieve. 136* */ 137 138 error_code = 0; 139 if defined_area_ptr = null then 140 call mu_temp_segments$get_temp_segment (dbi, area_name, defined_area_ptr, error_code); 141 if error_code = 0 then 142 call mrds_area_initialize (defined_area_ptr); 143 144 return; 145 1 1 /* BEGINNING OF: mrds_area_initialize.incl.pl1 * * * * * * * * * * * * * */ 1 2 1 3 /* HISTORY: 1 4* 1 5* Created by: Thanh Nguyen 01/15/85 1 6* 1 7* */ 1 8 1 9 1 10 mrds_area_initialize: proc (mrds_area_ptr); 1 11 1 12 /* This procedure resets the given temporary segment and initializes the offset 1 13* and length of the free space to beginning of the segment. Function 1 14* mrds_space_allocate in mrds_space_allocate.incl.pl1 must be used to allocate 1 15* any storage into this temporary segment. 1 16* */ 1 17 1 18 dcl mrds_area_ptr ptr; /* ptr to the temporary segment. */ 1 19 dcl MRDS_AREA char (8) init ("MRDSAREA"); 1 20 1 21 dcl 1 mrds_area based (mrds_area_ptr), 1 22 2 area_id char (8), 1 23 2 offset_to_free_word fixed bin (35), /* offset to the next free word in temp seg. */ 1 24 2 length_free_space fixed bin (35); /* length of remaining free space in temp seg.*/ 1 25 1 26 dcl sys_info$max_seg_size fixed bin(35) ext static; 1 27 1 28 1 29 if mrds_area_ptr ^= null then do; 1 30 /* Set our identification, so we can recognize it later */ 1 31 mrds_area.area_id = MRDS_AREA; 1 32 /* Start from word four right after our heading structure. */ 1 33 mrds_area.offset_to_free_word = 4; 1 34 mrds_area.length_free_space = sys_info$max_seg_size - 4; 1 35 end; 1 36 return; 1 37 1 38 end mrds_area_initialize; 1 39 1 40 /* END OF: mrds_area_initialize.incl.pl1 * * * * * * * * * * * * * */ 146 147 148 declare defined_area_ptr ptr; /* points to area to be defined */ 149 declare dbi fixed bin (35); /* data base index */ 150 declare area_size fixed bin (18); /* size of area to be defined */ 151 declare area_name char (11); /* name to be given to area and extended segs */ 152 declare (extensible, zero_on_alloc, zero_on_free, no_freeing) bit (1) aligned; 153 /* parameters area is to have */ 154 155 dcl 1 static_area_info aligned internal static, 156 2 version fixed bin init (1),/* version number for this structure is 1 */ 157 2 control aligned, /* control bits for the area */ 158 3 extend bit (1) unal init ("0"b), /* says area is extensible */ 159 3 zero_on_alloc bit (1) unal init ("0"b), /* says block gets zerod at allocation time */ 160 3 zero_on_free bit (1) unal init ("0"b), /* says block gets zerod at free time */ 161 3 dont_free bit (1) unal init ("0"b), /* debugging aid, turns off free requests */ 162 3 no_freeing bit (1) unal init ("0"b), /* for allocation method without freeing */ 163 3 system bit (1) unal init ("0"b), /* says area is managed by system */ 164 3 pad bit (30) unal init ((30)"0"b), 165 2 owner char (32) unal init (""), /* creator of the area */ 166 2 n_components fixed bin init (0),/* number of components in the area (returned only) */ 167 2 size fixed bin (18) init (0), /* size of the area in words */ 168 2 version_of_area fixed bin init (1),/* version of area (returned only) */ 169 2 areap ptr init (null ()),/* pointer to the area (first component on multisegment area) */ 170 2 allocated_blocks fixed bin init (0),/* number of blocks allocated */ 171 2 free_blocks fixed bin init (0),/* number of free blocks not in virgin */ 172 2 allocated_words fixed bin (30) init (0), /* number of words allocated in the area */ 173 2 free_words fixed bin (30) init (0); /* number of words free in area not in virgin */ 174 175 declare define_area_ entry (ptr, fixed bin (35)); /* routine that defines an area */ 176 declare error_code fixed bin (35); /* error status encoding */ 177 dcl mu_temp_segments$get_temp_segment entry (fixed bin (35), char (*), ptr, fixed bin (35)); 178 dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 179 /* get a seg to define the area on */ 180 dcl (addr, null) builtin; 181 182 183 184 end; 185 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/00 1124.4 mu_define_area.pl1 >udd>sm>ds>w>ml>mu_define_area.pl1 146 1 02/20/85 1710.1 mrds_area_initialize.incl.pl1 >ldd>incl>mrds_area_initialize.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. MRDS_AREA 000124 automatic char(8) initial packed unaligned dcl 1-19 set ref 1-19* 1-31 addr builtin function dcl 180 ref 120 120 area_id based char(8) level 2 packed packed unaligned dcl 1-21 set ref 1-31* area_name parameter char(11) packed unaligned dcl 151 set ref 18 18 91* 97 102* 114 126 139* area_size parameter fixed bin(18,0) dcl 150 ref 18 18 97 115 areap 16 000010 internal static pointer initial level 2 dcl 155 set ref 116* control 1 000010 internal static structure level 2 dcl 155 dbi parameter fixed bin(35,0) dcl 149 set ref 97 102* 126 139* define_area_ 000034 constant entry external dcl 175 ref 120 defined_area_ptr parameter pointer dcl 148 set ref 18 18 91 91* 97 102 102* 116 126 139 139* 141* error_code parameter fixed bin(35,0) dcl 176 set ref 18 18 90* 91* 97 101* 102* 107 120* 126 138* 139* 141 extend 1 000010 internal static bit(1) initial level 3 packed packed unaligned dcl 155 set ref 109* extensible parameter bit(1) dcl 152 ref 18 18 97 109 113 get_temp_segment_ 000040 constant entry external dcl 178 ref 91 length_free_space 3 based fixed bin(35,0) level 2 dcl 1-21 set ref 1-34* mrds_area based structure level 1 unaligned dcl 1-21 mrds_area_ptr parameter pointer dcl 1-18 ref 1-10 1-29 1-31 1-33 1-34 mu_temp_segments$get_temp_segment 000036 constant entry external dcl 177 ref 102 139 no_freeing parameter bit(1) dcl 152 in procedure "define_area" ref 18 18 97 112 no_freeing 1(04) 000010 internal static bit(1) initial level 3 in structure "static_area_info" packed packed unaligned dcl 155 in procedure "define_area" set ref 112* null builtin function dcl 180 ref 91 102 139 1-29 offset_to_free_word 2 based fixed bin(35,0) level 2 dcl 1-21 set ref 1-33* owner 2 000010 internal static char(32) initial level 2 packed packed unaligned dcl 155 set ref 114* size 13 000010 internal static fixed bin(18,0) initial level 2 dcl 155 set ref 115* static_area_info 000010 internal static structure level 1 dcl 155 set ref 120 120 sys_info$max_seg_size 000042 external static fixed bin(35,0) dcl 1-26 ref 1-34 system 1(05) 000010 internal static bit(1) initial level 3 packed packed unaligned dcl 155 set ref 113* zero_on_alloc 1(01) 000010 internal static bit(1) initial level 3 in structure "static_area_info" packed packed unaligned dcl 155 in procedure "define_area" set ref 110* zero_on_alloc parameter bit(1) dcl 152 in procedure "define_area" ref 18 18 97 110 zero_on_free parameter bit(1) dcl 152 in procedure "define_area" ref 18 18 97 111 zero_on_free 1(02) 000010 internal static bit(1) initial level 3 in structure "static_area_info" packed packed unaligned dcl 155 in procedure "define_area" set ref 111* NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 000207 constant label dcl 107 ref 93 define_area 000021 constant entry external dcl 18 define_spec_temp_dir_area 000275 constant entry external dcl 126 define_temp_dir_area 000131 constant entry external dcl 97 mrds_area_initialize 000353 constant entry internal dcl 1-10 ref 141 mu_define_area 000050 constant entry external dcl 18 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 526 572 402 536 Length 774 402 44 165 124 24 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME define_area 122 external procedure is an external procedure. mrds_area_initialize internal procedure shares stack frame of external procedure define_area. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 static_area_info define_area STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME define_area 000124 MRDS_AREA mrds_area_initialize THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. define_area_ get_temp_segment_ mu_temp_segments$get_temp_segment THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000012 90 000074 91 000075 93 000121 97 000122 101 000155 102 000156 107 000207 109 000211 110 000220 111 000225 112 000232 113 000237 114 000243 115 000247 116 000251 120 000255 124 000267 126 000270 138 000307 139 000310 141 000341 144 000352 1 10 000353 1 19 000355 1 29 000357 1 31 000363 1 33 000370 1 34 000372 1 36 000401 ----------------------------------------------------------- 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