COMPILATION LISTING OF SEGMENT bj_ppte_create 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.7 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* bj_ppte_create adds information of a before journal open in the 10* current process to the BJ per-process table. Any entry's version 11* component being zero indicates a free entry. We use the first entry 12* free as found via a linear search through the table. It is assumed 13* the calling module has already determined there is no entry for the 14* journal; no check is made to verify this. 15**/ 16 17 /* HISTORY: 18*Written by Mike Pandolf, 08/04/82. 19*Modified: 20*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 21* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 22*06/07/84 by Lee Baldwin: Renamed dm_error_$bj_ppt_version_bad to 23* bj_bad_ppt_version. 24*02/08/85 by Lee A. Newcomb: Fixed to declare dm_error_ codes correctly (with 25* precision 35 instead of 17); added DESCRIPTION section and fixed 26* format to follow project standards; removed obsolete comments 27* about "undo" functionality; added ERROR_RETURN and 28* CHECK_VERSION_NUMERIC procs. 29**/ 30 31 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo,^inddcls,dclind5,idind35,linecom */ 32 33 bj_ppte_create: 34 proc (p_bj_uid, p_file_oid, p_pste_ptr) returns (ptr); 35 36 /* DECLARATIONS */ 37 38 /* Parameter */ 39 dcl ( 40 p_bj_uid bit (36) aligned, 41 p_file_oid bit (36) aligned, 42 p_pste_ptr ptr 43 ) parameter; 44 45 /* Automatic */ 46 dcl ( 47 found bit (1) aligned init (""b), 48 ppte_index fixed bin 49 ) automatic; 50 51 /* Builtin */ 52 dcl (addr, max) builtin; 53 54 /* Condition */ 55 /* Constant */ 56 dcl ME char (14) 57 init ("bj_ppte_create") internal 58 static options (constant); 59 60 /* Entry */ 61 dcl ( 62 bj_report_err entry (fixed bin (35), char (*)), 63 clock_ entry returns (fixed bin (71)) 64 ) external; 65 66 /* External */ 67 dcl ( 68 bjm_data_$bj_ppt_ptr pointer, 69 dm_error_$bj_bad_ppt_version fixed bin (35), 70 dm_error_$bj_ppt_full fixed bin (35) 71 ) external; 72 73 /* Static */ 74 75 /* END OF DECLARATIONS */ 76 77 /* bj_ppte_create: repeat for reader */ 78 /* proc (p_bj_uid, p_file_oid, p_pste_ptr) returns (ptr); */ 79 80 bj_ppt_ptr = bjm_data_$bj_ppt_ptr; 81 82 call CHECK_VERSION_NUMERIC (bj_ppt.version, BJ_PPT_VERSION_1, 83 dm_error_$bj_bad_ppt_version); 84 85 do ppte_index = 1 to bj_ppt.max_n_entries while (^found); 86 if bj_ppt.e (ppte_index).version = 0 then 87 found = "1"b; 88 end; 89 90 if ^found then 91 call ERROR_RETURN (dm_error_$bj_ppt_full); 92 else /* must fix since PL/I puts us one past */ 93 ppte_index = ppte_index - 1; /* the entry we desire */ 94 95 bj_ppte_ptr = addr (bj_ppt.e (ppte_index)); 96 97 bj_ppte.bj_uid = p_bj_uid; 98 bj_ppte.pf_oid = p_file_oid; 99 bj_ppte.bj_pste_ptr = p_pste_ptr; 100 bj_ppte.open_time = clock_ (); 101 bj_ppte.n_opening = 1; 102 103 bj_ppt.n_entries_used = bj_ppt.n_entries_used + 1; 104 bj_ppt.highest_ix_used = max (ppte_index, bj_ppt.highest_ix_used); 105 106 bj_ppte.version = BJ_PPTE_VERSION_1; 107 108 return (bj_ppte_ptr); 109 110 /* end bj_ppte_create; */ 111 112 ERROR_RETURN: 113 proc (er_p_code); 114 115 dcl er_p_code fixed bin (35) parameter; 116 117 call bj_report_err (er_p_code, ME); 118 119 end ERROR_RETURN; 120 121 CHECK_VERSION_NUMERIC: 122 proc (cvn_p_given_version, cvn_p_desired_version, cvn_p_error_to_use); 123 124 dcl ( 125 cvn_p_given_version fixed bin, 126 cvn_p_desired_version fixed bin, 127 cvn_p_error_to_use fixed bin (35) 128 ) parameter; 129 130 if cvn_p_given_version ^= cvn_p_desired_version then 131 call ERROR_RETURN (cvn_p_error_to_use); 132 133 end CHECK_VERSION_NUMERIC; 134 1 1 /* BEGIN dm_bj_static.incl.pl1 */ 1 2 /* 1 3*Modified: 1 4*10/04/82 by Lee A. Newcomb: To change from internal static to external 1 5* static. 1 6**/ 1 7 1 8 dcl dm_system_data_$bj_max_n_journals fixed bin ext static; 1 9 dcl dm_system_data_$bj_max_n_processes fixed bin ext static; 1 10 dcl dm_system_data_$max_n_transactions fixed bin ext static; 1 11 1 12 /* END dm_bj_static.incl.pl1 */ 1 13 135 136 2 1 /* BEGIN INCLUDE FILE: dm_bj_ppt.incl.pl1 */ 2 2 /* 2 3*Layout of the per-process before journal table and entries. 2 4* 2 5*Written by Andre Bensoussan June/July 1982 2 6*Modified: 2 7*09/29/82 by Lee A. Newcomb: To make two default oid cells, pad ppte's 2 8* to account for all used space, and use dm_system_data_ for 2 9* determining dimension of bj_ppt.e. 2 10**/ 2 11 /* format: style4,indattr,idind33,^indcomtxt */ 2 12 2 13 dcl BJ_PPT_VERSION_1 fixed bin int static options (constant) init (1); 2 14 dcl BJ_PPTE_VERSION_1 fixed bin int static options (constant) init (1); 2 15 2 16 dcl bj_ppt_ptr ptr; 2 17 2 18 dcl 1 bj_ppt based (bj_ppt_ptr) aligned, 2 19 2 version fixed bin, 2 20 2 max_n_entries fixed bin, /* should be = dm_system_data_$bj_max_n_journals */ 2 21 2 n_entries_used fixed bin, /* # of BJs open in this process */ 2 22 2 highest_ix_used fixed bin, /* max. # of BJs ever opened in this process */ 2 23 2 default_bj, /* for selecting a txn def. BJ by write_before_mark protocol */ 2 24 3 user_set_oid bit (36), /* explicit user setting via $set_default_bj */ 2 25 3 last_opened_oid bit (36), /* implicit if no user setting, set by open and close */ 2 26 /* if both zero, use system default BJ */ 2 27 2 process_id bit (36), /* so we don't have to keep calling for it. */ 2 28 2 process_ix fixed bin, /* index into bj_check_in_table */ 2 29 2 mod_list_area (100) fixed bin (35), /* for keeping track of ppt mods, not curr. used */ 2 30 2 31 2 e dim (dm_system_data_$bj_max_n_journals refer (bj_ppt.max_n_entries)) 2 32 like bj_ppte; /* an entry for each BJ open in this process */ 2 33 /* always make sure bj_ppt.e is on a even word boundary */ 2 34 2 35 /* now specify the format of each per-process BJ table entry */ 2 36 2 37 dcl bj_ppte_ptr ptr; 2 38 2 39 dcl 1 bj_ppte based (bj_ppte_ptr) aligned, 2 40 2 version fixed bin, /* better be the same for all entries in a bj_ppt */ 2 41 2 bj_uid bit (36), /* UID of the BJ page file */ 2 42 2 pf_oid bit (36), /* OID of the BJ page file */ 2 43 2 n_opening fixed bin, /* how many openings this process has done for this BJ */ 2 44 2 bj_pste_ptr ptr, /* "link" to per-system BJ table entry */ 2 45 2 open_time fixed bin (71); /* used to fill in bj_ppt.default_bj.last_opened_oid */ 2 46 /* if the last opened BJ is closed */ 2 47 2 48 /* END INCLUDE FILE: bj_ppt.incl.pl1 */ 137 138 139 140 end bj_ppte_create; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0757.7 bj_ppte_create.pl1 >spec>on>7138.pbf>bj_ppte_create.pl1 135 1 01/07/85 0857.8 dm_bj_static.incl.pl1 >ldd>include>dm_bj_static.incl.pl1 137 2 01/07/85 0857.6 dm_bj_ppt.incl.pl1 >ldd>include>dm_bj_ppt.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 constant fixed bin(17,0) initial dcl 2-14 ref 106 BJ_PPT_VERSION_1 000010 constant fixed bin(17,0) initial dcl 2-13 set ref 82* ME 000000 constant char(14) initial unaligned dcl 56 set ref 117* addr builtin function dcl 52 ref 95 bj_ppt based structure level 1 dcl 2-18 bj_ppt_ptr 000102 automatic pointer dcl 2-16 set ref 80* 82 85 86 95 103 103 104 104 bj_ppte based structure level 1 dcl 2-39 bj_ppte_ptr 000104 automatic pointer dcl 2-37 set ref 95* 97 98 99 100 101 106 108 bj_pste_ptr 4 based pointer level 2 dcl 2-39 set ref 99* bj_report_err 000010 constant entry external dcl 61 ref 117 bj_uid 1 based bit(36) level 2 dcl 2-39 set ref 97* bjm_data_$bj_ppt_ptr 000014 external static pointer dcl 67 ref 80 clock_ 000012 constant entry external dcl 61 ref 100 cvn_p_desired_version parameter fixed bin(17,0) dcl 124 ref 121 130 cvn_p_error_to_use parameter fixed bin(35,0) dcl 124 set ref 121 130* cvn_p_given_version parameter fixed bin(17,0) dcl 124 ref 121 130 dm_error_$bj_bad_ppt_version 000016 external static fixed bin(35,0) dcl 67 set ref 82* dm_error_$bj_ppt_full 000020 external static fixed bin(35,0) dcl 67 set ref 90* e 154 based structure array level 2 dcl 2-18 set ref 95 er_p_code parameter fixed bin(35,0) dcl 115 set ref 112 117* found 000100 automatic bit(1) initial dcl 46 set ref 46* 85 86* 90 highest_ix_used 3 based fixed bin(17,0) level 2 dcl 2-18 set ref 104* 104 max builtin function dcl 52 ref 104 max_n_entries 1 based fixed bin(17,0) level 2 dcl 2-18 ref 85 n_entries_used 2 based fixed bin(17,0) level 2 dcl 2-18 set ref 103* 103 n_opening 3 based fixed bin(17,0) level 2 dcl 2-39 set ref 101* open_time 6 based fixed bin(71,0) level 2 dcl 2-39 set ref 100* p_bj_uid parameter bit(36) dcl 39 ref 33 97 p_file_oid parameter bit(36) dcl 39 ref 33 98 p_pste_ptr parameter pointer dcl 39 ref 33 99 pf_oid 2 based bit(36) level 2 dcl 2-39 set ref 98* ppte_index 000101 automatic fixed bin(17,0) dcl 46 set ref 85* 86* 92* 92 95 104 version based fixed bin(17,0) level 2 in structure "bj_ppte" dcl 2-39 in procedure "bj_ppte_create" set ref 106* version 154 based fixed bin(17,0) array level 3 in structure "bj_ppt" dcl 2-18 in procedure "bj_ppte_create" set ref 86 version based fixed bin(17,0) level 2 in structure "bj_ppt" dcl 2-18 in procedure "bj_ppte_create" set ref 82* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. dm_system_data_$bj_max_n_journals external static fixed bin(17,0) dcl 1-8 dm_system_data_$bj_max_n_processes external static fixed bin(17,0) dcl 1-9 dm_system_data_$max_n_transactions external static fixed bin(17,0) dcl 1-10 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_VERSION_NUMERIC 000164 constant entry internal dcl 121 ref 82 ERROR_RETURN 000144 constant entry internal dcl 112 ref 90 130 bj_ppte_create 000020 constant entry external dcl 33 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 274 316 200 304 Length 520 200 22 166 73 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bj_ppte_create 110 external procedure is an external procedure. ERROR_RETURN internal procedure shares stack frame of external procedure bj_ppte_create. CHECK_VERSION_NUMERIC internal procedure shares stack frame of external procedure bj_ppte_create. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME bj_ppte_create 000100 found bj_ppte_create 000101 ppte_index bj_ppte_create 000102 bj_ppt_ptr bj_ppte_create 000104 bj_ppte_ptr bj_ppte_create 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. bj_report_err clock_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bjm_data_$bj_ppt_ptr dm_error_$bj_bad_ppt_version dm_error_$bj_ppt_full LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 33 000013 46 000025 80 000026 82 000031 85 000043 86 000055 88 000063 90 000065 92 000077 95 000101 97 000106 98 000111 99 000113 100 000116 101 000125 103 000130 104 000132 106 000137 108 000141 112 000144 117 000146 119 000163 121 000164 130 000166 133 000177 ----------------------------------------------------------- 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