COMPILATION LISTING OF SEGMENT set_storage_ptrs Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/05/86 1029.4 mst Wed 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 set_storage_ptrs: proc; 12 13 /* The entries in this command set area pointers in the stack header */ 14 15 /* coded November 1976 by Melanie Weaver */ 16 /* modified December 1976 by Melanie Weaver to check code properly after trying to set ptr */ 17 /* Modified July 1979 by C. Hornig to add -create option. */ 18 19 dcl address char (*); 20 dcl whox fixed bin; 21 dcl new_ptr ptr; 22 dcl code fixed bin (35); 23 dcl 1 ai aligned like area_info; 24 25 dcl me (2) char (20) aligned options (constant) static init ("set_system_storage", "set_user_storage"); 26 27 dcl com_err_ entry options (variable); 28 dcl cu_$arg_count entry () returns (fixed bin); 29 dcl cv_ptr_ entry (char (*), fixed bin (35)) returns (ptr); 30 dcl cv_ptr_$terminate entry (ptr); 31 dcl define_area_ entry (pointer, fixed bin (35)); 32 dcl set_system_free_area_ entry (pointer); 33 dcl set_user_free_area_ entry (pointer); 34 35 dcl error_table_$noarg fixed bin (35) ext; 36 dcl error_table_$badcall fixed bin (35) ext; 37 dcl sys_info$max_seg_size fixed bin (19) ext; 38 39 dcl (addr, null, ptr, stackframeptr) builtin; 40 1 1 /* BEGIN INCLUDE FILE ... stack_header.incl.pl1 .. 3/72 Bill Silver */ 1 2 /* modified 7/76 by M. Weaver for *system links and more system use of areas */ 1 3 /* modified 3/77 by M. Weaver to add rnt_ptr */ 1 4 /* Modified April 1983 by C. Hornig for tasking */ 1 5 1 6 /****^ HISTORY COMMENTS: 1 7* 1) change(86-06-24,DGHowe), approve(86-06-24,MCR7396), 1 8* audit(86-08-05,Schroth), install(86-11-03,MR12.0-1206): 1 9* added the heap_header_ptr definition. 1 10* 2) change(86-08-12,Kissel), approve(86-08-12,MCR7473), 1 11* audit(86-10-10,Fawcett), install(86-11-03,MR12.0-1206): 1 12* Modified to support control point management. These changes were actually 1 13* made in February 1985 by G. Palter. 1 14* 3) change(86-10-22,Fawcett), approve(86-10-22,MCR7473), 1 15* audit(86-10-22,Farley), install(86-11-03,MR12.0-1206): 1 16* Remove the old_lot pointer and replace it with cpm_data_ptr. Use the 18 1 17* bit pad after cur_lot_size for the cpm_enabled. This was done to save some 1 18* space int the stack header and change the cpd_ptr unal to cpm_data_ptr 1 19* (ITS pair). 1 20* END HISTORY COMMENTS */ 1 21 1 22 /* format: style2 */ 1 23 1 24 dcl sb ptr; /* the main pointer to the stack header */ 1 25 1 26 dcl 1 stack_header based (sb) aligned, 1 27 2 pad1 (4) fixed bin, /* (0) also used as arg list by outward_call_handler */ 1 28 2 cpm_data_ptr ptr, /* (4) pointer to control point which owns this stack */ 1 29 2 combined_stat_ptr ptr, /* (6) pointer to area containing separate static */ 1 30 2 clr_ptr ptr, /* (8) pointer to area containing linkage sections */ 1 31 2 max_lot_size fixed bin (17) unal, /* (10) DU number of words allowed in lot */ 1 32 2 main_proc_invoked fixed bin (11) unal, /* (10) DL nonzero if main procedure invoked in run unit */ 1 33 2 have_static_vlas bit (1) unal, /* (10) DL "1"b if (very) large arrays are being used in static */ 1 34 2 pad4 bit (2) unal, 1 35 2 run_unit_depth fixed bin (2) unal, /* (10) DL number of active run units stacked */ 1 36 2 cur_lot_size fixed bin (17) unal, /* (11) DU number of words (entries) in lot */ 1 37 2 cpm_enabled bit (18) unal, /* (11) DL non-zero if control point management is enabled */ 1 38 2 system_free_ptr ptr, /* (12) pointer to system storage area */ 1 39 2 user_free_ptr ptr, /* (14) pointer to user storage area */ 1 40 2 null_ptr ptr, /* (16) */ 1 41 2 stack_begin_ptr ptr, /* (18) pointer to first stack frame on the stack */ 1 42 2 stack_end_ptr ptr, /* (20) pointer to next useable stack frame */ 1 43 2 lot_ptr ptr, /* (22) pointer to the lot for the current ring */ 1 44 2 signal_ptr ptr, /* (24) pointer to signal procedure for current ring */ 1 45 2 bar_mode_sp ptr, /* (26) value of sp before entering bar mode */ 1 46 2 pl1_operators_ptr ptr, /* (28) pointer to pl1_operators_$operator_table */ 1 47 2 call_op_ptr ptr, /* (30) pointer to standard call operator */ 1 48 2 push_op_ptr ptr, /* (32) pointer to standard push operator */ 1 49 2 return_op_ptr ptr, /* (34) pointer to standard return operator */ 1 50 2 return_no_pop_op_ptr 1 51 ptr, /* (36) pointer to standard return / no pop operator */ 1 52 2 entry_op_ptr ptr, /* (38) pointer to standard entry operator */ 1 53 2 trans_op_tv_ptr ptr, /* (40) pointer to translator operator ptrs */ 1 54 2 isot_ptr ptr, /* (42) pointer to ISOT */ 1 55 2 sct_ptr ptr, /* (44) pointer to System Condition Table */ 1 56 2 unwinder_ptr ptr, /* (46) pointer to unwinder for current ring */ 1 57 2 sys_link_info_ptr ptr, /* (48) pointer to *system link name table */ 1 58 2 rnt_ptr ptr, /* (50) pointer to Reference Name Table */ 1 59 2 ect_ptr ptr, /* (52) pointer to event channel table */ 1 60 2 assign_linkage_ptr ptr, /* (54) pointer to storage for (obsolete) hcs_$assign_linkage */ 1 61 2 heap_header_ptr ptr, /* (56) pointer to the heap header for this ring */ 1 62 2 trace, 1 63 3 frames, 1 64 4 count fixed bin, /* (58) number of trace frames */ 1 65 4 top_ptr ptr unal, /* (59) pointer to last trace frame */ 1 66 3 in_trace bit (36) aligned, /* (60) trace antirecursion flag */ 1 67 2 pad2 bit (36), /* (61) */ 1 68 2 pad5 pointer; /* (62) pointer to future stuff */ 1 69 1 70 /* The following offset refers to a table within the pl1 operator table. */ 1 71 1 72 dcl tv_offset fixed bin init (361) internal static; 1 73 /* (551) octal */ 1 74 1 75 1 76 /* The following constants are offsets within this transfer vector table. */ 1 77 1 78 dcl ( 1 79 call_offset fixed bin init (271), 1 80 push_offset fixed bin init (272), 1 81 return_offset fixed bin init (273), 1 82 return_no_pop_offset fixed bin init (274), 1 83 entry_offset fixed bin init (275) 1 84 ) internal static; 1 85 1 86 1 87 1 88 1 89 1 90 /* The following declaration is an overlay of the whole stack header. Procedures which 1 91* move the whole stack header should use this overlay. 1 92**/ 1 93 1 94 dcl stack_header_overlay (size (stack_header)) fixed bin based (sb); 1 95 1 96 1 97 1 98 /* END INCLUDE FILE ... stack_header.incl.pl1 */ 41 42 2 1 /* BEGIN INCLUDE FILE area_info.incl.pl1 12/75 */ 2 2 2 3 dcl area_info_version_1 fixed bin static init (1) options (constant); 2 4 2 5 dcl area_infop ptr; 2 6 2 7 dcl 1 area_info aligned based (area_infop), 2 8 2 version fixed bin, /* version number for this structure is 1 */ 2 9 2 control aligned like area_control, /* control bits for the area */ 2 10 2 owner char (32) unal, /* creator of the area */ 2 11 2 n_components fixed bin, /* number of components in the area (returned only) */ 2 12 2 size fixed bin (18), /* size of the area in words */ 2 13 2 version_of_area fixed bin, /* version of area (returned only) */ 2 14 2 areap ptr, /* pointer to the area (first component on multisegment area) */ 2 15 2 allocated_blocks fixed bin, /* number of blocks allocated */ 2 16 2 free_blocks fixed bin, /* number of free blocks not in virgin */ 2 17 2 allocated_words fixed bin (30), /* number of words allocated in the area */ 2 18 2 free_words fixed bin (30); /* number of words free in area not in virgin */ 2 19 2 20 dcl 1 area_control aligned based, 2 21 2 extend bit (1) unal, /* says area is extensible */ 2 22 2 zero_on_alloc bit (1) unal, /* says block gets zerod at allocation time */ 2 23 2 zero_on_free bit (1) unal, /* says block gets zerod at free time */ 2 24 2 dont_free bit (1) unal, /* debugging aid, turns off free requests */ 2 25 2 no_freeing bit (1) unal, /* for allocation method without freeing */ 2 26 2 system bit (1) unal, /* says area is managed by system */ 2 27 2 pad bit (30) unal; 2 28 2 29 /* END INCLUDE FILE area_info.incl.pl1 */ 43 44 3 1 /* BEGIN INCLUDE FILE area_structures.incl.pl1 10/75 */ 3 2 /* Modified September 1981 by J. Bongiovanni for allocation_p_clock */ 3 3 3 4 dcl area_version_1 fixed bin static init (1); /* version number for this area format */ 3 5 3 6 dcl areap ptr; 3 7 3 8 dcl 1 area_header aligned based (areap), 3 9 2 version fixed bin (35), /* 0 for buddy system, 1 for current areas */ 3 10 2 last_usable bit (18), /* rel pointer to end of area */ 3 11 2 next_virgin bit (18), /* rel pointer to next slot in virgin territory */ 3 12 2 flags, 3 13 3 extend bit (1) unal, /* says area is extensible */ 3 14 3 zero_on_alloc bit (1) unal, /* says to zero after allocation */ 3 15 3 zero_on_free bit (1) unal, /* says to zero after freeing */ 3 16 3 dont_free bit (1) unal, /* dont honor free request -- debugging tool */ 3 17 3 defined_by_call bit (1) unal, /* says area seg got via define_area_ call */ 3 18 3 system bit (1) unal, /* ayss area is managed by the system */ 3 19 3 mbz bit (30) unal, 3 20 2 allocation_method fixed bin, /* 0 is standard, 1 is no_freeing method */ 3 21 2 last_size bit (18), /* size of last allocated block before virgin territory */ 3 22 2 last_block bit (18), /* rel pointer to last allocated block before virgin territory */ 3 23 2 freep (3:16), /* free list info */ 3 24 3 relp bit (18) unal, /* pointer to first block on list */ 3 25 3 max_block_size bit (18) unal, /* size of largest block on list, if known. else zero */ 3 26 2 allocation_p_clock bit (36) aligned, /* counter to prevent IPS race */ 3 27 2 extend_info bit (18) unal, /* offset to extend info block */ 3 28 2 recovery_info bit (18) unal, /* eventually will hold recovery info relp */ 3 29 2 n_allocated fixed bin (17) unal, /* number of allocated blocks */ 3 30 2 n_free fixed bin (17) unal; /* number of free blocks */ 3 31 3 32 dcl (STANDARD_ALLOCATION_METHOD init (0), 3 33 NO_FREEING_ALLOCATION_METHOD init (1) 3 34 ) fixed bin internal static; 3 35 3 36 dcl extend_blockp ptr; 3 37 3 38 dcl 1 extend_block aligned based (extend_blockp), /* contents of extend block for extensible areas */ 3 39 2 first_area ptr unal, /* pointer to first area */ 3 40 2 next_area ptr unal, /* pointer to next area in chain */ 3 41 2 sequence_no fixed bin, /* sequence number for this component */ 3 42 2 name char (32), /* owner of the area */ 3 43 2 pad fixed; /* brings it to an even, 12 word allocation */ 3 44 3 45 dcl alloc_blkhdrsz static internal init(2); 3 46 dcl 1 no_free_area_header aligned based(areap), /* overlay for no_free areas */ 3 47 2 pad(4) ptr, 3 48 2 current_component ptr; /* points to component from which we are allocating */ 3 49 3 50 dcl blockp ptr; 3 51 3 52 dcl 1 block aligned based (blockp), /* declaration for block header */ 3 53 2 prev_size bit (18) unal, /* size of preceding block */ 3 54 2 cur_size bit (18) unal, /* size of current block */ 3 55 2 buddy_pad bit (8) unal, /* non_zero for buddy system area */ 3 56 2 prev_busy bit (1) unal, /* previous-block-is-used flag */ 3 57 2 marked bit (1) unal, 3 58 2 q_no bit (8) unal, /* stratum number when in free list */ 3 59 2 header bit (18) unal, /* pointer to head of area */ 3 60 2 fp bit (18) unal, /* forward free list thread */ 3 61 2 bp bit (18) unal; /* backward free list thread */ 3 62 3 63 dcl min_block_size fixed bin static init (8); /* minimum allowed block size */ 3 64 3 65 /* END INCLUDE FILE area_structures.incl.pl1 */ 45 46 47 48 set_user_storage: entry (address); 49 50 whox = 2; 51 goto join; 52 53 54 set_system_storage: entry (address); 55 56 whox = 1; 57 58 join: if cu_$arg_count () ^= 1 then do; 59 call com_err_ (0, me (whox), "Usage: ^a {-create | -system | {pointer}}", me (whox)); 60 return; 61 end; 62 63 sb = ptr (stackframeptr (), 0); /* get ptr to base of stack */ 64 65 if address = "-system" then new_ptr = sb -> stack_header.clr_ptr; 66 67 else if address = "-create" then do; 68 ai.version = area_info_version_1; 69 string (ai.control) = ""b; 70 ai.control.extend = "1"b; 71 ai.control.zero_on_free = "1"b; 72 ai.control.system = "1"b; 73 ai.owner = me (whox); 74 ai.size = sys_info$max_seg_size; 75 ai.areap = null (); 76 call define_area_ (addr (ai), code); 77 if code ^= 0 then do; 78 call com_err_ (code, me (whox), "Creating area."); 79 return; 80 end; 81 new_ptr = ai.areap; 82 end; 83 84 else do; 85 new_ptr = cv_ptr_ (address, code); 86 if new_ptr = null then do; /* perhaps system entry should accept null */ 87 if code = 0 then code = error_table_$badcall; 88 call com_err_ (code, me (whox), address); 89 return; 90 end; 91 if ^(new_ptr -> area_header.flags.zero_on_alloc | new_ptr -> area_header.flags.zero_on_free) then do; 92 call com_err_ (0, me (whox), "Area must be either zero_on_free or zero_on_alloc."); 93 call cv_ptr_$terminate (new_ptr); 94 return; 95 end; 96 end; 97 98 if whox = 2 99 then call set_user_free_area_ (new_ptr); 100 else call set_system_free_area_ (new_ptr); 101 102 return; 103 104 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/86 1033.7 set_storage_ptrs.pl1 >special_ldd>install>MR12.0-1206>set_storage_ptrs.pl1 41 1 11/04/86 1324.3 stack_header.incl.pl1 >special_ldd>install>MR12.0-1206>stack_header.incl.pl1 43 2 06/11/76 1043.4 area_info.incl.pl1 >ldd>include>area_info.incl.pl1 45 3 09/14/81 1347.6 area_structures.incl.pl1 >ldd>include>area_structures.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 76 76 address parameter char unaligned dcl 19 set ref 48 54 65 67 85* 88* ai 000106 automatic structure level 1 dcl 23 set ref 76 76 area_control based structure level 1 dcl 2-20 area_header based structure level 1 dcl 3-8 area_info based structure level 1 dcl 2-7 area_info_version_1 constant fixed bin(17,0) initial dcl 2-3 ref 68 areap 16 000106 automatic pointer level 2 dcl 23 set ref 75* 81 clr_ptr 10 based pointer level 2 dcl 1-26 ref 65 code 000104 automatic fixed bin(35,0) dcl 22 set ref 76* 77 78* 85* 87 87* 88* com_err_ 000010 constant entry external dcl 27 ref 59 78 88 92 control 1 000106 automatic structure level 2 dcl 23 set ref 69* cu_$arg_count 000012 constant entry external dcl 28 ref 58 cv_ptr_ 000014 constant entry external dcl 29 ref 85 cv_ptr_$terminate 000016 constant entry external dcl 30 ref 93 define_area_ 000020 constant entry external dcl 31 ref 76 error_table_$badcall 000026 external static fixed bin(35,0) dcl 36 ref 87 extend 1 000106 automatic bit(1) level 3 packed unaligned dcl 23 set ref 70* flags 3 based structure level 2 dcl 3-8 me 000000 constant char(20) initial array dcl 25 set ref 59* 59* 73 78* 88* 92* new_ptr 000102 automatic pointer dcl 21 set ref 65* 81* 85* 86 91 91 93* 98* 100* null builtin function dcl 39 ref 75 86 owner 2 000106 automatic char(32) level 2 packed unaligned dcl 23 set ref 73* ptr builtin function dcl 39 ref 63 sb 000132 automatic pointer dcl 1-24 set ref 63* 65 set_system_free_area_ 000022 constant entry external dcl 32 ref 100 set_user_free_area_ 000024 constant entry external dcl 33 ref 98 size 13 000106 automatic fixed bin(18,0) level 2 dcl 23 set ref 74* stack_header based structure level 1 dcl 1-26 stackframeptr builtin function dcl 39 ref 63 sys_info$max_seg_size 000030 external static fixed bin(19,0) dcl 37 ref 74 system 1(05) 000106 automatic bit(1) level 3 packed unaligned dcl 23 set ref 72* version 000106 automatic fixed bin(17,0) level 2 dcl 23 set ref 68* whox 000100 automatic fixed bin(17,0) dcl 20 set ref 50* 56* 59 59 73 78 88 92 98 zero_on_alloc 3(01) based bit(1) level 3 packed unaligned dcl 3-8 ref 91 zero_on_free 1(02) 000106 automatic bit(1) level 3 in structure "ai" packed unaligned dcl 23 in procedure "set_storage_ptrs" set ref 71* zero_on_free 3(02) based bit(1) level 3 in structure "area_header" packed unaligned dcl 3-8 in procedure "set_storage_ptrs" ref 91 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. NO_FREEING_ALLOCATION_METHOD internal static fixed bin(17,0) initial dcl 3-32 STANDARD_ALLOCATION_METHOD internal static fixed bin(17,0) initial dcl 3-32 alloc_blkhdrsz internal static fixed bin(17,0) initial dcl 3-45 area_infop automatic pointer dcl 2-5 area_version_1 internal static fixed bin(17,0) initial dcl 3-4 areap automatic pointer dcl 3-6 block based structure level 1 dcl 3-52 blockp automatic pointer dcl 3-50 call_offset internal static fixed bin(17,0) initial dcl 1-78 entry_offset internal static fixed bin(17,0) initial dcl 1-78 error_table_$noarg external static fixed bin(35,0) dcl 35 extend_block based structure level 1 dcl 3-38 extend_blockp automatic pointer dcl 3-36 min_block_size internal static fixed bin(17,0) initial dcl 3-63 no_free_area_header based structure level 1 dcl 3-46 push_offset internal static fixed bin(17,0) initial dcl 1-78 return_no_pop_offset internal static fixed bin(17,0) initial dcl 1-78 return_offset internal static fixed bin(17,0) initial dcl 1-78 stack_header_overlay based fixed bin(17,0) array dcl 1-94 tv_offset internal static fixed bin(17,0) initial dcl 1-72 NAMES DECLARED BY EXPLICIT CONTEXT. join 000135 constant label dcl 58 ref 51 set_storage_ptrs 000067 constant entry external dcl 11 set_system_storage 000120 constant entry external dcl 54 set_user_storage 000100 constant entry external dcl 48 NAME DECLARED BY CONTEXT OR IMPLICATION. string builtin function ref 69 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 640 672 467 650 Length 1142 467 32 233 151 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME set_storage_ptrs 146 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME set_storage_ptrs 000100 whox set_storage_ptrs 000102 new_ptr set_storage_ptrs 000104 code set_storage_ptrs 000106 ai set_storage_ptrs 000132 sb set_storage_ptrs THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cv_ptr_ cv_ptr_$terminate define_area_ set_system_free_area_ set_user_free_area_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badcall sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000066 48 000074 50 000113 51 000115 54 000116 56 000133 58 000135 59 000147 60 000202 63 000203 65 000206 67 000221 68 000225 69 000227 70 000230 71 000232 72 000234 73 000236 74 000244 75 000250 76 000252 77 000264 78 000266 79 000314 81 000315 82 000317 85 000320 86 000342 87 000346 88 000353 89 000400 91 000401 92 000405 93 000434 94 000443 98 000444 100 000457 102 000466 ----------------------------------------------------------- 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