COMPILATION LISTING OF SEGMENT create_area Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1802.0 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 create_area: proc; 12 13 /* This command either creates or innitializes an area */ 14 /* coded 76/11/01 by M. Weaver */ 15 16 dcl (i, alng, segid_type) fixed bin; 17 dcl aptr ptr; 18 dcl arg char (alng) based (aptr); 19 dcl dir char (168); 20 dcl ent char (32); 21 dcl code fixed bin (35); 22 dcl me char (12) aligned init ("create_area") static options (constant); 23 dcl fatal bit (1) aligned; 24 25 dcl cu_$arg_count entry () returns (fixed bin); 26 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 27 dcl (ioa_, com_err_) entry options (variable); 28 dcl cv_ptr_ entry (char (*), fixed bin (35)) returns (ptr); 29 dcl cv_ptr_$terminate entry (ptr); 30 dcl hcs_$make_seg entry (char (*), char (*), char (*), fixed bin (5), ptr, fixed bin (35)); 31 dcl define_area_ entry (ptr, fixed bin (35)); 32 dcl expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 33 dcl cv_oct_check_ entry (char (*), fixed bin (35)) returns (fixed bin (18)); 34 dcl get_group_id_ entry () returns (char (32) aligned); 35 36 dcl error_table_$noarg fixed bin (35) ext; 37 dcl error_table_$badopt fixed bin (35) ext; 38 dcl sys_info$max_seg_size fixed bin (18) ext; 39 dcl (addr, null, string, substr) builtin; 40 41 dcl 1 info aligned like area_info; 42 1 1 /* BEGIN INCLUDE FILE area_info.incl.pl1 12/75 */ 1 2 1 3 dcl area_info_version_1 fixed bin static init (1) options (constant); 1 4 1 5 dcl area_infop ptr; 1 6 1 7 dcl 1 area_info aligned based (area_infop), 1 8 2 version fixed bin, /* version number for this structure is 1 */ 1 9 2 control aligned like area_control, /* control bits for the area */ 1 10 2 owner char (32) unal, /* creator of the area */ 1 11 2 n_components fixed bin, /* number of components in the area (returned only) */ 1 12 2 size fixed bin (18), /* size of the area in words */ 1 13 2 version_of_area fixed bin, /* version of area (returned only) */ 1 14 2 areap ptr, /* pointer to the area (first component on multisegment area) */ 1 15 2 allocated_blocks fixed bin, /* number of blocks allocated */ 1 16 2 free_blocks fixed bin, /* number of free blocks not in virgin */ 1 17 2 allocated_words fixed bin (30), /* number of words allocated in the area */ 1 18 2 free_words fixed bin (30); /* number of words free in area not in virgin */ 1 19 1 20 dcl 1 area_control aligned based, 1 21 2 extend bit (1) unal, /* says area is extensible */ 1 22 2 zero_on_alloc bit (1) unal, /* says block gets zerod at allocation time */ 1 23 2 zero_on_free bit (1) unal, /* says block gets zerod at free time */ 1 24 2 dont_free bit (1) unal, /* debugging aid, turns off free requests */ 1 25 2 no_freeing bit (1) unal, /* for allocation method without freeing */ 1 26 2 system bit (1) unal, /* says area is managed by system */ 1 27 2 pad bit (30) unal; 1 28 1 29 /* END INCLUDE FILE area_info.incl.pl1 */ 43 44 45 46 /* first initialize the area info structure */ 47 48 info.version = area_info_version_1; 49 string (info.control) = "0"b; 50 info.owner = get_group_id_ (); 51 info.size = sys_info$max_seg_size; 52 info.areap = null; 53 segid_type = 0; 54 fatal = "0"b; 55 56 /* now overwrite portions of the structure according to the arguments */ 57 58 do i = 1 to cu_$arg_count (); 59 call cu_$arg_ptr (i, aptr, alng, code); 60 if substr (arg, 1, 1) = "-" then do; 61 if arg = "-extend" then info.control.extend = "1"b; 62 else if arg = "-zero_on_alloc" then info.control.zero_on_alloc = "1"b; 63 else if arg = "-zero_on_free" then info.control.zero_on_free = "1"b; 64 else if arg = "-dont_free" then info.control.dont_free = "1"b; 65 else if arg = "-no_freeing" then info.control.no_freeing = "1"b; 66 else if arg = "-size" then do; 67 i = i + 1; 68 call cu_$arg_ptr (i, aptr, alng, code); 69 if code ^= 0 then do; 70 call com_err_ (code, me, "size"); 71 fatal = "1"b; 72 end; 73 else do; 74 info.size = cv_oct_check_ (arg, code); 75 if code ^= 0 then do; 76 fatal = "1"b; 77 call com_err_ (0, me, "Size ^a should be an octal number.", arg); 78 end; 79 end; 80 end; 81 else if arg = "-id" then do; 82 i = i + 1; 83 call cu_$arg_ptr (i, aptr, alng, code); 84 if code ^= 0 then do; 85 call com_err_ (error_table_$noarg, me, "ID string"); 86 fatal = "1"b; 87 end; 88 else info.owner = arg; 89 end; 90 else do; 91 call com_err_ (error_table_$badopt, me, arg); 92 fatal = "1"b; 93 end; 94 end; /* end of control argument group */ 95 96 else do; /* must have address */ 97 if segid_type ^= 0 then do; /* this is not the first address */ 98 call com_err_ (0, me, "Only 1 virtual address is allowed."); 99 fatal = "1"b; 100 end; 101 else do; /* first address */ 102 segid_type = 1; 103 info.areap = cv_ptr_ (arg, code); /* get ptr to area, if it exists */ 104 if code ^= 0 then do; /* null ptr given meane create temp */ 105 segid_type = 2; /* don't want to call cv_ptr_$terminate */ 106 call expand_pathname_ (arg, dir, ent, code); 107 if code ^= 0 then do; 108 path_error: call com_err_ (code, me, arg); 109 fatal = "1"b; 110 end; 111 else do; 112 call hcs_$make_seg (dir, ent, "", 01010b, info.areap, code); 113 if info.areap = null then goto path_error; 114 end; 115 end; 116 end; 117 end; 118 end; 119 120 if fatal then do; 121 if segid_type = 1 then call cv_ptr_$terminate (info.areap); 122 return; 123 end; 124 if segid_type = 0 then do; /* no name was given */ 125 call com_err_ (error_table_$noarg, me, "virtual address"); 126 return; 127 end; 128 129 call define_area_ (addr (info), code); 130 if code ^= 0 then call com_err_ (code, me); 131 else call ioa_ ("area pointer = ^p", info.areap); 132 133 if segid_type = 0 then call cv_ptr_$terminate (info.areap); 134 135 return; 136 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1625.0 create_area.pl1 >dumps>old>recomp>create_area.pl1 43 1 06/11/76 1043.4 area_info.incl.pl1 >ldd>include>area_info.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. addr builtin function dcl 39 ref 129 129 alng 000101 automatic fixed bin(17,0) dcl 16 set ref 59* 60 61 62 63 64 65 66 68* 74 74 77 77 81 83* 88 91 91 103 103 106 106 108 108 aptr 000104 automatic pointer dcl 17 set ref 59* 60 61 62 63 64 65 66 68* 74 77 81 83* 88 91 103 106 108 area_control based structure level 1 dcl 1-20 area_info based structure level 1 dcl 1-7 area_info_version_1 constant fixed bin(17,0) initial dcl 1-3 ref 48 areap 16 000172 automatic pointer level 2 dcl 41 set ref 52* 103* 112* 113 121* 131* 133* arg based char unaligned dcl 18 set ref 60 61 62 63 64 65 66 74* 77* 81 88 91* 103* 106* 108* code 000170 automatic fixed bin(35,0) dcl 21 set ref 59* 68* 69 70* 74* 75 83* 84 103* 104 106* 107 108* 112* 129* 130 130* com_err_ 000016 constant entry external dcl 27 ref 70 77 85 91 98 108 125 130 control 1 000172 automatic structure level 2 dcl 41 set ref 49* cu_$arg_count 000010 constant entry external dcl 25 ref 58 cu_$arg_ptr 000012 constant entry external dcl 26 ref 59 68 83 cv_oct_check_ 000032 constant entry external dcl 33 ref 74 cv_ptr_ 000020 constant entry external dcl 28 ref 103 cv_ptr_$terminate 000022 constant entry external dcl 29 ref 121 133 define_area_ 000026 constant entry external dcl 31 ref 129 dir 000106 automatic char(168) unaligned dcl 19 set ref 106* 112* dont_free 1(03) 000172 automatic bit(1) level 3 packed unaligned dcl 41 set ref 64* ent 000160 automatic char(32) unaligned dcl 20 set ref 106* 112* error_table_$badopt 000040 external static fixed bin(35,0) dcl 37 set ref 91* error_table_$noarg 000036 external static fixed bin(35,0) dcl 36 set ref 85* 125* expand_pathname_ 000030 constant entry external dcl 32 ref 106 extend 1 000172 automatic bit(1) level 3 packed unaligned dcl 41 set ref 61* fatal 000171 automatic bit(1) dcl 23 set ref 54* 71* 76* 86* 92* 99* 109* 120 get_group_id_ 000034 constant entry external dcl 34 ref 50 hcs_$make_seg 000024 constant entry external dcl 30 ref 112 i 000100 automatic fixed bin(17,0) dcl 16 set ref 58* 59* 67* 67 68* 82* 82 83* info 000172 automatic structure level 1 dcl 41 set ref 129 129 ioa_ 000014 constant entry external dcl 27 ref 131 me 000000 constant char(12) initial dcl 22 set ref 70* 77* 85* 91* 98* 108* 125* 130* no_freeing 1(04) 000172 automatic bit(1) level 3 packed unaligned dcl 41 set ref 65* null builtin function dcl 39 ref 52 113 owner 2 000172 automatic char(32) level 2 packed unaligned dcl 41 set ref 50* 88* segid_type 000102 automatic fixed bin(17,0) dcl 16 set ref 53* 97 102* 105* 121 124 133 size 13 000172 automatic fixed bin(18,0) level 2 dcl 41 set ref 51* 74* string builtin function dcl 39 set ref 49* substr builtin function dcl 39 ref 60 sys_info$max_seg_size 000042 external static fixed bin(18,0) dcl 38 ref 51 version 000172 automatic fixed bin(17,0) level 2 dcl 41 set ref 48* zero_on_alloc 1(01) 000172 automatic bit(1) level 3 packed unaligned dcl 41 set ref 62* zero_on_free 1(02) 000172 automatic bit(1) level 3 packed unaligned dcl 41 set ref 63* NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. area_infop automatic pointer dcl 1-5 NAMES DECLARED BY EXPLICIT CONTEXT. create_area 000111 constant entry external dcl 11 path_error 000630 constant label dcl 108 ref 113 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1244 1310 1061 1254 Length 1520 1061 44 173 163 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME create_area 228 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME create_area 000100 i create_area 000101 alng create_area 000102 segid_type create_area 000104 aptr create_area 000106 dir create_area 000160 ent create_area 000170 code create_area 000171 fatal create_area 000172 info create_area THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr cv_oct_check_ cv_ptr_ cv_ptr_$terminate define_area_ expand_pathname_ get_group_id_ hcs_$make_seg ioa_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$noarg sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000110 48 000116 49 000120 50 000121 51 000132 52 000135 53 000137 54 000140 58 000141 59 000154 60 000171 61 000176 62 000206 63 000215 64 000224 65 000233 66 000242 67 000246 68 000247 69 000264 70 000266 71 000311 72 000313 74 000314 75 000340 76 000342 77 000344 80 000400 81 000401 82 000405 83 000406 84 000423 85 000425 86 000452 87 000454 88 000455 89 000462 91 000463 92 000507 94 000511 97 000512 98 000514 99 000541 100 000543 102 000544 103 000546 104 000572 105 000574 106 000576 107 000626 108 000630 109 000654 110 000656 112 000657 113 000716 118 000722 120 000724 121 000726 122 000740 124 000741 125 000743 126 000772 129 000773 130 001006 131 001026 133 001046 135 001057 ----------------------------------------------------------- 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