COMPILATION LISTING OF SEGMENT fm_per_process_init_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/05/85 0905.6 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* This routine is called by the first reference trap on fm_inner_ring_tv_ 10* It initializes the values of fm_data_ upon which file_manager_ depends 11* Most file_manager_ primitives cannot be executed validly until after this 12* routine has run. 13**/ 14 15 /* HISTORY: 16* 17*Written by Matthew, 06/25/84. 18* (Moved from fm_open_.pl1.) 19*Modified: 20*11/16/84 by Matthew Pierret: Answered audit comments: replaced fm_data_$me 21* with MYNAME constant, removed useless rv variable. 22*11/22/84 by Lee A. Newcomb: Removed obsolete dm_common_init_ references. 23**/ 24 25 /* format: style2,ind3 */ 26 27 fm_per_process_init_: 28 proc (); 29 30 /* START OF DECLARATIONS */ 31 /* Parameter */ 32 /* Automatic */ 33 34 dcl code fixed bin (35) init (0); 35 dcl saved_validation_level fixed bin init (8); 36 37 /* Based */ 38 /* Builtin */ 39 40 dcl (null, unspec) builtin; 41 42 /* Condition */ 43 44 dcl cleanup condition; 45 46 /* Constant */ 47 48 49 dcl MYNAME init ("fm_per_process_init_") char (32) varying internal static options (constant); 50 51 /* Entry */ 52 53 dcl cu_$level_get entry (fixed bin); 54 dcl cu_$level_set entry (fixed bin); 55 dcl dm_per_system_$initiate 56 entry (char (*), char (*), ptr); 57 dcl fm_put_$init_txn_tbl entry (fixed bin (35)); 58 dcl get_ring_ entry () returns (fixed bin (3)); 59 dcl sub_err_ entry () options (variable); 60 61 /* External */ 62 63 dcl dm_error_$fm_bad_sys_pn_tbl_ver 64 fixed bin (35) ext; 65 66 /* END OF DECLARATIONS */ 67 68 call cu_$level_get (saved_validation_level); 69 on cleanup call cu_$level_set (saved_validation_level); 70 call cu_$level_set (get_ring_ ()); 71 72 call dm_per_system_$initiate (fm_data_$sys_pn_tbl_name, "", fm_data_$sys_pn_tbl_ptr); 73 /* dm_per_system_ will return a non-null pointer */ 74 75 if sys_pn_tbl.h.version ^= SYS_PN_TBL_VERSION_1 76 then call sub_err_ (dm_error_$fm_bad_sys_pn_tbl_ver, MYNAME, ACTION_CANT_RESTART, null (), (0), 77 " The version number in ^a was ^w. It should have been ^w.", fm_data_$sys_pn_tbl_name, 78 sys_pn_tbl.h.version, SYS_PN_TBL_VERSION_1); 79 80 allocate file_access_table; 81 82 unspec (file_access_table) = ""b; 83 file_access_table.h.version = FILE_ACCESS_TABLE_VERSION_1; 84 file_access_table.h.post_transaction_actions = -1; 85 86 call fm_put_$init_txn_tbl (code); 87 if code ^= 0 88 then call sub_err_ (code, MYNAME, ACTION_CANT_RESTART, null (), (0), " returned by fm_put_$init_txn_tbl."); 89 90 call cu_$level_set (saved_validation_level); 91 92 return; 93 1 1 /* BEGIN INCLUDE FILE: dm_fm_file_access_info.incl.pl1 */ 1 2 1 3 /* DESCRIPTION: 1 4* The file_access_info structure contains per-process information 1 5* about a DM file. Each file_access_info structure is one entry in 1 6* the file_access_table.e array. The entry can be in one of three states: 1 7* not-in-use (file_access_info.entry_state is 0), in-use (entry_state is 1 8* -1) or still in-use, but to be discarded at the end of the transaction 1 9* (any number > 0). An entry needs to be discarded when the file is 1 10* completely closed by the user. This last state is useful because it is 1 11* better not to discard the entry when it is completely closed until the 1 12* end of the current transaction, so that if the transaction is aborted, the 1 13* file need not be re-opened to apply the before images. A list of entries 1 14* to be discarded is maintained using the entry_state variable. 1 15* The file can be in one of three states: exists (file_state = 1), 1 16* does not exist (file_state = 0), and logically_deleted (file_state = 3). 1 17**/ 1 18 1 19 /* HISTORY: 1 20*Written by Jeffrey D. Ives, 10/11/82. 1 21* (Original design by Andre Bensoussan, 01/28/82.) 1 22*Modified: 1 23*10/05/83 Jeffrey D. Ives: Added fields for lock advice and expanded seg_nums. 1 24*07/12/84 by Matthew Pierret: Re-named proc_ad to file_access_info. 1 25*12/17/84 by Matthew Pierret: Changed post_transaction_actions sub-structure 1 26* to state, with entry_state (replacing thread) and the new 1 27* file_state. Added a DESCRIPTION section. Added constants for 1 28* possible file_state values. 1 29**/ 1 30 1 31 /* format: style2,^inddcls,dclind5 */ 1 32 1 33 dcl 1 file_access_info aligned based (file_access_info_ptr), 1 34 2 state aligned, 1 35 3 entry_state fixed bin (17) unal, 1 36 3 file_state fixed bin (17) unal, 1 37 2 uid bit (36), 1 38 2 blocking_factor fixed bin (17) unal, 1 39 2 ring_brackets unal, 1 40 3 write fixed bin (3) unsigned unal, 1 41 3 read fixed bin (3) unsigned unal, 1 42 3 mbz_rb fixed bin (3) unsigned unal, 1 43 2 integrity_switches unal, 1 44 3 record_time_modified 1 45 bit (1) unal, /* record time modified in ci_header and trailer */ 1 46 3 transaction bit (1) unal, /* permit access only during a transaction */ 1 47 3 lock bit (1) unal, /* lock control intervals before accessing them */ 1 48 3 bj bit (1) unal, /* put undo records in the before journal */ 1 49 3 aj bit (1) unal, /* put redo records in the after journal */ 1 50 3 mbz_is bit (4) unal, 1 51 2 last_transaction_id 1 52 bit (36), 1 53 2 msf_ptr ptr unal, 1 54 2 pn_tbl_idx fixed bin (17) unal, 1 55 2 lock_advice fixed bin (17) unal, 1 56 2 opens fixed bin (17) unal, 1 57 2 seg_0_num bit (18) unal, 1 58 2 seg_nums (27) fixed bin (12) uns unal; 1 59 1 60 1 61 dcl file_access_info_ptr ptr init (null ()); 1 62 1 63 dcl ( 1 64 FILE_ACCESS_INFO_IN_USE 1 65 init (-1), 1 66 FILE_ACCESS_INFO_NOT_IN_USE 1 67 init (0), 1 68 FILE_DOES_NOT_EXIST init (0), 1 69 FILE_EXISTS init (1), 1 70 FILE_LOGICALLY_DELETED init (3) 1 71 ) fixed bin internal static options (constant); 1 72 1 73 1 74 /* END INCLUDE FILE: dm_fm_file_access_info.incl.pl1 */ 94 95 2 1 /* BEGIN INCLUDE FILE: dm_fm_file_access_tbl.incl.pl1 */ 2 2 2 3 /* DESCRIPTION: 2 4* 2 5* This include file contains the file_access_table structure. This 2 6* is a per-process table which contains one entry for each file which the 2 7* process has open. The table is set up during per-process initialization 2 8* and is pointed to by fm_data_$file_access_table_ptr. The bounds limit 2 9* on the array of entries is abritrary and can be changed. 2 10**/ 2 11 2 12 /* HISTORY: 2 13*Written by Jeffrey D. Ives, 10/11/82. 2 14* (01/28/82 Andre Bensoussan, Design.) 2 15*Modified: 2 16*07/11/84 by Matthew Pierret: Changed name of structure from proc_ad_tbl to 2 17* file_access_table. 2 18*11/07/84 by Matthew Pierret: Removed the un-used post_commit_actions element. 2 19* Removed the now-obsolete oid structure. It has been replaced by 2 20* file_oid in dm_fm_file_oid.incl.pl1. 2 21**/ 2 22 2 23 /* format: style2,ind3 */ 2 24 2 25 2 26 dcl fm_data_$file_access_table_ptr 2 27 ptr ext; 2 28 2 29 dcl 1 file_access_table aligned based (fm_data_$file_access_table_ptr), 2 30 2 h, 2 31 3 version char (8) aligned, 2 32 3 last_entry fixed bin, 2 33 3 post_transaction_actions 2 34 fixed bin, 2 35 3 mbz_1 (6) fixed bin (71), 2 36 2 e (1024) like file_access_info; 2 37 2 38 2 39 dcl FILE_ACCESS_TABLE_VERSION_1 2 40 init ("FileAT 1") char (8) aligned static options (constant); 2 41 2 42 /* END INCLUDE FILE: dm_fm_file_access_tbl.incl.pl1 */ 96 97 3 1 /* BEGIN INCLUDE FILE dm_fm_sys_pn_tbl.incl.pl1 */ 3 2 3 3 /* DESCRIPTION: 3 4* This include file contains the sys_pn_tbl structure, the 3 5* file_manager_'s System Pathname Table. Each file which can possibly 3 6* have a before image current must have an entry in this table. Every 3 7* time this table is modified it is force-written to disk, as its 3 8* correct contents are necessary for rolling back transactions by a 3 9* process other than the process which originally owned the transaction. 3 10* When an entry is inserted, it is force-written twice: the first time with 3 11* the entry filled in but with the "in_use" element set to indicate that the 3 12* entry is not yet in use; the second time with the "in_use" element set 3 13* to indicate that the entry is in use. This is done to avoid the possibility 3 14* of a failure while the entry is being written which could successfully 3 15* write the "in_use" but not all of the rest of the entry. "in_use" can have 3 16* one of three values: 0 - not in use; -1 - in use ; +1 - in use but the 3 17* file has been deleted. 3 18**/ 3 19 3 20 /* HISTORY: 3 21*Written by Jeffrey D. Ives, 10/11/82. 3 22* (Design by Andre Bensoussan and Jeffrey Ives.) 3 23*Modified: 3 24*10/30/84 by Matthew Pierret: Added DESCRIPTION and HISTORY sections, 3 25* *_IN_USE constants. Changed thread to in_use, pfuid to file_uid, 3 26* fsuid to file_system_uid. 3 27**/ 3 28 3 29 /* format: style2,ind3 */ 3 30 3 31 dcl fm_data_$sys_pn_tbl_name 3 32 char (32) ext; 3 33 dcl fm_data_$sys_pn_tbl_ptr 3 34 ptr ext; 3 35 3 36 dcl 1 sys_pn_tbl aligned based (fm_data_$sys_pn_tbl_ptr), 3 37 2 h, 3 38 3 version bit (36), 3 39 3 last_entry fixed bin, 3 40 3 lock fixed bin (71), 3 41 3 mbz (30) fixed bin (71), 3 42 2 e (4096), 3 43 3 in_use fixed bin, 3 44 3 open_count fixed bin, 3 45 3 file_uid bit (36), 3 46 3 file_system_uid bit (36), 3 47 2 paths (4096) char (168) unal; 3 48 3 49 dcl SYS_PN_TBL_VERSION_1 bit (36) aligned static options (constant) init ("162363353101"b3); 3 50 3 51 dcl ( 3 52 SPT_ENTRY_IN_USE init (-1), 3 53 SPT_ENTRY_IN_USE_BUT_DELETED 3 54 init (1), 3 55 SPT_ENTRY_NOT_IN_USE init (0) 3 56 ) fixed bin internal static options (constant); 3 57 3 58 /* END INCLUDE FILE dm_fm_sys_pn_tbl.incl.pl1 */ 98 99 4 1 /* BEGIN INCLUDE FILE sub_err_flags.incl.pl1 BIM 11/81 */ 4 2 /* format: style3 */ 4 3 4 4 /* These constants are to be used for the flags argument of sub_err_ */ 4 5 /* They are just "string (condition_info_header.action_flags)" */ 4 6 4 7 declare ( 4 8 ACTION_CAN_RESTART init (""b), 4 9 ACTION_CANT_RESTART init ("1"b), 4 10 ACTION_DEFAULT_RESTART 4 11 init ("01"b), 4 12 ACTION_QUIET_RESTART 4 13 init ("001"b), 4 14 ACTION_SUPPORT_SIGNAL 4 15 init ("0001"b) 4 16 ) bit (36) aligned internal static options (constant); 4 17 4 18 /* End include file */ 100 101 end fm_per_process_init_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0759.2 fm_per_process_init_.pl1 >spec>on>7138.pbf>fm_per_process_init_.pl1 94 1 03/05/85 0800.2 dm_fm_file_access_info.incl.pl1 >spec>on>7138.pbf>dm_fm_file_access_info.incl.pl1 96 2 01/07/85 0901.1 dm_fm_file_access_tbl.incl.pl1 >ldd>include>dm_fm_file_access_tbl.incl.pl1 98 3 01/07/85 0900.8 dm_fm_sys_pn_tbl.incl.pl1 >ldd>include>dm_fm_sys_pn_tbl.incl.pl1 100 4 04/16/82 0958.1 sub_err_flags.incl.pl1 >ldd>include>sub_err_flags.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. ACTION_CANT_RESTART 000000 constant bit(36) initial dcl 4-7 set ref 75* 87* FILE_ACCESS_TABLE_VERSION_1 000002 constant char(8) initial dcl 2-39 ref 83 MYNAME 000004 constant varying char(32) initial dcl 49 set ref 75* 87* SYS_PN_TBL_VERSION_1 000001 constant bit(36) initial dcl 3-49 set ref 75 75* cleanup 000102 stack reference condition dcl 44 ref 69 code 000100 automatic fixed bin(35,0) initial dcl 34 set ref 34* 86* 87 87* cu_$level_get 000010 constant entry external dcl 53 ref 68 cu_$level_set 000012 constant entry external dcl 54 ref 69 70 90 dm_error_$fm_bad_sys_pn_tbl_ver 000024 external static fixed bin(35,0) dcl 63 set ref 75* dm_per_system_$initiate 000014 constant entry external dcl 55 ref 72 file_access_info based structure level 1 dcl 1-33 file_access_info_ptr 000110 automatic pointer initial dcl 1-61 set ref 1-61* file_access_table based structure level 1 dcl 2-29 set ref 80 82* fm_data_$file_access_table_ptr 000026 external static pointer dcl 2-26 set ref 80* 82 83 84 fm_data_$sys_pn_tbl_name 000030 external static char(32) unaligned dcl 3-31 set ref 72* 75* fm_data_$sys_pn_tbl_ptr 000032 external static pointer dcl 3-33 set ref 72* 75 75 fm_put_$init_txn_tbl 000016 constant entry external dcl 57 ref 86 get_ring_ 000020 constant entry external dcl 58 ref 70 70 h based structure level 2 in structure "file_access_table" dcl 2-29 in procedure "fm_per_process_init_" h based structure level 2 in structure "sys_pn_tbl" dcl 3-36 in procedure "fm_per_process_init_" null builtin function dcl 40 ref 75 75 87 87 1-61 post_transaction_actions 3 based fixed bin(17,0) level 3 dcl 2-29 set ref 84* saved_validation_level 000101 automatic fixed bin(17,0) initial dcl 35 set ref 35* 68* 69* 90* sub_err_ 000022 constant entry external dcl 59 ref 75 87 sys_pn_tbl based structure level 1 dcl 3-36 unspec builtin function dcl 40 set ref 82* version based bit(36) level 3 in structure "sys_pn_tbl" dcl 3-36 in procedure "fm_per_process_init_" set ref 75 75* version based char(8) level 3 in structure "file_access_table" dcl 2-29 in procedure "fm_per_process_init_" set ref 83* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACTION_CAN_RESTART internal static bit(36) initial dcl 4-7 ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 4-7 ACTION_QUIET_RESTART internal static bit(36) initial dcl 4-7 ACTION_SUPPORT_SIGNAL internal static bit(36) initial dcl 4-7 FILE_ACCESS_INFO_IN_USE internal static fixed bin(17,0) initial dcl 1-63 FILE_ACCESS_INFO_NOT_IN_USE internal static fixed bin(17,0) initial dcl 1-63 FILE_DOES_NOT_EXIST internal static fixed bin(17,0) initial dcl 1-63 FILE_EXISTS internal static fixed bin(17,0) initial dcl 1-63 FILE_LOGICALLY_DELETED internal static fixed bin(17,0) initial dcl 1-63 SPT_ENTRY_IN_USE internal static fixed bin(17,0) initial dcl 3-51 SPT_ENTRY_IN_USE_BUT_DELETED internal static fixed bin(17,0) initial dcl 3-51 SPT_ENTRY_NOT_IN_USE internal static fixed bin(17,0) initial dcl 3-51 NAME DECLARED BY EXPLICIT CONTEXT. fm_per_process_init_ 000065 constant entry external dcl 27 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 534 570 354 544 Length 1052 354 34 245 157 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME fm_per_process_init_ 150 external procedure is an external procedure. on unit on line 69 68 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME fm_per_process_init_ 000100 code fm_per_process_init_ 000101 saved_validation_level fm_per_process_init_ 000110 file_access_info_ptr fm_per_process_init_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return enable ext_entry int_entry alloc_based_storage THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$level_get cu_$level_set dm_per_system_$initiate fm_put_$init_txn_tbl get_ring_ sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$fm_bad_sys_pn_tbl_ver fm_data_$file_access_table_ptr fm_data_$sys_pn_tbl_name fm_data_$sys_pn_tbl_ptr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 27 000064 34 000072 35 000073 1 61 000075 68 000077 69 000105 70 000131 72 000151 75 000172 80 000253 82 000260 83 000264 84 000267 86 000271 87 000277 90 000344 92 000353 ----------------------------------------------------------- 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