COMPILATION LISTING OF SEGMENT rehash_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/12/82 1206.5 mst Fri 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 /* format: style4 */ 12 13 rehash_: procedure (htp, newsize, ec); 14 15 /* originally coded by k.willis 2/71 */ 16 /* Modified for hardcore/cleanup/NSS BIM 1/82 */ 17 18 1 1 /* BEGIN INCLUDE FILE ... hashst.incl.pl1 */ 1 2 /* format: style4 */ 1 3 1 4 /* General Utility hash table */ 1 5 1 6 dcl 1 htable based (htp) aligned, /* hash table entries of level 2 are statistical info */ 1 7 2 nb fixed bin, /* number of buckets in hash table */ 1 8 2 ni fixed bin, /* number of entries used */ 1 9 2 np fixed bin, /* number of times hash_ called referincing this table */ 1 10 2 tnt fixed bin, /* total # of tries to find, enter, or delete an entry */ 1 11 2 id char (4), /* ht01 version 1 of hash_ */ 1 12 2 gnt fixed bin, /* greatest number of tries for search etc. */ 1 13 2 loht fixed bin (18) unsigned, /* length of hash table in words */ 1 14 2 pad bit (36) aligned, /* padding */ 1 15 2 buckets (1:hash_table_size_ refer (htable.nb)), /* 26111=((1024*255)/10 words per entry)-1 (8-word header) */ 1 16 3 name char (32) unaligned, /* identifier of entry */ 1 17 3 value bit (36) aligned, /* value corresponding to name */ 1 18 3 flags aligned, 1 19 4 ds bit (1) unal, /* deleted switch="1"b if deleted */ 1 20 4 empty bit (1) unal, 1 21 4 pad bit (34) unal, /* empty switch="1"b if empty */ 1 22 2 end_of_table bit (0) aligned; /* to get address */ 1 23 1 24 declare MAX_HT_BUCKETS_IN_SEG fixed bin init (26111) int static options (constant); 1 25 declare hash_table_size_ fixed bin; 1 26 1 27 /* END INCLUDE FILE ... hashst.incl.pl1 */ 19 20 21 22 /* PARAMETERS */ 23 24 dcl htp ptr; /* Ptr to existing hash table. */ 25 dcl newsize fixed bin; /* Number of buckets to put in new table */ 26 dcl new_htp pointer; 27 dcl ec fixed bin (35); /* error code. */ 28 29 30 /* AUTOMAGIC */ 31 32 dcl bit_count fixed bin (24); /* the number of bits in a table */ 33 dcl i fixed bin; 34 35 dcl space_provided_switch bit (1) aligned; /* caller gave us new place */ 36 37 dcl new_tablep pointer; 38 39 /* ENTRIES */ 40 41 dcl hash_$make entry (ptr, fixed bin, fixed bin (35)); /* subroutines called */ 42 dcl hash_$in_no_grow entry (ptr, char (*), bit (36) aligned, fixed bin (35)); 43 dcl hcs_$set_bc_seg entry (ptr, fixed bin (24), fixed bin (35)); 44 dcl (get_temp_segment_, 45 release_temp_segment_) entry (char (*), ptr, fixed bin (35)); 46 47 dcl error_table_$full_hashtbl ext fixed bin (35); 48 49 dcl null builtin; 50 51 /* this subroutine changes the size of a hash table. to do this it creates a dummy hash table, 52* initializes it, and inserts each non empty non deleted entry of the old table into the dummy table. 53**/ 54 55 space_provided_switch = "0"b; 56 goto JOIN; 57 58 new_storage: 59 entry (htp, new_htp, newsize, ec); 60 61 space_provided_switch = "1"b; 62 63 JOIN: 64 ec = 0; /* set error code to 0 */ 65 if space_provided_switch 66 then new_tablep = new_htp; 67 else do; 68 call get_temp_segment_ ("rehash_", new_tablep, ec); 69 if ec ^= 0 then return; 70 end; 71 72 call hash_$make (new_tablep, newsize, ec); /* initialize dummy table */ 73 if ec ^= 0 then go to term; /* invalid bucket size */ 74 75 do i = 1 to nb; /* loop on non-empty, non-deleted entries */ 76 if empty (i) = "0"b then if ds (i) ^= "1"b then do; 77 call hash_$in_no_grow (new_tablep, htable.name (i), htable.value (i), ec); 78 if ec = error_table_$full_hashtbl /* if duplicates occur, only one entry in new table */ 79 then go to term; /* .. if new table full, give up */ 80 end; 81 end; 82 83 84 /* At this point, if we are growing an existing segment, we reset bit count */ 85 /* The old code assumed the HT was in a segment by itself. This seems */ 86 /* ill advised, so now we use the actual address of the end of the table. */ 87 /* If the new space was provided, then we do not touch any such thing. */ 88 89 90 if ^space_provided_switch 91 then do; 92 93 bit_count = 36 * bin (rel (addr (new_tablep -> htable.end_of_table)), 18); 94 call hcs_$set_bc_seg (ptr (htp, 0), bit_count, ec); 95 if ec ^= 0 then go to term; 96 hash_table_size_ = new_tablep -> htable.nb; 97 htp -> htable.nb = new_tablep -> htable.nb; 98 htp -> htable = new_tablep -> htable; 99 call release_temp_segment_ ("rehash_", new_tablep, (0)); 100 end; 101 102 return; 103 104 term: if ^space_provided_switch 105 then call release_temp_segment_ ("rehash_", new_tablep, (0)); 106 return; 107 end rehash_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/12/82 1042.7 rehash_.pl1 >spec>on>11/12/82>rehash_.pl1 19 1 04/21/82 1211.8 hashst.incl.pl1 >ldd>include>hashst.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. bit_count 000101 automatic fixed bin(24,0) dcl 32 set ref 93* 94* buckets 10 based structure array level 2 dcl 1-6 ds 21 based bit(1) array level 4 packed unaligned dcl 1-6 set ref 76 ec parameter fixed bin(35,0) dcl 27 set ref 13 58 63* 68* 69 72* 73 77* 78 94* 95 empty 21(01) based bit(1) array level 4 packed unaligned dcl 1-6 set ref 76 end_of_table based bit level 2 dcl 1-6 set ref 93 error_table_$full_hashtbl 000022 external static fixed bin(35,0) dcl 47 ref 78 flags 21 based structure array level 3 dcl 1-6 get_temp_segment_ 000016 constant entry external dcl 44 ref 68 hash_$in_no_grow 000012 constant entry external dcl 42 ref 77 hash_$make 000010 constant entry external dcl 41 ref 72 hash_table_size_ 000100 automatic fixed bin(17,0) dcl 1-25 set ref 96* hcs_$set_bc_seg 000014 constant entry external dcl 43 ref 94 htable based structure level 1 dcl 1-6 set ref 98* 98 htp parameter pointer dcl 24 ref 13 58 75 76 76 77 77 94 94 97 98 i 000102 automatic fixed bin(17,0) dcl 33 set ref 75* 76 76 77 77* name 10 based char(32) array level 3 packed unaligned dcl 1-6 set ref 77* nb based fixed bin(17,0) level 2 dcl 1-6 set ref 75 93 96 97* 97 98 new_htp parameter pointer dcl 26 ref 58 65 new_tablep 000104 automatic pointer dcl 37 set ref 65* 68* 72* 77* 93 96 97 98 99* 104* newsize parameter fixed bin(17,0) dcl 25 set ref 13 58 72* release_temp_segment_ 000020 constant entry external dcl 44 ref 99 104 space_provided_switch 000103 automatic bit(1) dcl 35 set ref 55* 61* 65 90 104 value 20 based bit(36) array level 3 dcl 1-6 set ref 77* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. MAX_HT_BUCKETS_IN_SEG internal static fixed bin(17,0) initial dcl 1-24 null builtin function dcl 49 NAMES DECLARED BY EXPLICIT CONTEXT. JOIN 000051 constant label dcl 63 ref 56 new_storage 000035 constant entry external dcl 58 rehash_ 000014 constant entry external dcl 13 term 000306 constant label dcl 104 ref 73 78 95 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 93 bin builtin function ref 93 ptr builtin function ref 94 94 rel builtin function ref 93 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 450 474 335 460 Length 662 335 24 151 112 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rehash_ 112 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rehash_ 000100 hash_table_size_ rehash_ 000101 bit_count rehash_ 000102 i rehash_ 000103 space_provided_switch rehash_ 000104 new_tablep rehash_ 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. get_temp_segment_ hash_$in_no_grow hash_$make hcs_$set_bc_seg release_temp_segment_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$full_hashtbl LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000010 55 000026 56 000027 58 000030 61 000047 63 000051 65 000052 68 000061 69 000104 72 000106 73 000121 75 000123 76 000134 77 000150 78 000202 81 000206 90 000210 93 000212 94 000222 95 000241 96 000243 97 000245 98 000250 99 000261 102 000305 104 000306 106 000334 ----------------------------------------------------------- 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