COMPILATION LISTING OF SEGMENT bjm_get_default_bj Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/05/85 0858.2 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* format: style4,indattr,ifthenstmt,ifthen,idind33,^indcomtxt */ 8 9 bjm_get_default_bj: 10 proc (p_bj_oid, p_code); 11 12 /* DESCRIPTION: 13* Procedure to return the opening ID of the current default BJ using the 14* protocol for write_begin_mark: user_set_oid if user has called 15* bjm_set_default_bj and has not closed it since setting it, or the last 16* opened BJ if no explicit setting. If both these fail, the system default 17* BJ will be opened. p_bj_oid and p_code are output parameters. 18**/ 19 20 /* HISTORY: 21*Written by Mike Pandolf, 08/19/82. 22*Modified: 23*10/04/82 by Lee A. Newcomb to change from one default BJ setting to 24* the two cell definition of bjm_write_begin_mark. 25*03/24/83 by L. A. Newcomb to use default bj dir and name defined 26* in dm_system_data_ by dm_load_configuration_. 27*03/28/83 by M. Pandolf: to use changed dm_system_data_ names for default bj. 28*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 29* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 30**/ 31 32 /* initialize parameters */ 33 34 p_code = 0; 35 bj_ppt_ptr = bjm_data_$bj_ppt_ptr; /* get it once */ 36 37 /* if the current default journal is nominally null, then we must open a before journal */ 38 39 if bj_ppt.default_bj.user_set_oid ^= ""b then /* user has explicitly set the default */ 40 bj_oid = bj_ppt.default_bj.user_set_oid; 41 else if bj_ppt.default_bj.last_opened_oid ^= ""b then /* OK, then use the last opened one */ 42 bj_oid = bj_ppt.default_bj.last_opened_oid; 43 44 else do; /* must use system default BJ */ 45 call before_journal_manager_$open_bj (dm_system_data_$bj_default_dirname, 46 dm_system_data_$bj_default_filename, bj_oid, p_code); 47 if p_code ^= 0 then 48 go to exit; 49 end; 50 51 /* now get the calculated default before journal opening ID */ 52 53 p_bj_oid = bj_oid; 54 55 exit: /* get back */ 56 return; 57 58 /* DECLARATIONS */ 59 60 dcl ( /* Parameters */ 61 p_bj_oid bit (36) aligned, /* before journal opening ID */ 62 p_code fixed bin (35) /* status code */ 63 ) parameter; 64 65 dcl /* Automatic */ 66 bj_oid bit (36) aligned /* for call to open_bj */ 67 automatic; 68 69 dcl ( /* Static, External */ 70 bjm_data_$bj_ppt_ptr ptr, 71 dm_system_data_$bj_default_dirname char (168), 72 dm_system_data_$bj_default_filename char (32) 73 ) external static; 74 75 dcl /* Entries */ 76 dm_per_system_$find_bootload_dir entry (char (*), fixed bin (35)), 77 before_journal_manager_$open_bj entry (char (*), char (*), bit (36) aligned, fixed bin (35)); 78 79 /* INCLUDE FILES start next page */ 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 */ 80 81 82 83 end bjm_get_default_bj; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0758.2 bjm_get_default_bj.pl1 >spec>on>7138.pbf>bjm_get_default_bj.pl1 80 1 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. before_journal_manager_$open_bj 000016 constant entry external dcl 75 ref 45 bj_oid 000100 automatic bit(36) dcl 65 set ref 39* 41* 45* 53 bj_ppt based structure level 1 dcl 1-18 bj_ppt_ptr 000102 automatic pointer dcl 1-16 set ref 35* 39 39 41 41 bj_ppte based structure level 1 dcl 1-39 bjm_data_$bj_ppt_ptr 000010 external static pointer dcl 69 ref 35 default_bj 4 based structure level 2 dcl 1-18 dm_system_data_$bj_default_dirname 000012 external static char(168) unaligned dcl 69 set ref 45* dm_system_data_$bj_default_filename 000014 external static char(32) unaligned dcl 69 set ref 45* last_opened_oid 5 based bit(36) level 3 dcl 1-18 ref 41 41 p_bj_oid parameter bit(36) dcl 60 set ref 9 53* p_code parameter fixed bin(35,0) dcl 60 set ref 9 34* 45* 47 user_set_oid 4 based bit(36) level 3 dcl 1-18 ref 39 39 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. BJ_PPTE_VERSION_1 internal static fixed bin(17,0) initial dcl 1-14 BJ_PPT_VERSION_1 internal static fixed bin(17,0) initial dcl 1-13 bj_ppte_ptr automatic pointer dcl 1-37 dm_per_system_$find_bootload_dir 000000 constant entry external dcl 75 NAMES DECLARED BY EXPLICIT CONTEXT. bjm_get_default_bj 000010 constant entry external dcl 9 exit 000064 constant label dcl 55 ref 47 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 164 204 65 174 Length 372 65 20 151 76 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bjm_get_default_bj 86 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME bjm_get_default_bj 000100 bj_oid bjm_get_default_bj 000102 bj_ppt_ptr bjm_get_default_bj THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. before_journal_manager_$open_bj THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bjm_data_$bj_ppt_ptr dm_system_data_$bj_default_dirname dm_system_data_$bj_default_filename LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000004 34 000015 35 000017 39 000022 41 000027 45 000033 47 000057 53 000062 55 000064 ----------------------------------------------------------- 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