COMPILATION LISTING OF SEGMENT dm_lock_configuration_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/04/85 0931.1 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* This program locks the DM configuration file for a particular AIM 10* level. The process must have previously called dm_find_configuration_ to 11* get a pointer to the configuration file. The set_lock_ system subroutine 12* is used to lock the file against any other use of the file by another 13* process attempting to bootload a DMS at the same AIM level, or a system 14* administrator trying to install a new configuration part way into 15* initialization. 16* 17* The unlock entry gives up the ability of the process to read the 18* config file AND be guaranteed the data is valid. 19**/ 20 21 /* HISTORY: 22* 23*Written by L. A. Newcomb, 05/09/83. 24*Modified: 25*05/09/83 by L. A. Newcomb: Added unlock entry. 26*06/06/84 by Lindsey L. Spratt: Changed to check for the version of the 27* dm_system_config structure. 28*02/20/85 by Lee A. Newcomb: Corrected the order of CHECK_VERSION's 29* parameters; added detection of inability to lock at all; and fixed 30* error message for unlocking failure. 31*03/05/85 by Steve Herbst: Replaced dm_log_ with dm_misc_util_$log. 32**/ 33 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo,^inddcls,dclind5,idind35,linecom */ 34 35 dm_lock_configuration_: 36 proc (p_dm_system_config_ptr); 37 38 /* DECLARATIONS */ 39 40 /* Parameter */ 41 dcl p_dm_system_config_ptr ptr /* Loc. of curr. AIM level config file */ 42 parameter; 43 44 /* Automatic */ 45 dcl code fixed bin (35) automatic; 46 47 /* Based */ 48 /* Builtin */ 49 dcl null builtin; 50 51 /* Condition */ 52 /* Constant */ 53 dcl myname init ("dm_lock_configuration_") 54 char (32) varying internal 55 static options (constant); 56 57 /* Entry */ 58 dcl ( 59 dm_misc_util_$log entry options (variable), 60 set_lock_$lock entry (bit (36) aligned, fixed bin, 61 fixed bin (35)), 62 set_lock_$unlock entry (bit (36) aligned, 63 fixed bin (35)), 64 sub_err_ entry () options (variable) 65 ) external; 66 67 /* External */ 68 dcl ( 69 error_table_$invalid_lock_reset, 70 error_table_$locked_by_this_process, 71 error_table_$unimplemented_version 72 ) fixed bin (35) external static; 73 74 /* Static */ 75 76 /* END OF DECLARATIONS */ 77 78 /* dm_lock_configuration_: repeat for reader */ 79 /* proc (p_dm_system_config_ptr); */ 80 81 /* Set local pointer for ease of use */ 82 83 dm_system_config_ptr = p_dm_system_config_ptr; 84 call CHECK_VERSION (dm_system_config.version, DM_CONFIG_VERSION_2, 85 "dm_system_config"); 86 87 /* Now lock the file, reporting interesting statuses */ 88 89 call set_lock_$lock (dm_system_config.lock, 0, code); 90 if code = error_table_$invalid_lock_reset then 91 call dm_misc_util_$log (LOG_SV, code, myname, 92 "Warning: DM config file locked from invalid process."); 93 else if code = error_table_$locked_by_this_process then /* logic error */ 94 call sub_err_ (code, myname, ACTION_CANT_RESTART, null (), 0, 95 "DM initialization logic error: cannot lock config more than once.") 96 ; 97 else if code ^= 0 then 98 call sub_err_ (code, myname, ACTION_CANT_RESTART, null (), 0, 99 "Could not lock DM config file."); 100 101 return; 102 103 /* end dm_lock_configuraiton_; */ 104 105 dm_lock_configuration_$unlock: 106 entry (p_dm_system_config_ptr); 107 108 /* copy parameter to local and init local status code */ 109 110 dm_system_config_ptr = p_dm_system_config_ptr; 111 call CHECK_VERSION (dm_system_config.version, DM_CONFIG_VERSION_2, 112 "dm_system_config"); 113 114 /* Now unlock the config and report any interesting statuses */ 115 116 call set_lock_$unlock (dm_system_config.lock, code); 117 if code ^= 0 then /* fatal initialization error */ 118 call sub_err_ (code, myname, ACTION_CANT_RESTART, null (), 0, 119 "Attempting to unlock system config file."); 120 121 return; 122 123 /* end dm_lock_configuration_$unlock; */ 124 125 CHECK_VERSION: 126 proc (cv_p_received_version, cv_p_expected_version, cv_p_structure_name); 127 128 dcl ( 129 (cv_p_expected_version, cv_p_received_version) 130 char (8) aligned, 131 cv_p_structure_name char (*) 132 ) parameter; 133 134 if cv_p_expected_version ^= cv_p_received_version then 135 call sub_err_ (error_table_$unimplemented_version, myname, 136 ACTION_CANT_RESTART, null, 0, 137 "^/Expected version ^a of the ^a structure. 138 Received version ^a, instead.", cv_p_expected_version, cv_p_structure_name, 139 cv_p_received_version); 140 end CHECK_VERSION; 141 1 1 /* BEGIN INCLUDE FILE dm_system_config.incl.pl1 */ 1 2 1 3 /* format: style4,indattr,ifthenstmt,ifthen,^indcomtxt,idind33 */ 1 4 1 5 /* DESCRIPTION: 1 6* This is the structure of the data in a Data Management configuration 1 7* file. The configuration data is used during Data Management per-system 1 8* initialization to override hardcoded default in dm_system_data_ and 1 9* give the disposition of old bootloads. This table is created at runtime 1 10* via a call to dm_translate_system_config_ subroutine. 1 11* 1 12* NOTE: only the data in the dm_system_config_info structure is used 1 13* to generate the checksum; the dm_system_config structure is used to 1 14* overlay the segment containing the configuration data, including the 1 15* lock and checksum cells. 1 16**/ 1 17 /* HISTORY: 1 18*Written by M. Pandolf, 12/06/82. 1 19*Modified: 1 20*03/14/83 by M. Pandolf: for single AIM class structure and more items. 1 21*03/28/83 by M. Pandolf: for default default_bj and log_terms. 1 22*05/04/83 by L. A. Newcomb: Added new element, recovery_check_mode, and 1 23* changed the version and most character values to "char (8)"'s for 1 24* ease of use. A string of 8 blanks is no longer a valid value for 1 25* any of the char strings. 1 26*06/09/83 by L. A. Newcomb: moved lock to just before checksum so we can 1 27* correctly determine checksum without the lock in the way. 1 28*05/29/84 by Lindsey L. Spratt: Changed to version 2. Removed various cells 1 29* which are not used; first_boot, trace_stack_mode, max_n_bj and 1 30* subsystem_disposition (to enable/disable bjm, tm or lm). 1 31*06/12/84 by Lindsey L. Spratt: Added the shutdown_delay cell. 1 32**/ 1 33 1 34 dcl dm_system_config_ptr pointer; 1 35 1 36 dcl 1 dm_system_config aligned based (dm_system_config_ptr), 1 37 2 information like dm_system_config_info, 1 38 /* NEXT MUST NOT BE IN CHECKSUM VALUE */ 1 39 2 lock bit (36) aligned, /* to prevent installations during initialization */ 1 40 2 checksum fixed bin (35); /* for error detection */ 1 41 1 42 dcl 1 dm_system_config_info aligned based (dm_system_config_ptr), 1 43 2 version char (8) aligned, /* = DM_CONFIG_VERSION_2 */ 1 44 2 idle_timeout fixed bin, /* max time daemon will remain idle before wakeup */ 1 45 2 shutdown_delay fixed bin (71), /* Default time offset from issuing shutdown warning to forcing user shutdown */ 1 46 2 log_proc_terms bit (1) aligned, /* true if process terminations to be logged */ 1 47 2 max_n_txn fixed bin, /* found in the data segment */ 1 48 2 max_n_proc fixed bin, /* dm_system_data_ */ 1 49 2 default_bj_size fixed bin, /* size of before journal made by daemon */ 1 50 2 default_bj aligned, 1 51 3 dir char (168), /* dir containing default before journal */ 1 52 3 entry char (32), /* entryname of default before journal */ 1 53 2 prev_dm_disp aligned, /* what to do with old botload */ 1 54 3 adopt char (8), /* DM_ADOPT_OLD_BOOTLOAD | DM_DO_NOT_ADOPT_OLD_BOOTLOAD */ 1 55 3 hold char (8), /* DM_HOLD_OLD_BOOTLOAD_DIRECTORY | */ 1 56 /* DM_DO_NOT_HOLD_OLD_BOOTLOAD_DIRECTORY */ 1 57 3 recover char (8), /* DM_RECOVER_OLD_BOOTLOAD | */ 1 58 /* DM_DO_NOT_RECOVER_OLD_BOOTLOAD */ 1 59 3 recovery_check_mode char (8), /* DM_RECOVERY_CHECK_MODE_ON | DM_RECOVERY_CHECK_MODE_OFF */ 1 60 2 curr_dm_enable char (8); /* DM_FORCE_ENABLE_NEW_BOOTLOAD | */ 1 61 /* DM_DO_NOT_FORCE_ENABLE_NEW_BOOTLOAD */ 1 62 1 63 dcl ( /* all the "char (8) aligned" constants */ 1 64 DM_CONFIG_VERSION_2 init ("dmcnfg_2"), 1 65 1 66 DM_ADOPT_OLD_BOOTLOAD init ("adopt"), 1 67 DM_DO_NOT_ADOPT_OLD_BOOTLOAD init ("no_adopt"), 1 68 1 69 DM_FORCE_ENABLE_NEW_BOOTLOAD init ("fc_enabl"), 1 70 DM_DO_NOT_FORCE_ENABLE_NEW_BOOTLOAD init ("no_enabl"), 1 71 1 72 DM_HOLD_OLD_BOOTLOAD_DIRECTORY init ("hold"), 1 73 DM_DO_NOT_HOLD_OLD_BOOTLOAD_DIRECTORY init ("no_hold"), 1 74 1 75 DM_RECOVER_OLD_BOOTLOAD init ("do_recov"), 1 76 DM_DO_NOT_RECOVER_OLD_BOOTLOAD init ("no_recov"), 1 77 1 78 DM_RECOVERY_CHECK_MODE_ON init ("rcvck_on"), 1 79 DM_RECOVERY_CHECK_MODE_OFF init ("rcvck_of") 1 80 1 81 ) char (8) aligned internal static options (constant); 1 82 1 83 /* END INCLUDE FILE dm_system_config.incl.pl1 */ 142 143 2 1 /* BEGIN INCLUDE FILE dm_log_sv_codes.incl.pl1 */ 2 2 2 3 /* format: ^indcom */ 2 4 2 5 /* DESCRIPTION: 2 6* These are the severity codes used by the dms daemon when calling its logger. 2 7* The severity is ranked thusly: 2 8* 2 9* severity log write situation 2 10* -------- --- ----- --------- 2 11* 0 no yes standard output, query, etc. 2 12* 1 yes yes fatal error, terminate dms daemon. 2 13* 2 yes yes nonfatal error. 2 14* 3 yes yes informative message. 2 15* 4 yes no log information only. 2 16**/ 2 17 2 18 /* HISTORY: 2 19* 2 20*Written by M. Pandolf, 10/06/82. 2 21*Modified: 2 22*12/10/84 by R. Michael Tague: Rename and reformat description/history. 2 23*01/13/85 by Lee A. Newcomb: Renamed to dm_log_sv_codes from 2 24* dm_daemon_sv_codes as the severity codes for the DM log are not 2 25* restrained to the DM Daemon's use. 2 26*01/24/85 by Lee A. Newcomb: Fixed to say dm_log_sv_codes.incl.pl1 in the 2 27* BEGIN and END INCLUDE comments, instead of dm_daemon_sv_codes.==. 2 28**/ 2 29 2 30 /* format: style5 */ 2 31 2 32 dcl (PRINT_SV, QUERY_SV) fixed bin internal static 2 33 options (constant) init (0); 2 34 dcl (CRASH_SV, FATAL_SV) fixed bin internal static 2 35 options (constant) init (1); 2 36 dcl ERROR_SV fixed bin internal static 2 37 options (constant) init (2); 2 38 dcl INFORM_SV fixed bin internal static 2 39 options (constant) init (3); 2 40 dcl LOG_SV fixed bin internal static 2 41 options (constant) init (4); 2 42 2 43 /* END INCLUDE FILE dm_log_sv_codes.incl.pl1 */ 144 145 3 1 /* BEGIN INCLUDE FILE sub_err_flags.incl.pl1 BIM 11/81 */ 3 2 /* format: style3 */ 3 3 3 4 /* These constants are to be used for the flags argument of sub_err_ */ 3 5 /* They are just "string (condition_info_header.action_flags)" */ 3 6 3 7 declare ( 3 8 ACTION_CAN_RESTART init (""b), 3 9 ACTION_CANT_RESTART init ("1"b), 3 10 ACTION_DEFAULT_RESTART 3 11 init ("01"b), 3 12 ACTION_QUIET_RESTART 3 13 init ("001"b), 3 14 ACTION_SUPPORT_SIGNAL 3 15 init ("0001"b) 3 16 ) bit (36) aligned internal static options (constant); 3 17 3 18 /* End include file */ 146 147 148 149 end dm_lock_configuration_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0824.6 dm_lock_configuration_.pl1 >spec>on>7192.pbf-04/04/85>dm_lock_configuration_.pl1 142 1 01/07/85 0859.9 dm_system_config.incl.pl1 >ldd>include>dm_system_config.incl.pl1 144 2 03/06/85 1031.1 dm_log_sv_codes.incl.pl1 >ldd>include>dm_log_sv_codes.incl.pl1 146 3 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 3-7 set ref 93* 97* 117* 134* DM_CONFIG_VERSION_2 000002 constant char(8) initial dcl 1-63 set ref 84* 111* LOG_SV 000001 constant fixed bin(17,0) initial dcl 2-40 set ref 90* code 000100 automatic fixed bin(35,0) dcl 45 set ref 89* 90 90* 93 93* 97 97* 116* 117 117* cv_p_expected_version parameter char(8) dcl 128 set ref 125 134 134* cv_p_received_version parameter char(8) dcl 128 set ref 125 134 134* cv_p_structure_name parameter char unaligned dcl 128 set ref 125 134* dm_misc_util_$log 000010 constant entry external dcl 58 ref 90 dm_system_config based structure level 1 dcl 1-36 dm_system_config_info based structure level 1 dcl 1-42 dm_system_config_ptr 000102 automatic pointer dcl 1-34 set ref 83* 84 89 110* 111 116 error_table_$invalid_lock_reset 000020 external static fixed bin(35,0) dcl 68 ref 90 error_table_$locked_by_this_process 000022 external static fixed bin(35,0) dcl 68 ref 93 error_table_$unimplemented_version 000024 external static fixed bin(35,0) dcl 68 set ref 134* information based structure level 2 dcl 1-36 lock 106 based bit(36) level 2 dcl 1-36 set ref 89* 116* myname 000004 constant varying char(32) initial dcl 53 set ref 90* 93* 97* 117* 134* null builtin function dcl 49 ref 93 93 97 97 117 117 134 134 p_dm_system_config_ptr parameter pointer dcl 41 ref 35 83 105 110 set_lock_$lock 000012 constant entry external dcl 58 ref 89 set_lock_$unlock 000014 constant entry external dcl 58 ref 116 sub_err_ 000016 constant entry external dcl 58 ref 93 97 117 134 version based char(8) level 3 dcl 1-36 set ref 84* 111* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACTION_CAN_RESTART internal static bit(36) initial dcl 3-7 ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 3-7 ACTION_QUIET_RESTART internal static bit(36) initial dcl 3-7 ACTION_SUPPORT_SIGNAL internal static bit(36) initial dcl 3-7 CRASH_SV internal static fixed bin(17,0) initial dcl 2-34 DM_ADOPT_OLD_BOOTLOAD internal static char(8) initial dcl 1-63 DM_DO_NOT_ADOPT_OLD_BOOTLOAD internal static char(8) initial dcl 1-63 DM_DO_NOT_FORCE_ENABLE_NEW_BOOTLOAD internal static char(8) initial dcl 1-63 DM_DO_NOT_HOLD_OLD_BOOTLOAD_DIRECTORY internal static char(8) initial dcl 1-63 DM_DO_NOT_RECOVER_OLD_BOOTLOAD internal static char(8) initial dcl 1-63 DM_FORCE_ENABLE_NEW_BOOTLOAD internal static char(8) initial dcl 1-63 DM_HOLD_OLD_BOOTLOAD_DIRECTORY internal static char(8) initial dcl 1-63 DM_RECOVERY_CHECK_MODE_OFF internal static char(8) initial dcl 1-63 DM_RECOVERY_CHECK_MODE_ON internal static char(8) initial dcl 1-63 DM_RECOVER_OLD_BOOTLOAD internal static char(8) initial dcl 1-63 ERROR_SV internal static fixed bin(17,0) initial dcl 2-36 FATAL_SV internal static fixed bin(17,0) initial dcl 2-34 INFORM_SV internal static fixed bin(17,0) initial dcl 2-38 PRINT_SV internal static fixed bin(17,0) initial dcl 2-32 QUERY_SV internal static fixed bin(17,0) initial dcl 2-32 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_VERSION 000505 constant entry internal dcl 125 ref 84 111 dm_lock_configuration_ 000150 constant entry external dcl 35 dm_lock_configuration_$unlock 000371 constant entry external dcl 105 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 746 774 607 756 Length 1234 607 26 223 136 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dm_lock_configuration_ 204 external procedure is an external procedure. CHECK_VERSION internal procedure shares stack frame of external procedure dm_lock_configuration_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dm_lock_configuration_ 000100 code dm_lock_configuration_ 000102 dm_system_config_ptr dm_lock_configuration_ 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. dm_misc_util_$log set_lock_$lock set_lock_$unlock sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$invalid_lock_reset error_table_$locked_by_this_process error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 35 000145 83 000155 84 000161 89 000204 90 000221 93 000255 97 000322 101 000366 105 000367 110 000376 111 000402 116 000425 117 000437 121 000504 125 000505 134 000516 140 000606 ----------------------------------------------------------- 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