COMPILATION LISTING OF SEGMENT fm_sys_pn_tbl_opens Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/04/85 0949.7 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* This routine returns the number of opens for a file in the System 10* Pathname Table (sys_pn_tbl). This routine locks and unlocks the 11* sys_pn_tbl, so if the caller already has the sys_pn_tbl locked and wishes 12* it to stay locked, it must lock the sys_pn_tbl after this routine 13* returns. The caller must also have set the validation level 14* appropriately. 15**/ 16 17 /* HISTORY: 18* 19*Written by Matthew Pierret, 12/20/84. 20*Modified: 21*02/27/85 by Lee A. Newcomb: Removed unused variables and corrected a name in 22* the history section. 23**/ 24 /* format: style2,ind3 */ 25 26 fm_sys_pn_tbl_opens: 27 proc (p_file_uid, p_sys_pn_tbl_idx, p_opens, p_code); 28 29 /* START OF DECLARATIONS */ 30 /* Parameter */ 31 32 dcl p_file_uid bit (36) aligned; /*unique id of the DM file*/ 33 dcl p_sys_pn_tbl_idx fixed bin (17); /*index of entry in sys_pn_tbl*/ 34 dcl p_opens fixed bin (17); /* number of processes that have file open*/ 35 dcl p_code fixed bin (35); 36 37 /* Automatic */ 38 39 dcl try_to_unlock_lock bit (1) aligned; 40 dcl code fixed bin (35) init (0); 41 dcl file_uid bit (36) aligned init (""b); 42 dcl sys_pn_tbl_idx fixed bin init (-1); 43 44 /* Based */ 45 /* Builtin */ 46 47 dcl addr builtin; 48 49 /* Condition */ 50 51 dcl cleanup condition; 52 53 /* Constant */ 54 55 dcl myname init ("fm_sys_pn_tbl_opens") char (32) varying internal static options (constant); 56 dcl LOCK_WAIT_TIME init (1e9) fixed bin (71) internal static options (constant); 57 58 /* Entry */ 59 60 dcl fm_error_util_$signal entry options (variable); 61 dcl lock_manager_$lock_fast 62 entry (ptr, fixed bin (71), fixed bin (35)); 63 dcl lock_manager_$unlock_fast 64 entry (ptr, fixed bin (35)); 65 66 /* External */ 67 68 dcl ( 69 dm_error_$fast_lock_invalid_reset, 70 dm_error_$fm_sys_pne_clobbered 71 ) ext fixed bin (35); 72 73 /* END OF DECLARATIONS */ 74 75 p_code, code = 0; 76 file_uid = p_file_uid; 77 sys_pn_tbl_idx = p_sys_pn_tbl_idx; 78 try_to_unlock_lock = "1"b; 79 80 on cleanup call FINISH (); 81 82 call lock_manager_$lock_fast (addr (sys_pn_tbl.h.lock), LOCK_WAIT_TIME, code); 83 if code ^= 0 & code ^= dm_error_$fast_lock_invalid_reset 84 then call ERROR_RETURN (code); 85 86 if sys_pn_tbl.e (sys_pn_tbl_idx).file_uid ^= file_uid 87 then call ERROR_RETURN (dm_error_$fm_sys_pne_clobbered); 88 89 if sys_pn_tbl.e (sys_pn_tbl_idx).in_use = 0 90 then call ERROR_RETURN (dm_error_$fm_sys_pne_clobbered); 91 92 p_opens = sys_pn_tbl.e (sys_pn_tbl_idx).open_count; 93 94 call lock_manager_$unlock_fast (addr (sys_pn_tbl.h.lock), code); 95 try_to_unlock_lock = "0"b; 96 if code ^= 0 97 then call ERROR_RETURN (code); 98 99 MAIN_RETURN: 100 return; 101 102 ERROR_RETURN: 103 proc (er_p_code); 104 105 dcl er_p_code fixed bin (35) parameter; 106 107 p_code = er_p_code; 108 call FINISH (); 109 goto MAIN_RETURN; 110 111 end ERROR_RETURN; 112 113 FINISH: 114 proc (); 115 116 117 if try_to_unlock_lock 118 then 119 do; 120 call lock_manager_$unlock_fast (addr (sys_pn_tbl.h.lock), code); 121 try_to_unlock_lock = "0"b; 122 if code ^= 0 123 then call fm_error_util_$signal (code, myname, FM_ACTION_QUIET_RESTART | FM_ACTION_LOG, LOG_SV, 124 " Unable to unlock ^a.", fm_data_$sys_pn_tbl_name); 125 end; 126 127 return; 128 129 end FINISH; 130 1 1 /* ******* BEGIN INCLUDE FILE dm_fm_sub_error_flags.incl.pl1 ******** */ 1 2 1 3 /* format: style2,ind3 */ 1 4 1 5 /* HISTORY: 1 6*Written by Matthew Pierret, 07/02/83. 1 7*Modified: 1 8**/ 1 9 1 10 dcl 1 fm_error_flags aligned based, 1 11 2 action unal, 1 12 3 cant_restart bit (1) unal, 1 13 3 default_restart bit (1) unal, 1 14 3 quiet_restart bit (1) unal, 1 15 3 support_signal bit (1) unal, 1 16 3 mbz_1 bit (14) unal, 1 17 2 log unal, 1 18 3 system bit (1) unal, 1 19 3 mbz_2 bit (1) unal, 1 20 2 mbz_3 bit (16) unal; 1 21 1 22 dcl ( 1 23 FM_ACTION_CANT_RESTART init ("1000"b || (32)"0"b), 1 24 FM_ACTION_CAN_RESTART init ("0000"b || (32)"0"b), 1 25 FM_ACTION_DEFAULT_RESTART 1 26 init ("0100"b || (32)"0"b), 1 27 FM_ACTION_QUIET_RESTART 1 28 init ("0010"b || (32)"0"b), 1 29 FM_ACTION_LOG init ((18)"0"b || "10"b || (16)"0"b) 1 30 ) bit (36) aligned internal static options (constant); 1 31 1 32 /* ********* END INCLUDE FILE dm_fm_sub_error_flags.incl.pl1 ******** */ 131 132 2 1 /* BEGIN INCLUDE FILE dm_fm_sys_pn_tbl.incl.pl1 */ 2 2 2 3 /* DESCRIPTION: 2 4* This include file contains the sys_pn_tbl structure, the 2 5* file_manager_'s System Pathname Table. Each file which can possibly 2 6* have a before image current must have an entry in this table. Every 2 7* time this table is modified it is force-written to disk, as its 2 8* correct contents are necessary for rolling back transactions by a 2 9* process other than the process which originally owned the transaction. 2 10* When an entry is inserted, it is force-written twice: the first time with 2 11* the entry filled in but with the "in_use" element set to indicate that the 2 12* entry is not yet in use; the second time with the "in_use" element set 2 13* to indicate that the entry is in use. This is done to avoid the possibility 2 14* of a failure while the entry is being written which could successfully 2 15* write the "in_use" but not all of the rest of the entry. "in_use" can have 2 16* one of three values: 0 - not in use; -1 - in use ; +1 - in use but the 2 17* file has been deleted. 2 18**/ 2 19 2 20 /* HISTORY: 2 21*Written by Jeffrey D. Ives, 10/11/82. 2 22* (Design by Andre Bensoussan and Jeffrey Ives.) 2 23*Modified: 2 24*10/30/84 by Matthew Pierret: Added DESCRIPTION and HISTORY sections, 2 25* *_IN_USE constants. Changed thread to in_use, pfuid to file_uid, 2 26* fsuid to file_system_uid. 2 27**/ 2 28 2 29 /* format: style2,ind3 */ 2 30 2 31 dcl fm_data_$sys_pn_tbl_name 2 32 char (32) ext; 2 33 dcl fm_data_$sys_pn_tbl_ptr 2 34 ptr ext; 2 35 2 36 dcl 1 sys_pn_tbl aligned based (fm_data_$sys_pn_tbl_ptr), 2 37 2 h, 2 38 3 version bit (36), 2 39 3 last_entry fixed bin, 2 40 3 lock fixed bin (71), 2 41 3 mbz (30) fixed bin (71), 2 42 2 e (4096), 2 43 3 in_use fixed bin, 2 44 3 open_count fixed bin, 2 45 3 file_uid bit (36), 2 46 3 file_system_uid bit (36), 2 47 2 paths (4096) char (168) unal; 2 48 2 49 dcl SYS_PN_TBL_VERSION_1 bit (36) aligned static options (constant) init ("162363353101"b3); 2 50 2 51 dcl ( 2 52 SPT_ENTRY_IN_USE init (-1), 2 53 SPT_ENTRY_IN_USE_BUT_DELETED 2 54 init (1), 2 55 SPT_ENTRY_NOT_IN_USE init (0) 2 56 ) fixed bin internal static options (constant); 2 57 2 58 /* END INCLUDE FILE dm_fm_sys_pn_tbl.incl.pl1 */ 133 134 3 1 /* BEGIN INCLUDE FILE dm_log_sv_codes.incl.pl1 */ 3 2 3 3 /* format: ^indcom */ 3 4 3 5 /* DESCRIPTION: 3 6* These are the severity codes used by the dms daemon when calling its logger. 3 7* The severity is ranked thusly: 3 8* 3 9* severity log write situation 3 10* -------- --- ----- --------- 3 11* 0 no yes standard output, query, etc. 3 12* 1 yes yes fatal error, terminate dms daemon. 3 13* 2 yes yes nonfatal error. 3 14* 3 yes yes informative message. 3 15* 4 yes no log information only. 3 16**/ 3 17 3 18 /* HISTORY: 3 19* 3 20*Written by M. Pandolf, 10/06/82. 3 21*Modified: 3 22*12/10/84 by R. Michael Tague: Rename and reformat description/history. 3 23*01/13/85 by Lee A. Newcomb: Renamed to dm_log_sv_codes from 3 24* dm_daemon_sv_codes as the severity codes for the DM log are not 3 25* restrained to the DM Daemon's use. 3 26*01/24/85 by Lee A. Newcomb: Fixed to say dm_log_sv_codes.incl.pl1 in the 3 27* BEGIN and END INCLUDE comments, instead of dm_daemon_sv_codes.==. 3 28**/ 3 29 3 30 /* format: style5 */ 3 31 3 32 dcl (PRINT_SV, QUERY_SV) fixed bin internal static 3 33 options (constant) init (0); 3 34 dcl (CRASH_SV, FATAL_SV) fixed bin internal static 3 35 options (constant) init (1); 3 36 dcl ERROR_SV fixed bin internal static 3 37 options (constant) init (2); 3 38 dcl INFORM_SV fixed bin internal static 3 39 options (constant) init (3); 3 40 dcl LOG_SV fixed bin internal static 3 41 options (constant) init (4); 3 42 3 43 /* END INCLUDE FILE dm_log_sv_codes.incl.pl1 */ 135 136 137 end fm_sys_pn_tbl_opens; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0827.2 fm_sys_pn_tbl_opens.pl1 >spec>on>7192.pbf-04/04/85>fm_sys_pn_tbl_opens.pl1 131 1 01/07/85 0858.8 dm_fm_sub_error_flags.incl.pl1 >ldd>include>dm_fm_sub_error_flags.incl.pl1 133 2 01/07/85 0900.8 dm_fm_sys_pn_tbl.incl.pl1 >ldd>include>dm_fm_sys_pn_tbl.incl.pl1 135 3 03/06/85 1031.1 dm_log_sv_codes.incl.pl1 >ldd>include>dm_log_sv_codes.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. FM_ACTION_LOG constant bit(36) initial dcl 1-22 ref 122 FM_ACTION_QUIET_RESTART constant bit(36) initial dcl 1-22 ref 122 LOCK_WAIT_TIME 000000 constant fixed bin(71,0) initial dcl 56 set ref 82* LOG_SV 000016 constant fixed bin(17,0) initial dcl 3-40 set ref 122* addr builtin function dcl 47 ref 82 82 94 94 120 120 cleanup 000104 stack reference condition dcl 51 ref 80 code 000101 automatic fixed bin(35,0) initial dcl 40 set ref 40* 75* 82* 83 83 83* 94* 96 96* 120* 122 122* dm_error_$fast_lock_invalid_reset 000016 external static fixed bin(35,0) dcl 68 ref 83 dm_error_$fm_sys_pne_clobbered 000020 external static fixed bin(35,0) dcl 68 set ref 86* 89* e 100 based structure array level 2 dcl 2-36 er_p_code parameter fixed bin(35,0) dcl 105 ref 102 107 file_uid 102 based bit(36) array level 3 in structure "sys_pn_tbl" dcl 2-36 in procedure "fm_sys_pn_tbl_opens" ref 86 file_uid 000102 automatic bit(36) initial dcl 41 in procedure "fm_sys_pn_tbl_opens" set ref 41* 76* 86 fm_data_$sys_pn_tbl_name 000022 external static char(32) unaligned dcl 2-31 set ref 122* fm_data_$sys_pn_tbl_ptr 000024 external static pointer dcl 2-33 ref 82 82 86 89 92 94 94 120 120 fm_error_util_$signal 000010 constant entry external dcl 60 ref 122 h based structure level 2 dcl 2-36 in_use 100 based fixed bin(17,0) array level 3 dcl 2-36 ref 89 lock 2 based fixed bin(71,0) level 3 dcl 2-36 set ref 82 82 94 94 120 120 lock_manager_$lock_fast 000012 constant entry external dcl 61 ref 82 lock_manager_$unlock_fast 000014 constant entry external dcl 63 ref 94 120 myname 000002 constant varying char(32) initial dcl 55 set ref 122* open_count 101 based fixed bin(17,0) array level 3 dcl 2-36 ref 92 p_code parameter fixed bin(35,0) dcl 35 set ref 26 75* 107* p_file_uid parameter bit(36) dcl 32 ref 26 76 p_opens parameter fixed bin(17,0) dcl 34 set ref 26 92* p_sys_pn_tbl_idx parameter fixed bin(17,0) dcl 33 ref 26 77 sys_pn_tbl based structure level 1 dcl 2-36 sys_pn_tbl_idx 000103 automatic fixed bin(17,0) initial dcl 42 set ref 42* 77* 86 89 92 try_to_unlock_lock 000100 automatic bit(1) dcl 39 set ref 78* 95* 117 121* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. CRASH_SV internal static fixed bin(17,0) initial dcl 3-34 ERROR_SV internal static fixed bin(17,0) initial dcl 3-36 FATAL_SV internal static fixed bin(17,0) initial dcl 3-34 FM_ACTION_CANT_RESTART internal static bit(36) initial dcl 1-22 FM_ACTION_CAN_RESTART internal static bit(36) initial dcl 1-22 FM_ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 1-22 INFORM_SV internal static fixed bin(17,0) initial dcl 3-38 PRINT_SV internal static fixed bin(17,0) initial dcl 3-32 QUERY_SV internal static fixed bin(17,0) initial dcl 3-32 SPT_ENTRY_IN_USE internal static fixed bin(17,0) initial dcl 2-51 SPT_ENTRY_IN_USE_BUT_DELETED internal static fixed bin(17,0) initial dcl 2-51 SPT_ENTRY_NOT_IN_USE internal static fixed bin(17,0) initial dcl 2-51 SYS_PN_TBL_VERSION_1 internal static bit(36) initial dcl 2-49 fm_error_flags based structure level 1 dcl 1-10 NAMES DECLARED BY EXPLICIT CONTEXT. ERROR_RETURN 000214 constant entry internal dcl 102 ref 83 86 89 96 FINISH 000227 constant entry internal dcl 113 ref 80 108 MAIN_RETURN 000213 constant label dcl 99 ref 109 fm_sys_pn_tbl_opens 000037 constant entry external dcl 26 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 472 520 332 502 Length 762 332 26 226 140 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME fm_sys_pn_tbl_opens 90 external procedure is an external procedure. on unit on line 80 64 on unit ERROR_RETURN internal procedure shares stack frame of external procedure fm_sys_pn_tbl_opens. FINISH 100 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME fm_sys_pn_tbl_opens 000100 try_to_unlock_lock fm_sys_pn_tbl_opens 000101 code fm_sys_pn_tbl_opens 000102 file_uid fm_sys_pn_tbl_opens 000103 sys_pn_tbl_idx fm_sys_pn_tbl_opens THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. fm_error_util_$signal lock_manager_$lock_fast lock_manager_$unlock_fast THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$fast_lock_invalid_reset dm_error_$fm_sys_pne_clobbered 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 26 000032 40 000044 41 000045 42 000046 75 000050 76 000053 77 000055 78 000057 80 000061 82 000103 83 000122 86 000131 89 000147 92 000164 94 000174 95 000206 96 000207 99 000213 102 000214 107 000216 108 000221 109 000225 113 000226 117 000234 120 000237 121 000253 122 000255 127 000325 ----------------------------------------------------------- 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