COMPILATION LISTING OF SEGMENT bjm_set_default_bj Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/04/85 0941.9 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* This program sets up an implicitly referenced before journal. 9* 10* This procedure accepts a before journal OID and validates the before 11*journal. If the before journal is opened in this process, it then 12*becomes the new default before journal. If it is not opened, then 13*a non-zero error code is returned. 14**/ 15 16 /* HISTORY: 17*Written by Mike Pandolf, 07/06/82. 18*Modified: 19*10/04/82 by Lee A. Newcomb: To record user's explicit setting in a new 20* default_bj cell: user_set_oid. 21*11/11/82 by M. Pandolf: to use standard entry and exit protocol. 22*03/14/83 by L. A. Newcomb: to use dm_error_$bj_journal_not_opened. 23*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 24* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 25*10/16/84 by Maggie Sharpe: placed a version check of bj_ppte after getting 26* the bj_ppte_ptr; corrected format; changed to use 27* "call ERROR_RETURN (code)" convention. 28*02/26/85 by Lee A. Newcomb: Corrected to use dm_error_$bj_bad_ppte_version 29* when testing the PPTE, not $bj_txt_version_bad. 30*03/19/85 by Steve Herbst: Fixed to initialize bjm_data_$bj_code. 31**/ 32 33 /* format: style4,indattr,ifthenstmt,ifthen,^indcomtxt,idind33 */ 34 35 bjm_set_default_bj: 36 procedure (p_bj_oid, p_code); 37 38 /* DECLARATIONS */ 39 40 /* Parameter */ 41 42 dcl p_bj_oid bit (36) aligned parameter; /* bj OID to become the new default */ 43 dcl p_code fixed bin (35) parameter; /* standard system status code */ 44 45 /* Automatic */ 46 47 dcl bj_oid bit (36) aligned; /* local copy of bj OID */ 48 dcl code fixed bin (35); 49 50 /* Condition */ 51 52 dcl cleanup condition; 53 54 /* Entry */ 55 56 dcl bj_oid_util$get_ptr entry (bit (36) aligned) returns (ptr); 57 dcl bj_cleanup_tables$handler entry (fixed bin (35)); 58 59 /* External Static */ 60 61 dcl bjm_data_$bj_ppt_ptr pointer external static; 62 dcl dm_error_$bj_bad_ppte_version fixed bin (35) external static; 63 dcl dm_error_$bj_journal_not_opened fixed bin (35) external static; 64 dcl dm_error_$bj_recursive_invoc fixed bin (35) external static; 65 66 /* Internal Static */ 67 68 dcl ME char (20) internal static options (constant) init ("bjm_set_default_bj"); 69 70 /* copy argument */ 71 72 bj_oid = p_bj_oid; 73 p_code = 0; 74 75 /* set up error handling environment */ 76 77 on cleanup call CLEANUP; 78 79 if bjm_data_$bj_operation = "" 80 then bjm_data_$bj_operation = ME; 81 else do; 82 p_code = dm_error_$bj_recursive_invoc; 83 goto MAIN_RETURN; 84 end; 85 86 bjm_data_$bj_exit_err = nonlocal_exit_err; 87 bjm_data_$bj_code = 0; 88 89 /* get pointer to the PPTE */ 90 91 bj_ppte_ptr = bj_oid_util$get_ptr (bj_oid); 92 if bj_ppte.version ^= BJ_PPTE_VERSION_1 then 93 call ERROR_RETURN (dm_error_$bj_bad_ppte_version); 94 95 /* make sure the before journal is open, then set default OID */ 96 97 if bj_ppte.n_opening = 0 98 then call ERROR_RETURN (dm_error_$bj_journal_not_opened); 99 else 100 bjm_data_$bj_ppt_ptr -> bj_ppt.default_bj.user_set_oid = bj_oid; 101 102 bjm_data_$bj_operation = ""; 103 104 bjm_data_$bj_exit_err = 105 bjm_data_$bj_default_error_label; 106 107 MAIN_RETURN: 108 return; 109 110 nonlocal_exit_err: 111 call ERROR_RETURN (bjm_data_$bj_code); 112 113 114 /* INTERNAL PROCEDURES */ 115 116 117 ERROR_RETURN: 118 proc (error_code); 119 120 dcl error_code fixed bin (35); 121 122 call CLEANUP; 123 p_code = error_code; 124 goto MAIN_RETURN; 125 126 end ERROR_RETURN; 127 128 129 CLEANUP: 130 procedure (); 131 132 dcl cleanup_code fixed bin (35); 133 134 call bj_cleanup_tables$handler (cleanup_code); 135 136 bjm_data_$bj_operation = ""; 137 bjm_data_$bj_exit_err = 138 bjm_data_$bj_default_error_label; 139 140 return; 141 142 end CLEANUP; 143 144 145 /* 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 145 146 /* 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 */ 146 147 /* BEGIN INCLUDE FILE dm_bj_global_error_info.incl.pl1 */ 3 2 3 3 /* Originally found in before journal primitives written by */ 3 4 /* A. Bensoussan. Gathered into an include file for ease of use. */ 3 5 /* See the bjm_data_.alm source for details of use. */ 3 6 3 7 /* HISTORY: 3 8*Written by Mike Pandolf, 07/14/82. 3 9*Modified: 3 10*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 3 11* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 3 12**/ 3 13 3 14 /* format: style4,indattr,ifthenstmt,ifthen,^indcomtxt,idind33 */ 3 15 dcl bjm_data_$bj_operation char (32) external static; 3 16 3 17 dcl bjm_data_$bj_exit_err label variable external; 3 18 3 19 dcl bjm_data_$bj_code fixed bin (35) external; 3 20 3 21 dcl bjm_data_$bj_default_error_label label external static; 3 22 3 23 3 24 /* END INCLUDE FILE dm_bj_global_error_info.incl.pl1 */ 147 148 149 150 end bjm_set_default_bj; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0826.3 bjm_set_default_bj.pl1 >spec>on>7192.pbf-04/04/85>bjm_set_default_bj.pl1 145 1 01/07/85 0857.8 dm_bj_static.incl.pl1 >ldd>include>dm_bj_static.incl.pl1 146 2 01/07/85 0857.6 dm_bj_ppt.incl.pl1 >ldd>include>dm_bj_ppt.incl.pl1 147 3 01/07/85 0857.3 dm_bj_global_error_info.incl.pl1 >ldd>include>dm_bj_global_error_info.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 92 ME 000000 constant char(20) initial unaligned dcl 68 ref 79 bj_cleanup_tables$handler 000012 constant entry external dcl 57 ref 134 bj_oid 000100 automatic bit(36) dcl 47 set ref 72* 91* 99 bj_oid_util$get_ptr 000010 constant entry external dcl 56 ref 91 bj_ppt based structure level 1 dcl 2-18 bj_ppte based structure level 1 dcl 2-39 bj_ppte_ptr 000110 automatic pointer dcl 2-37 set ref 91* 92 97 bjm_data_$bj_code 000030 external static fixed bin(35,0) dcl 3-19 set ref 87* 110* bjm_data_$bj_default_error_label 000032 external static label variable dcl 3-21 ref 104 137 bjm_data_$bj_exit_err 000026 external static label variable dcl 3-17 set ref 86* 104* 137* bjm_data_$bj_operation 000024 external static char(32) unaligned dcl 3-15 set ref 79 79* 102* 136* bjm_data_$bj_ppt_ptr 000014 external static pointer dcl 61 ref 99 cleanup 000102 stack reference condition dcl 52 ref 77 cleanup_code 000100 automatic fixed bin(35,0) dcl 132 set ref 134* default_bj 4 based structure level 2 dcl 2-18 dm_error_$bj_bad_ppte_version 000016 external static fixed bin(35,0) dcl 62 set ref 92* dm_error_$bj_journal_not_opened 000020 external static fixed bin(35,0) dcl 63 set ref 97* dm_error_$bj_recursive_invoc 000022 external static fixed bin(35,0) dcl 64 ref 82 error_code parameter fixed bin(35,0) dcl 120 ref 117 123 n_opening 3 based fixed bin(17,0) level 2 dcl 2-39 ref 97 p_bj_oid parameter bit(36) dcl 42 ref 35 72 p_code parameter fixed bin(35,0) dcl 43 set ref 35 73* 82* 123* user_set_oid 4 based bit(36) level 3 dcl 2-18 set ref 99* version based fixed bin(17,0) level 2 dcl 2-39 ref 92 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. BJ_PPT_VERSION_1 internal static fixed bin(17,0) initial dcl 2-13 bj_ppt_ptr automatic pointer dcl 2-16 code automatic fixed bin(35,0) dcl 48 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. CLEANUP 000176 constant entry internal dcl 129 ref 77 122 ERROR_RETURN 000162 constant entry internal dcl 117 ref 92 97 110 MAIN_RETURN 000151 constant label dcl 107 ref 83 124 bjm_set_default_bj 000016 constant entry external dcl 35 nonlocal_exit_err 000152 constant label dcl 110 ref 86 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 410 444 225 420 Length 706 225 34 226 163 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bjm_set_default_bj 86 external procedure is an external procedure. on unit on line 77 64 on unit ERROR_RETURN internal procedure shares stack frame of external procedure bjm_set_default_bj. CLEANUP 70 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME CLEANUP 000100 cleanup_code CLEANUP bjm_set_default_bj 000100 bj_oid bjm_set_default_bj 000110 bj_ppte_ptr bjm_set_default_bj THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out call_int_this call_int_other return enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. bj_cleanup_tables$handler bj_oid_util$get_ptr THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bjm_data_$bj_code bjm_data_$bj_default_error_label bjm_data_$bj_exit_err bjm_data_$bj_operation bjm_data_$bj_ppt_ptr dm_error_$bj_bad_ppte_version dm_error_$bj_journal_not_opened dm_error_$bj_recursive_invoc LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 35 000012 72 000023 73 000026 77 000027 79 000051 82 000063 83 000066 86 000067 87 000073 91 000074 92 000104 97 000116 99 000131 102 000136 104 000143 107 000151 110 000152 150 000161 117 000162 122 000164 123 000170 124 000174 129 000175 134 000203 136 000211 137 000216 140 000224 ----------------------------------------------------------- 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