COMPILATION LISTING OF SEGMENT makeunknown_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1008.8 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 /* format: style4 */ 14 makeunknown_: proc (a_segno, a_switches, zero_lot, a_code); 15 16 /* 17* 18* Written March 1975 by R. Bratt 19* 20* Last modified by: 21* 22* R. Bratt July 13 1975 to not report segno_in_use 23* R. Bratt Janurary 26 1976 for nss 24* M. Weaver April 22 1977 to indicate zero usage count 25* B. Margulies to protect nonnull-refnames when terminating null ones 26* E. N. Kittlitz February 1983 for kst_util$unthread_kste. 27* K. Loepere November 1984 to rename to makeunknown_. 28* 29* ---> makeunknown_ removes the KST entry for a segment given its segment number. 30* makeunknown_ operates as follows. If the kste has a positive usage count in the caller's 31* ring then the usage count is decremented unless the caller specified force, in which 32* case the usage count is forcably zeroed. If all usage counts are not zero, then 33* makeunknown_ returns. Otherwise, makeunknown_ verifies that the segment has no known 34* inferiors. If this condition obtains then makeunknown_ unbinds the segment number 35* from the object. If rsw is set then the freed segment number is marked as reserved. 36* Otherwise, the segment number is returned to the pool of free segment numbers. 37* USAGE: call makeunknown_ (segno, switches, zero_lot, code) 38* 39* segno fixed bin(17) - - - segment number of the segment 40* switches bit(36) aligned - - - switches 41* 1 - - - reserve switch 42* x1 - - - force switch 43* zero_lot bit (1) aligned - - - indicates whether lot entry should be zeroed 44* code fixed bin (35) - - - error code (output) 45* 46* ---> CALL makeunknown_$protect_names (segno, n_names, switches, zero_lot, code); 47* This is as makeunknown_, but there must be at least n_names+1 references 48* or a code is returned. 49* 50**/ 51 52 dcl a_segno fixed bin (17), 53 a_switches bit (36) aligned, 54 zero_lot bit (1) aligned, 55 a_code fixed bin (35); 56 dcl a_n_names fixed bin; 57 58 dcl pkstep ptr, 59 ring fixed bin, 60 code fixed bin (35), 61 segno fixed bin (17); 62 dcl n_names fixed bin; 63 64 dcl 1 switches aligned, 65 2 rsw bit (1) unal, 66 2 force bit (1) unal, 67 2 pad bit (34) unal; 68 69 dcl setfaults$disconnect ext entry (fixed bin (17)), 70 pathname_am$clear ext entry (fixed bin (17)), 71 get_kstep ext entry (fixed bin (17), ptr, fixed bin (35)), 72 kst_util$unthread_kste ext entry (ptr), 73 level$get ext entry returns (fixed bin); 74 75 dcl (error_table_$known_in_other_rings, error_table_$infcnt_non_zero) ext fixed bin (35); 76 dcl error_table_$no_null_refnames fixed bin (35) ext static; 77 78 dcl (addr, baseno, baseptr, binary, fixed, null, rel, substr, unspec) builtin; 79 1 1 /* START OF: kst.incl.pl1 * * * * * */ 1 2 1 3 /* 1 4*Modified March 1976 by R. Bratt 1 5*Modified November 1984 to remove hdr, Keith Loepere. */ 1 6 1 7 1 8 /****^ HISTORY COMMENTS: 1 9* 1) change(86-08-08,GDixon), approve(86-08-08,MCR7388), 1 10* audit(86-09-02,Farley), install(86-09-08,MR12.0-1150): 1 11* Add warning on use of kste.entryp. 1 12* END HISTORY COMMENTS */ 1 13 1 14 1 15 dcl pds$kstp ext ptr, 1 16 (kstp, kstep) ptr; 1 17 1 18 dcl 1 kst aligned based (kstp), /* KST header declaration */ 1 19 2 lowseg fixed bin (17), /* lowest segment number described by kst */ 1 20 2 highseg fixed bin (17), /* highest segment number described by kst */ 1 21 2 highest_used_segno fixed bin (17), /* highest segment number yet used */ 1 22 2 lvs fixed bin (8), /* number of private LVs this process is connected to */ 1 23 2 time_of_bootload fixed bin (71), /* bootload time during prelinking */ 1 24 2 garbage_collections fixed bin (17) unaligned, /* KST garbage collections */ 1 25 2 entries_collected fixed bin (17) unaligned, /* KST entries recovered by garbage collection */ 1 26 2 free_list bit (18) unaligned, /* relative pointer to first free kste */ 1 27 2 prelinked_ring (7) bit (1) unaligned, /* rings prelinked in process */ 1 28 2 template bit (1) unaligned, /* this is a template kst if set */ 1 29 2 allow_256K_connect bit (1) unaligned, /* can use 256K segments */ 1 30 2 unused_2 bit (9) unaligned, 1 31 2 uid_hash_bucket (0 : 127) bit (18) unaligned, /* hash buckets */ 1 32 2 kst_entry (0 refer (kst.lowseg):0 refer (kst.highseg)) aligned like kste, /* kst entries */ 1 33 2 lv (1:256) bit (36), /* private logical volume connection list */ 1 34 2 end_of_kst bit (36); 1 35 1 36 dcl 1 kste based (kstep) aligned, /* KST entry declaration */ 1 37 2 fp bit (18) unaligned, /* forward rel pointer */ 1 38 2 segno fixed bin (17) unaligned, /* segment number of this kste */ 1 39 2 usage_count (0:7) fixed bin (8) unaligned, /* outstanding initiates/ring */ 1 40 2 entryp ptr unaligned, /* branch pointer */ 1 41 /* See WARNING below for requirements to use entryp. */ 1 42 2 uid bit (36) aligned, /* unique identifier */ 1 43 2 access_information unaligned, 1 44 3 dtbm bit (36), /* date time branch modified */ 1 45 3 extended_access bit (33), /* extended access from the branch */ 1 46 3 access bit (3), /* rew */ 1 47 3 ex_rb (3) bit (3), /* ring brackets from branch */ 1 48 2 pad1 bit (3) unaligned, 1 49 2 flags unaligned, 1 50 3 dirsw bit (1), /* directory switch */ 1 51 3 allow_write bit (1), /* set if initiated with write permission */ 1 52 3 priv_init bit (1), /* privileged initiation */ 1 53 3 tms bit (1), /* transparent modification switch */ 1 54 3 tus bit (1), /* transparent usage switch */ 1 55 3 tpd bit (1), /* transparent paging device switch */ 1 56 3 audit bit (1), /* audit switch */ 1 57 3 explicit_deact_ok bit (1), /* set if I am willing to have a user force deactivate */ 1 58 3 pad bit (3), 1 59 2 infcount fixed bin (12) unaligned; /* _i_f dirsw _t_h_e_n inferior count _e_l_s_e lv index */ 1 60 1 61 1 62 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 63 /* */ 1 64 /* WARNING: Before using kste.entryp to get a pointer to the directory */ 1 65 /* entry associated with the kst entry, you must first validate its value */ 1 66 /* by calling sum$getbranch or sum$getbranch_root_my. This call also locks */ 1 67 /* the containing directory. The containing directory must remain locked */ 1 68 /* during the entire period when kste.entryp and the directory entry are */ 1 69 /* being referenced. Once the directory is unlocked, kste.entryp can no */ 1 70 /* longer be used to get a pointer to the entry within the unlocked */ 1 71 /* directory since the dir entry could have been moved within the directory */ 1 72 /* by another processor. */ 1 73 /* */ 1 74 /* If you only need a pointer to the directory containing the associated */ 1 75 /* dir entry (but not to the dir entry itself), you can use: */ 1 76 /* pointer (kste.entryp, 0) */ 1 77 /* without calling sum to lock the directory and validate entryp. GDixon */ 1 78 /* */ 1 79 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 80 1 81 /* END OF: kst.incl.pl1 * * * * * */ 80 81 82 83 n_names = 0; 84 go to Join; 85 86 protect_names: 87 entry (a_segno, a_n_names, a_switches, zero_lot, a_code); 88 n_names = a_n_names; 89 90 Join: 91 string (switches) = a_switches; 92 segno = a_segno; 93 zero_lot = "0"b; 94 a_code = 0; 95 kstp = pds$kstp; 96 ring = level$get (); 97 /* make sure segno is good */ 98 call get_kstep (segno, kstep, code); 99 if code ^= 0 then call abort (code); 100 /* update usage count */ 101 /* Force_switch is not permitted with n_names > 0 */ 102 103 if n_names > 0 104 then if kste.usage_count (ring) ^> n_names /* see only null */ 105 then do; 106 a_code = error_table_$no_null_refnames; 107 return; 108 end; 109 110 if switches.force 111 then kste.usage_count (ring) = 0; 112 else if kste.usage_count (ring) > 0 113 then kste.usage_count (ring) = kste.usage_count (ring) - 1; 114 /* don't terminate if still in use */ 115 116 /* LOT, ISOT entries should be zeroed when usage count goes to 0 */ 117 if kste.usage_count (ring) = 0 then if (ring > 0) & (^kste.dirsw) then zero_lot = "1"b; 118 119 if unspec (kste.usage_count) ^= "0"b 120 then if switches.force 121 then call abort (error_table_$known_in_other_rings); 122 else return; 123 /* don't terminate if known inferiors */ 124 if kste.infcount ^= 0 & kste.flags.dirsw 125 then call abort (error_table_$infcnt_non_zero); 126 /* decrement parent's inferior count */ 127 if kste.entryp ^= null 128 then do; 129 pkstep = addr (kst.kst_entry (fixed (baseno (kste.entryp), 17))); 130 pkstep -> kste.infcount = pkstep -> kste.infcount - 1; 131 end; 132 /* hash out of uid hash thread */ 133 call kst_util$unthread_kste (kstep); 134 /* let the world know its gone */ 135 call setfaults$disconnect (segno); 136 if kste.flags.dirsw then call pathname_am$clear (segno); 137 /* make kste look nice */ 138 unspec (kste) = "0"b; 139 kste.segno = segno; 140 /* thread kste on to free chain */ 141 if switches.rsw 142 then kste.fp = (18)"1"b; 143 else do; 144 kste.fp = kst.free_list; 145 kst.free_list = rel (kstep); 146 end; 147 return; 148 149 abort: proc (code); 150 dcl code fixed bin (35); 151 a_code = code; 152 go to non_local_return; 153 end abort; 154 155 non_local_return: 156 return; 157 158 end makeunknown_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0839.4 makeunknown_.pl1 >special_ldd>install>MR12.3-1114>makeunknown_.pl1 80 1 09/18/86 1308.1 kst.incl.pl1 >ldd>include>kst.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. a_code parameter fixed bin(35,0) dcl 52 set ref 14 86 94* 106* 151* a_n_names parameter fixed bin(17,0) dcl 56 ref 86 88 a_segno parameter fixed bin(17,0) dcl 52 ref 14 86 92 a_switches parameter bit(36) dcl 52 ref 14 86 90 addr builtin function dcl 78 ref 129 baseno builtin function dcl 78 ref 129 code parameter fixed bin(35,0) dcl 150 in procedure "abort" ref 149 151 code 000103 automatic fixed bin(35,0) dcl 58 in procedure "makeunknown_" set ref 98* 99 99* dirsw 7(12) based bit(1) level 3 packed packed unaligned dcl 1-36 set ref 117 124 136 entryp 3 based pointer level 2 packed packed unaligned dcl 1-36 set ref 127 129 error_table_$infcnt_non_zero 000024 external static fixed bin(35,0) dcl 75 set ref 124* error_table_$known_in_other_rings 000022 external static fixed bin(35,0) dcl 75 set ref 119* error_table_$no_null_refnames 000026 external static fixed bin(35,0) dcl 76 ref 106 fixed builtin function dcl 78 ref 129 flags 7(12) based structure level 2 packed packed unaligned dcl 1-36 force 0(01) 000106 automatic bit(1) level 2 packed packed unaligned dcl 64 set ref 110 119 fp based bit(18) level 2 packed packed unaligned dcl 1-36 set ref 141* 144* free_list 7 based bit(18) level 2 packed packed unaligned dcl 1-18 set ref 144 145* get_kstep 000014 constant entry external dcl 69 ref 98 infcount 7(23) based fixed bin(12,0) level 2 packed packed unaligned dcl 1-36 set ref 124 130* 130 kst based structure level 1 dcl 1-18 kst_entry 110 based structure array level 2 dcl 1-18 set ref 129 kst_util$unthread_kste 000016 constant entry external dcl 69 ref 133 kste based structure level 1 dcl 1-36 set ref 138* kstep 000112 automatic pointer dcl 1-15 set ref 98* 103 110 112 112 112 117 117 119 124 124 127 129 133* 136 138 139 141 144 145 kstp 000110 automatic pointer dcl 1-15 set ref 95* 129 144 145 level$get 000020 constant entry external dcl 69 ref 96 lowseg based fixed bin(17,0) level 2 dcl 1-18 ref 129 n_names 000105 automatic fixed bin(17,0) dcl 62 set ref 83* 88* 103 103 null builtin function dcl 78 ref 127 pathname_am$clear 000012 constant entry external dcl 69 ref 136 pds$kstp 000030 external static pointer dcl 1-15 ref 95 pkstep 000100 automatic pointer dcl 58 set ref 129* 130 130 rel builtin function dcl 78 ref 145 ring 000102 automatic fixed bin(17,0) dcl 58 set ref 96* 103 110 112 112 112 117 117 rsw 000106 automatic bit(1) level 2 packed packed unaligned dcl 64 set ref 141 segno 0(18) based fixed bin(17,0) level 2 in structure "kste" packed packed unaligned dcl 1-36 in procedure "makeunknown_" set ref 139* segno 000104 automatic fixed bin(17,0) dcl 58 in procedure "makeunknown_" set ref 92* 98* 135* 136* 139 setfaults$disconnect 000010 constant entry external dcl 69 ref 135 switches 000106 automatic structure level 1 dcl 64 set ref 90* unspec builtin function dcl 78 set ref 119 138* usage_count 1 based fixed bin(8,0) array level 2 packed packed unaligned dcl 1-36 set ref 103 110* 112 112* 112 117 119 zero_lot parameter bit(1) dcl 52 set ref 14 86 93* 117* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. baseptr builtin function dcl 78 binary builtin function dcl 78 substr builtin function dcl 78 NAMES DECLARED BY EXPLICIT CONTEXT. Join 000055 constant label dcl 90 ref 84 abort 000352 constant entry internal dcl 149 ref 99 119 124 makeunknown_ 000013 constant entry external dcl 14 non_local_return 000351 constant label dcl 155 ref 152 protect_names 000036 constant entry external dcl 86 NAME DECLARED BY CONTEXT OR IMPLICATION. string builtin function ref 90 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 532 564 365 542 Length 764 365 32 163 145 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME makeunknown_ 102 external procedure is an external procedure. abort internal procedure shares stack frame of external procedure makeunknown_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME makeunknown_ 000100 pkstep makeunknown_ 000102 ring makeunknown_ 000103 code makeunknown_ 000104 segno makeunknown_ 000105 n_names makeunknown_ 000106 switches makeunknown_ 000110 kstp makeunknown_ 000112 kstep makeunknown_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_kstep kst_util$unthread_kste level$get pathname_am$clear setfaults$disconnect THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$infcnt_non_zero error_table_$known_in_other_rings error_table_$no_null_refnames pds$kstp LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 14 000006 83 000027 84 000030 86 000031 88 000052 90 000055 92 000057 93 000061 94 000062 95 000063 96 000067 98 000075 99 000110 103 000114 106 000131 107 000134 110 000135 112 000151 117 000172 119 000212 122 000230 124 000231 127 000250 129 000254 130 000267 133 000276 135 000305 136 000314 138 000327 139 000333 141 000335 144 000343 145 000346 147 000350 155 000351 149 000352 151 000354 152 000356 ----------------------------------------------------------- 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