COMPILATION LISTING OF SEGMENT find_ls_owner_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/05/86 1030.9 mst Wed Options: optimize map 1 /* ****************************************************** 2* * * 3* * * 4* * Copyright (c) 1972 by Massachusetts Institute of * 5* * Technology and Honeywell Information Systems, Inc. * 6* * * 7* * * 8* ****************************************************** */ 9 10 find_ls_owner_: proc(lptr, target, ls_offset); 11 12 /* This procedure takes a pointer, presumably to the combined linkage segment, and 13* returns the segment number of the owning procedure. 14* If the pointer is not to the cls or if it is not a pointer, 15* -1 is returned */ 16 17 /* initially coded as trace_link_ by M. Weaver 17 June 1971 */ 18 /* last modified by M. Weaver 21 August 1971 */ 19 /* recoded as find_ls_owner_ by M. Weaver 11 June 1973 */ 20 /* modified 14 September 1978 by M. Weaver to initialize after_beg, before_end */ 21 22 23 24 25 /* numbers */ 26 27 dcl (lng, i, hcsct, highct) fixed bin; 28 dcl (target, ls_offset) fixed bin(18); 29 dcl code fixed bin(35); 30 31 /* character strings */ 32 33 dcl (dname, pdname) char(168) aligned; 34 dcl (ename, pename) char(32) aligned; 35 36 /* bit strings */ 37 38 dcl (tseg, toff, closest_off, lsoff) bit(18) aligned; 39 dcl check_sw bit(1) aligned; 40 41 /* pointers */ 42 43 dcl (lptr, linkp based) ptr; 44 45 /* entries */ 46 47 dcl hcs_$high_low_seg_count entry(fixed bin, fixed bin); 48 49 /* structures */ 50 51 dcl 1 lot(0:999) based(lot_ptr) aligned, 52 2 (seg, off) bit(18) unal; 53 54 /* builtins */ 55 dcl (addr, baseno, fixed, ptr, null, rel, substr) builtin; 56 /* */ 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 */ 57 58 2 1 /* BEGIN INCLUDE FILE its.incl.pl1 2 2* modified 27 July 79 by JRDavis to add its_unsigned 2 3* Internal format of ITS pointer, including ring-number field for follow-on processor */ 2 4 2 5 dcl 1 its based aligned, /* declaration for ITS type pointer */ 2 6 2 pad1 bit (3) unaligned, 2 7 2 segno bit (15) unaligned, /* segment number within the pointer */ 2 8 2 ringno bit (3) unaligned, /* ring number within the pointer */ 2 9 2 pad2 bit (9) unaligned, 2 10 2 its_mod bit (6) unaligned, /* should be 43(8) */ 2 11 2 12 2 offset bit (18) unaligned, /* word offset within the addressed segment */ 2 13 2 pad3 bit (3) unaligned, 2 14 2 bit_offset bit (6) unaligned, /* bit offset within the word */ 2 15 2 pad4 bit (3) unaligned, 2 16 2 mod bit (6) unaligned; /* further modification */ 2 17 2 18 dcl 1 itp based aligned, /* declaration for ITP type pointer */ 2 19 2 pr_no bit (3) unaligned, /* number of pointer register to use */ 2 20 2 pad1 bit (27) unaligned, 2 21 2 itp_mod bit (6) unaligned, /* should be 41(8) */ 2 22 2 23 2 offset bit (18) unaligned, /* word offset from pointer register word offset */ 2 24 2 pad2 bit (3) unaligned, 2 25 2 bit_offset bit (6) unaligned, /* bit offset relative to new word offset */ 2 26 2 pad3 bit (3) unaligned, 2 27 2 mod bit (6) unaligned; /* further modification */ 2 28 2 29 2 30 dcl 1 its_unsigned based aligned, /* just like its, but with unsigned binary */ 2 31 2 pad1 bit (3) unaligned, 2 32 2 segno fixed bin (15) unsigned unaligned, 2 33 2 ringno fixed bin (3) unsigned unaligned, 2 34 2 pad2 bit (9) unaligned, 2 35 2 its_mod bit (6) unaligned, 2 36 2 37 2 offset fixed bin (18) unsigned unaligned, 2 38 2 pad3 bit (3) unaligned, 2 39 2 bit_offset fixed bin (6) unsigned unaligned, 2 40 2 pad4 bit (3) unaligned, 2 41 2 mod bit (6) unaligned; 2 42 2 43 dcl 1 itp_unsigned based aligned, /* just like itp, but with unsigned binary where appropriate */ 2 44 2 pr_no fixed bin (3) unsigned unaligned, 2 45 2 pad1 bit (27) unaligned, 2 46 2 itp_mod bit (6) unaligned, 2 47 2 48 2 offset fixed bin (18) unsigned unaligned, 2 49 2 pad2 bit (3) unaligned, 2 50 2 bit_offset fixed bin (6) unsigned unaligned, 2 51 2 pad3 bit (3) unaligned, 2 52 2 mod bit (6) unaligned; 2 53 2 54 2 55 dcl ITS_MODIFIER bit (6) unaligned internal static options (constant) init ("43"b3); 2 56 dcl ITP_MODIFIER bit (6) unaligned internal static options (constant) init ("41"b3); 2 57 2 58 /* END INCLUDE FILE its.incl.pl1 */ 59 60 61 /* * * * * * * * * * * * * * * * * * * * */ 62 check_sw = "0"b; 63 target = -1; /* initialize; return this if error */ 64 ls_offset = 0; 65 common: if lptr = null then go to return; /* don't risk simfault */ 66 67 /* check to see if we have a real pointer */ 68 if addr(lptr)->its.its_mod ^= "100011"b then go to return; /* not a ptr */ 69 70 sb = ptr(addr(tseg),0); /* get ptr to base of stack */ 71 72 call hcs_$high_low_seg_count(highct, hcsct); /* find range */ 73 74 /* copy sections of lptr to save accessing time */ 75 tseg = baseno(lptr); 76 toff = rel(lptr); 77 78 if check_sw then go to check; /* see if ptr points to a cls */ 79 80 closest_off = "0"b; /* keep track of closest linkage header */ 81 82 /* loop through LOT looking for a match; if don't find any, lptr doesn't 83* point to a linkage section */ 84 /* pointer to LOT (linkage offset table) is conveniently stored in stack header */ 85 do i = hcsct to hcsct + highct; /* check all possible segs; link won't be pointing to a ring 0 seg */ 86 lsoff = lot_ptr -> lot(i).off; /* isolate offset of seg's ls */ 87 if lot_ptr->lot(i).seg = tseg /* get correct segment */ 88 then if lsoff <= toff /* could be in range */ 89 then if lsoff >= closest_off /* got better value */ 90 then do; 91 closest_off = lsoff; /* update */ 92 target = i; 93 ls_offset = bin(closest_off, 18); 94 end; 95 end; /* finished looking */ 96 return; /* used only for find_ls_owner_ entry */ 97 98 check: stack_seg = baseno(sb); /* get segno of stack in case cls is there */ 99 100 /* assume LOT is contiguous with cls if they are in same seg */ 101 /* also assume that a ls in a seg other than stack is combined only with other ls's */ 102 103 if (baseno(lot_ptr) = tseg) & (rel(lot_ptr) <= toff) then after_beg = "1"b; 104 105 do i = hcsct to hcsct + highct; /* may need to look at entire LOT */ 106 lsoff = lot_ptr -> lot(i).off; /* extract ahead of time */ 107 if lot_ptr -> lot(i).seg = tseg /* same seg */ 108 then if tseg ^= stack_seg then do; 109 yes: return ("1"b); 110 end; 111 else if lsoff > toff 112 then if after_beg then go to yes; 113 else before_end = "1"b; 114 else if lsoff = toff then go to yes; 115 else if lsoff < toff 116 then if before_end then go to yes; 117 else after_beg = "1"b; 118 end; 119 if after_beg & before_end then go to yes; 120 121 return: 122 if check_sw then return ("0"b); /* all done */ 123 else return; 124 /* */ 125 is_cls_: entry(lptr) returns(bit(1) aligned); 126 127 declare (after_beg, before_end) bit(1) aligned; 128 declare stack_seg bit(18) aligned; 129 130 after_beg, before_end = "0"b; 131 check_sw = "1"b; 132 133 go to common; 134 135 end find_ls_owner_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/86 1033.8 find_ls_owner_.pl1 >special_ldd>install>MR12.0-1206>find_ls_owner_.pl1 57 1 11/04/86 1324.3 stack_header.incl.pl1 >special_ldd>install>MR12.0-1206>stack_header.incl.pl1 59 2 11/26/79 1320.6 its.incl.pl1 >ldd>include>its.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 55 ref 68 70 after_beg 000112 automatic bit(1) dcl 127 set ref 103* 111 117* 119 130* baseno builtin function dcl 55 ref 75 98 103 before_end 000113 automatic bit(1) dcl 127 set ref 113* 115 119 130* check_sw 000107 automatic bit(1) dcl 39 set ref 62* 78 121 131* closest_off 000105 automatic bit(18) dcl 38 set ref 80* 87 91* 93 hcs_$high_low_seg_count 000010 constant entry external dcl 47 ref 72 hcsct 000101 automatic fixed bin(17,0) dcl 27 set ref 72* 85 85 105 105 highct 000102 automatic fixed bin(17,0) dcl 27 set ref 72* 85 105 i 000100 automatic fixed bin(17,0) dcl 27 set ref 85* 86 87 92* 105* 106 107* its based structure level 1 dcl 2-5 its_mod 0(30) based bit(6) level 2 packed unaligned dcl 2-5 ref 68 lot based structure array level 1 dcl 51 lot_ptr 26 based pointer level 2 dcl 1-26 ref 86 87 103 103 106 107 lptr parameter pointer dcl 43 set ref 10 65 68 75 76 125 ls_offset parameter fixed bin(18,0) dcl 28 set ref 10 64* 93* lsoff 000106 automatic bit(18) dcl 38 set ref 86* 87 87 91 106* 111 114 115 null builtin function dcl 55 ref 65 off 0(18) based bit(18) array level 2 packed unaligned dcl 51 ref 86 106 ptr builtin function dcl 55 ref 70 rel builtin function dcl 55 ref 76 103 sb 000110 automatic pointer dcl 1-24 set ref 70* 86 87 98 103 103 106 107 seg based bit(18) array level 2 packed unaligned dcl 51 ref 87 107 stack_header based structure level 1 dcl 1-26 stack_seg 000114 automatic bit(18) dcl 128 set ref 98* 107 target parameter fixed bin(18,0) dcl 28 set ref 10 63* 92* toff 000104 automatic bit(18) dcl 38 set ref 76* 87 103 111 114 115 tseg 000103 automatic bit(18) dcl 38 set ref 70 75* 87 103 107 107 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ITP_MODIFIER internal static bit(6) initial unaligned dcl 2-56 ITS_MODIFIER internal static bit(6) initial unaligned dcl 2-55 call_offset internal static fixed bin(17,0) initial dcl 1-78 code automatic fixed bin(35,0) dcl 29 dname automatic char(168) dcl 33 ename automatic char(32) dcl 34 entry_offset internal static fixed bin(17,0) initial dcl 1-78 fixed builtin function dcl 55 itp based structure level 1 dcl 2-18 itp_unsigned based structure level 1 dcl 2-43 its_unsigned based structure level 1 dcl 2-30 linkp based pointer dcl 43 lng automatic fixed bin(17,0) dcl 27 pdname automatic char(168) dcl 33 pename automatic char(32) dcl 34 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 substr builtin function dcl 55 tv_offset internal static fixed bin(17,0) initial dcl 1-72 NAMES DECLARED BY EXPLICIT CONTEXT. check 000142 constant label dcl 98 ref 78 common 000034 constant label dcl 65 ref 133 find_ls_owner_ 000020 constant entry external dcl 10 is_cls_ 000271 constant entry external dcl 125 return 000243 constant label dcl 121 ref 65 68 yes 000204 constant label dcl 109 ref 111 114 115 119 NAME DECLARED BY CONTEXT OR IMPLICATION. bin builtin function ref 93 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 350 362 304 360 Length 570 304 12 171 44 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME find_ls_owner_ 88 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME find_ls_owner_ 000100 i find_ls_owner_ 000101 hcsct find_ls_owner_ 000102 highct find_ls_owner_ 000103 tseg find_ls_owner_ 000104 toff find_ls_owner_ 000105 closest_off find_ls_owner_ 000106 lsoff find_ls_owner_ 000107 check_sw find_ls_owner_ 000110 sb find_ls_owner_ 000112 after_beg find_ls_owner_ 000113 before_end find_ls_owner_ 000114 stack_seg find_ls_owner_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac signal_op ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. hcs_$high_low_seg_count NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000014 62 000027 63 000030 64 000033 65 000034 68 000041 70 000045 72 000050 75 000062 76 000070 78 000072 80 000074 85 000075 86 000105 87 000111 91 000123 92 000124 93 000127 95 000131 96 000133 98 000142 103 000145 105 000160 106 000171 107 000175 109 000204 111 000216 113 000224 114 000227 115 000230 117 000233 118 000235 119 000237 121 000243 123 000256 125 000265 130 000277 131 000301 133 000303 ----------------------------------------------------------- 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