COMPILATION LISTING OF SEGMENT bj_oid_util Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/05/85 0853.3 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* Bj_oid_util is a procedure to convert between a before journal 10* opening id and the per process before journal table entry pointer. 11* The before journal opening id is based upon the table entry pointer: 12* its first 18 bits are the offset from the pointer and its last 18 bits 13* are the last 18 bits from the before journal unique id. 14* 15* Each entrypoint as a short description section. 16* 17* NOTE: the use of dm_error_$bj_bad_ppte_version to report a 18* mismatch in the CHECK_UID_PART_OF_OID internal procedure should be 19* changed. It is not currently being done as it is unknown how many 20* other places the same "error" is and time constraints. 21**/ 22 23 /* HISTORY: 24* 25*Written by Mike Pandolf, 06/28/82. 26*Modified: 27*07/10/82 by M. Pandolf: added get_default_oid entry. 28*10/27/82 by M. Pandolf: changed get_default_oid to get_latest_oid. 29*12/07/82 by Lee A. Newcomb: added get_uid. 30*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 31* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 32*06/07/84 by Lee Baldwin: Renamed dm_error_$bj_(ppt ppte)_version_bad 33* to $bj_bad_(ppt ppte)_version. 34*02/05/85 by Lee A. Newcomb: Fixed format to conform with project standards; 35* removed declarations for unused variables and added some for 36* variables dcl'd by context or implication; added various internal 37* procedures to aid in maintenance (e.g., ERROR_RETURN). 38**/ 39 40 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo,^inddcls,dclind5,idind35,linecom */ 41 42 bj_oid_util$get_oid: 43 proc (p_bj_ppte_ptr) returns (bit (36) aligned); 44 45 46 /* DECLARATIONS */ 47 48 /* Parameter */ 49 dcl ( 50 p_bj_ppte_ptr pointer, 51 p_bj_oid bit (36) aligned 52 ) parameter; 53 54 /* Automatic */ 55 dcl ( 56 bj_oid bit (36) aligned, 57 max_open_time fixed bin (71), 58 myname char (32) init ("bj_oid_util$?"), 59 this_ppte fixed bin 60 ) automatic; 61 62 /* Builtins */ 63 dcl (addr, ptr, rel, substr) builtin; 64 65 /* Condition */ 66 /* Constants */ 67 /* Entries */ 68 69 dcl bj_report_err entry (fixed bin (35), char (*)); 70 71 /* External */ 72 dcl ( 73 bjm_data_$bj_ppt_ptr pointer, 74 dm_error_$bj_bad_ppt_version fixed bin (35), 75 dm_error_$bj_bad_ppte_version fixed bin (35) 76 ) external static; 77 78 /* Static */ 79 /* END OF DECLARATIONS */ 80 81 /* bj_oid_util$get_oid: repeat for reader */ 82 /* proc (p_bj_ppte_ptr) returns (bit (36) aligned); */ 83 84 /* DESCRIPTION: 85* 86* The get_oid entrypoint expects a pointer to a before journal 87* per-process table entry and will generate an opening id from the 88* information in the pointer and the entry. 89**/ 90 91 bj_ppte_ptr = p_bj_ppte_ptr; 92 myname = "bj_oid_util$get_oid"; 93 94 call CHECK_VERSION_NUMERIC (bj_ppte.version, BJ_PPT_VERSION_1, 95 dm_error_$bj_bad_ppte_version); 96 97 bj_oid = rel (bj_ppte_ptr) || substr (bj_ppte.bj_uid, 19, 18); 98 99 return (bj_oid); 100 101 /* end bj_oid_util$get_oid; */ 102 103 bj_oid_util$get_uid: 104 entry (p_bj_oid) returns (bit (36) aligned); 105 106 /* DESCRIPTION: 107* 108* Get_uid is expected to return the unique ID of a before journal 109* to its caller given the journal's opening ID. It does this using the 110* basic code of the get_ptr entry, but for convenience, grabs the UID 111* for the caller. 112**/ 113 114 bj_oid = p_bj_oid; /* copy to local */ 115 116 bj_ppte_ptr = ptr (bjm_data_$bj_ppt_ptr, substr (bj_oid, 1, 18)); 117 myname = "bj_oid_util$get_uid"; 118 119 call CHECK_VERSION_NUMERIC (bj_ppte.version, BJ_PPTE_VERSION_1, 120 dm_error_$bj_bad_ppte_version); 121 call CHECK_UID_PART_OF_OID (bj_ppte.bj_uid, bj_oid); 122 123 return (bj_ppte.bj_uid); 124 125 /* end bj_oid_util$get_uid; */ 126 127 bj_oid_util$get_ptr: 128 entry (p_bj_oid) returns (pointer); 129 130 /* DESCRIPTION: 131* 132* The get_ptr entrypoint expects a before journal opening id and 133* will obtain a pointer to the before journal table entry for the before 134* journal referenced by the oid. 135**/ 136 137 bj_oid = p_bj_oid; 138 139 bj_ppte_ptr = ptr (bjm_data_$bj_ppt_ptr, substr (bj_oid, 1, 18)); 140 myname = "bj_oid_util$get_ptr"; 141 142 call CHECK_VERSION_NUMERIC (bj_ppte.version, BJ_PPTE_VERSION_1, 143 dm_error_$bj_bad_ppte_version); 144 call CHECK_UID_PART_OF_OID (bj_ppte.bj_uid, bj_oid); 145 146 return (bj_ppte_ptr); 147 148 /* end bj_oid_util$get_ptr; */ 149 150 bj_oid_util$get_latest_oid: 151 entry () returns (bit (36) aligned); 152 153 /* DESCRIPTION: 154* 155* The bj_latest_oid entry searches the PPT for the most 156* recently opened before journal, which is specified to be the default 157* before journal when the old one is closed. 158* 159* ASSUMPTIONS: 160* 161* 1) the cell bjm_data_$bj_ppt_ptr -> bj_ppt.default_bj_oid is zero, 162* 2) the version of the PPTE for the just closed before journal is zero. 163**/ 164 165 bj_ppt_ptr = bjm_data_$bj_ppt_ptr; 166 myname = "bj_oid_util$get_latest_oid"; 167 168 call CHECK_VERSION_NUMERIC (bj_ppt.version, BJ_PPT_VERSION_1, 169 dm_error_$bj_bad_ppt_version); 170 171 bj_oid = (36)"0"b; 172 max_open_time = 0; 173 174 do this_ppte = 1 to dm_system_data_$bj_max_n_journals; 175 176 if bj_ppt.e (this_ppte).version = BJ_PPTE_VERSION_1 then 177 if bj_ppt.e (this_ppte).open_time > max_open_time then do; 178 179 max_open_time = bj_ppt.e (this_ppte).open_time; 180 bj_oid = 181 rel (addr (bj_ppt.e (this_ppte))) 182 || substr (bj_ppt.e (this_ppte).bj_uid, 19, 18); 183 end; 184 else ; 185 186 end; 187 188 return (bj_oid); 189 190 /* end bj_oid_util$get_latest_oid; */ 191 192 ERROR_RETURN: 193 proc (er_p_code); 194 195 dcl er_p_code fixed bin (35) parameter; 196 197 call bj_report_err (er_p_code, myname); /* no return */ 198 199 end ERROR_RETURN; 200 201 CHECK_VERSION_NUMERIC: 202 proc (cvn_p_given_version, cvn_p_correct_version, cvn_p_error_to_use); 203 204 /* The error code to use is passed since we use this to check both */ 205 /* the PPT and PPTE structure versions. */ 206 207 dcl ( 208 cvn_p_given_version fixed bin, 209 cvn_p_correct_version fixed bin, 210 cvn_p_error_to_use fixed bin (35) 211 ) parameter; 212 213 if cvn_p_given_version ^= cvn_p_correct_version then 214 call ERROR_RETURN (cvn_p_error_to_use); 215 216 end CHECK_VERSION_NUMERIC; 217 218 CHECK_UID_PART_OF_OID: 219 proc (cupoo_p_bj_ppte_uid, cupoo_p_bj_oid); 220 221 dcl ( 222 cupoo_p_bj_ppte_uid bit (36) aligned, 223 cupoo_p_bj_oid bit (36) aligned 224 ) parameter; 225 226 if (substr (cupoo_p_bj_ppte_uid, 19, 18) ^= substr (cupoo_p_bj_oid, 19, 18)) 227 then 228 call ERROR_RETURN (dm_error_$bj_bad_ppte_version); 229 230 end CHECK_UID_PART_OF_OID; 231 1 1 /* BEGIN INCLUDE FILE: dm_bj_ppt.incl.pl1 */ 1 2 /* 1 3*Layout of the per-process before journal table and entries. 1 4* 1 5*Written by Andre Bensoussan June/July 1982 1 6*Modified: 1 7*09/29/82 by Lee A. Newcomb: To make two default oid cells, pad ppte's 1 8* to account for all used space, and use dm_system_data_ for 1 9* determining dimension of bj_ppt.e. 1 10**/ 1 11 /* format: style4,indattr,idind33,^indcomtxt */ 1 12 1 13 dcl BJ_PPT_VERSION_1 fixed bin int static options (constant) init (1); 1 14 dcl BJ_PPTE_VERSION_1 fixed bin int static options (constant) init (1); 1 15 1 16 dcl bj_ppt_ptr ptr; 1 17 1 18 dcl 1 bj_ppt based (bj_ppt_ptr) aligned, 1 19 2 version fixed bin, 1 20 2 max_n_entries fixed bin, /* should be = dm_system_data_$bj_max_n_journals */ 1 21 2 n_entries_used fixed bin, /* # of BJs open in this process */ 1 22 2 highest_ix_used fixed bin, /* max. # of BJs ever opened in this process */ 1 23 2 default_bj, /* for selecting a txn def. BJ by write_before_mark protocol */ 1 24 3 user_set_oid bit (36), /* explicit user setting via $set_default_bj */ 1 25 3 last_opened_oid bit (36), /* implicit if no user setting, set by open and close */ 1 26 /* if both zero, use system default BJ */ 1 27 2 process_id bit (36), /* so we don't have to keep calling for it. */ 1 28 2 process_ix fixed bin, /* index into bj_check_in_table */ 1 29 2 mod_list_area (100) fixed bin (35), /* for keeping track of ppt mods, not curr. used */ 1 30 1 31 2 e dim (dm_system_data_$bj_max_n_journals refer (bj_ppt.max_n_entries)) 1 32 like bj_ppte; /* an entry for each BJ open in this process */ 1 33 /* always make sure bj_ppt.e is on a even word boundary */ 1 34 1 35 /* now specify the format of each per-process BJ table entry */ 1 36 1 37 dcl bj_ppte_ptr ptr; 1 38 1 39 dcl 1 bj_ppte based (bj_ppte_ptr) aligned, 1 40 2 version fixed bin, /* better be the same for all entries in a bj_ppt */ 1 41 2 bj_uid bit (36), /* UID of the BJ page file */ 1 42 2 pf_oid bit (36), /* OID of the BJ page file */ 1 43 2 n_opening fixed bin, /* how many openings this process has done for this BJ */ 1 44 2 bj_pste_ptr ptr, /* "link" to per-system BJ table entry */ 1 45 2 open_time fixed bin (71); /* used to fill in bj_ppt.default_bj.last_opened_oid */ 1 46 /* if the last opened BJ is closed */ 1 47 1 48 /* END INCLUDE FILE: bj_ppt.incl.pl1 */ 232 233 2 1 /* BEGIN dm_bj_static.incl.pl1 */ 2 2 /* 2 3*Modified: 2 4*10/04/82 by Lee A. Newcomb: To change from internal static to external 2 5* static. 2 6**/ 2 7 2 8 dcl dm_system_data_$bj_max_n_journals fixed bin ext static; 2 9 dcl dm_system_data_$bj_max_n_processes fixed bin ext static; 2 10 dcl dm_system_data_$max_n_transactions fixed bin ext static; 2 11 2 12 /* END dm_bj_static.incl.pl1 */ 2 13 234 235 236 237 end bj_oid_util$get_oid; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0757.7 bj_oid_util.pl1 >spec>on>7138.pbf>bj_oid_util.pl1 232 1 01/07/85 0857.6 dm_bj_ppt.incl.pl1 >ldd>include>dm_bj_ppt.incl.pl1 234 2 01/07/85 0857.8 dm_bj_static.incl.pl1 >ldd>include>dm_bj_static.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. BJ_PPTE_VERSION_1 000003 constant fixed bin(17,0) initial dcl 1-14 set ref 119* 142* 176 BJ_PPT_VERSION_1 000003 constant fixed bin(17,0) initial dcl 1-13 set ref 94* 168* addr builtin function dcl 63 ref 180 bj_oid 000100 automatic bit(36) dcl 55 set ref 97* 99 114* 116 121* 137* 139 144* 171* 180* 188 bj_ppt based structure level 1 dcl 1-18 bj_ppt_ptr 000116 automatic pointer dcl 1-16 set ref 165* 168 176 176 179 180 180 bj_ppte based structure level 1 dcl 1-39 bj_ppte_ptr 000120 automatic pointer dcl 1-37 set ref 91* 94 97 97 116* 119 121 123 139* 142 144 146 bj_report_err 000010 constant entry external dcl 69 ref 197 bj_uid 1 based bit(36) level 2 in structure "bj_ppte" dcl 1-39 in procedure "bj_oid_util$get_oid" set ref 97 121* 123 144* bj_uid 155 based bit(36) array level 3 in structure "bj_ppt" dcl 1-18 in procedure "bj_oid_util$get_oid" set ref 180 bjm_data_$bj_ppt_ptr 000012 external static pointer dcl 72 ref 116 139 165 cupoo_p_bj_oid parameter bit(36) dcl 221 ref 218 226 cupoo_p_bj_ppte_uid parameter bit(36) dcl 221 ref 218 226 cvn_p_correct_version parameter fixed bin(17,0) dcl 207 ref 201 213 cvn_p_error_to_use parameter fixed bin(35,0) dcl 207 set ref 201 213* cvn_p_given_version parameter fixed bin(17,0) dcl 207 ref 201 213 dm_error_$bj_bad_ppt_version 000014 external static fixed bin(35,0) dcl 72 set ref 168* dm_error_$bj_bad_ppte_version 000016 external static fixed bin(35,0) dcl 72 set ref 94* 119* 142* 226* dm_system_data_$bj_max_n_journals 000020 external static fixed bin(17,0) dcl 2-8 ref 174 e 154 based structure array level 2 dcl 1-18 set ref 180 er_p_code parameter fixed bin(35,0) dcl 195 set ref 192 197* max_open_time 000102 automatic fixed bin(71,0) dcl 55 set ref 172* 176 179* myname 000104 automatic char(32) initial unaligned dcl 55 set ref 55* 92* 117* 140* 166* 197* open_time 162 based fixed bin(71,0) array level 3 dcl 1-18 set ref 176 179 p_bj_oid parameter bit(36) dcl 49 ref 103 114 127 137 p_bj_ppte_ptr parameter pointer dcl 49 ref 42 91 ptr builtin function dcl 63 ref 116 139 rel builtin function dcl 63 ref 97 180 substr builtin function dcl 63 ref 97 116 139 180 226 226 this_ppte 000114 automatic fixed bin(17,0) dcl 55 set ref 174* 176 176 179 180 180* version 154 based fixed bin(17,0) array level 3 in structure "bj_ppt" dcl 1-18 in procedure "bj_oid_util$get_oid" set ref 176 version based fixed bin(17,0) level 2 in structure "bj_ppte" dcl 1-39 in procedure "bj_oid_util$get_oid" set ref 94* 119* 142* version based fixed bin(17,0) level 2 in structure "bj_ppt" dcl 1-18 in procedure "bj_oid_util$get_oid" set ref 168* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. dm_system_data_$bj_max_n_processes external static fixed bin(17,0) dcl 2-9 dm_system_data_$max_n_transactions external static fixed bin(17,0) dcl 2-10 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_UID_PART_OF_OID 000457 constant entry internal dcl 218 ref 121 144 CHECK_VERSION_NUMERIC 000443 constant entry internal dcl 201 ref 94 119 142 168 ERROR_RETURN 000423 constant entry internal dcl 192 ref 213 226 bj_oid_util$get_latest_oid 000315 constant entry external dcl 150 bj_oid_util$get_oid 000062 constant entry external dcl 42 bj_oid_util$get_ptr 000232 constant entry external dcl 127 bj_oid_util$get_uid 000142 constant entry external dcl 103 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 670 712 500 700 Length 1130 500 22 201 170 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bj_oid_util$get_oid 146 external procedure is an external procedure. ERROR_RETURN internal procedure shares stack frame of external procedure bj_oid_util$get_oid. CHECK_VERSION_NUMERIC internal procedure shares stack frame of external procedure bj_oid_util$get_oid. CHECK_UID_PART_OF_OID internal procedure shares stack frame of external procedure bj_oid_util$get_oid. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME bj_oid_util$get_oid 000100 bj_oid bj_oid_util$get_oid 000102 max_open_time bj_oid_util$get_oid 000104 myname bj_oid_util$get_oid 000114 this_ppte bj_oid_util$get_oid 000116 bj_ppt_ptr bj_oid_util$get_oid 000120 bj_ppte_ptr bj_oid_util$get_oid THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return signal ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. bj_report_err THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bjm_data_$bj_ppt_ptr dm_error_$bj_bad_ppt_version dm_error_$bj_bad_ppte_version dm_system_data_$bj_max_n_journals LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 55 000051 42 000056 91 000075 92 000101 94 000104 97 000117 99 000126 103 000136 114 000155 116 000160 117 000167 119 000172 121 000203 123 000214 127 000226 137 000241 139 000244 140 000253 142 000256 144 000267 146 000300 150 000312 165 000330 166 000334 168 000337 171 000351 172 000352 174 000354 176 000365 179 000377 180 000400 183 000407 186 000410 188 000412 192 000423 197 000425 199 000442 201 000443 213 000445 216 000456 218 000457 226 000461 230 000477 ----------------------------------------------------------- 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