COMPILATION LISTING OF SEGMENT dm_set_shutdown_info Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/05/85 0902.0 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* This program sets the real shutdown information in dm_system_data_ 10* for all processes. It gets the administratively set shutdown values 11* saved in the system data, calculates the DMS shutdown times from the 12* Multics down time, compares the times, sets the real shutdown step times, 13* and returns the resulting shutdown_info structure to the caller. 14* 15* THIS PROGRAM SHOULD ONLY BE CALLED BY THE DM DAEMON'S STATIC HANDLER 16* FOR THE system_shutdown_scheduled_ IPS, OR THE SHUTDOWN IPC_ REQUEST 17* HANDLER. This should be the same program, 18* dm_daemon_util_$schedule_shutdown. 19**/ 20 21 /* HISTORY: 22* 23*Written by Lee A. Newcomb, 09/21/84. 24*Modified: 25**/ 26 27 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo */ 28 /* format: ^inddcls,dclind5,idind35,linecom */ 29 30 dm_set_shutdown_info: 31 proc (p_shutdown_info_ptr); 32 33 /* START OF DECLARATIONS */ 34 /* Parameter */ 35 dcl ( 36 p_shutdown_info_ptr ptr /* where to return the resulting shutdown info */ 37 ) parameter; 38 39 /* Automatic */ 40 dcl ( 41 1 admin_shutdown_info aligned like shutdown_info, 42 1 multics_shutdown_info aligned like shutdown_info, 43 1 multics_shutdown_spec aligned like shutdown_spec, 44 1 resultant_shutdown_info aligned like shutdown_info 45 ) automatic; 46 47 /* Based */ 48 /* Builtin */ 49 dcl (addr, null, unspec) builtin; 50 51 /* Constant */ 52 dcl ( 53 myname init ("dm_set_shutdown_info") 54 char (32) varying 55 ) internal static options (constant); 56 57 /* Entry */ 58 dcl ( 59 dm_compare_shutdown_info entry (ptr, ptr, ptr), 60 dm_process_shutdown_spec entry (ptr, ptr), 61 sub_err_ entry () options (variable) 62 ) external; 63 64 /* External */ 65 dcl ( 66 ( 67 dm_system_data_$begin_shutdown_time, /* shutdown time cells */ 68 dm_system_data_$daemon_logout_time, 69 dm_system_data_$saved_begin_shutdown_time, 70 dm_system_data_$saved_daemon_logout_time, 71 dm_system_data_$saved_user_bump_time, 72 dm_system_data_$saved_user_shutdown_time, 73 dm_system_data_$saved_user_warning_time, 74 dm_system_data_$user_bump_time, 75 dm_system_data_$user_shutdown_time, 76 dm_system_data_$user_warning_time 77 ) fixed bin (71), 78 ( 79 dm_system_data_$shutdown_reason, /* shutdown reason cells */ 80 dm_system_data_$saved_shutdown_reason 81 ) char (64) aligned, 82 error_table_$unimplemented_version fixed bin (35) 83 ) external static; 84 85 /* END OF DECLARATIONS */ 86 87 shutdown_info_ptr = p_shutdown_info_ptr; 88 call CHECK_VERSION (shutdown_info.version, SHUTDOWN_INFO_VERSION_1, 89 "shutdown_info"); 90 91 FILL_IN_ADMIN_INFO: 92 do; 93 unspec (admin_shutdown_info) = ""b; 94 admin_shutdown_info.version = SHUTDOWN_INFO_VERSION_1; 95 admin_shutdown_info.reason = dm_system_data_$saved_shutdown_reason; 96 admin_shutdown_info.user_warning_time = 97 dm_system_data_$saved_user_warning_time; 98 admin_shutdown_info.begin_shutdown_time = 99 dm_system_data_$saved_begin_shutdown_time; 100 admin_shutdown_info.user_shutdown_time = 101 dm_system_data_$saved_user_shutdown_time; 102 admin_shutdown_info.user_bump_time = 103 dm_system_data_$saved_user_bump_time; 104 admin_shutdown_info.daemon_logout_time = 105 dm_system_data_$saved_daemon_logout_time; 106 end FILL_IN_ADMIN_INFO; 107 108 PREPARE_MULTICS_SHUTDOWN_INFO: 109 do; 110 unspec (multics_shutdown_info) = ""b; 111 multics_shutdown_info.version = SHUTDOWN_INFO_VERSION_1; 112 end PREPARE_MULTICS_SHUTDOWN_INFO; 113 114 PROCESS_MULTICS_SHUTDOWN_SPEC: 115 do; 116 unspec (multics_shutdown_spec) = ""b; 117 multics_shutdown_spec.version = SHUTDOWN_SPEC_VERSION_1; 118 call dm_process_shutdown_spec (addr (multics_shutdown_spec), 119 addr (multics_shutdown_info)); 120 end PROCESS_MULTICS_SHUTDOWN_SPEC; 121 122 SET_NEW_SHUTDOWN_INFO: 123 do; 124 125 /* Always set the shutdown info in dm_system_data_. The use of */ 126 /* the compare entry is to get the effective shutdown times and the */ 127 /* no_time_specified flag set for the caller in the login ring. It */ 128 /* is possible to optimize this further to do a comparison with the */ 129 /* currently set shutdown times to avoid sending multiple */ 130 /* dm_shutdown_scheduled_ IPS' that are effectively no-ops. At this */ 131 /* time, it is believed that the number of no-op IPS sendings will be */ 132 /* so few that the extra complexity is not warranted. */ 133 134 unspec (resultant_shutdown_info) = ""b; 135 resultant_shutdown_info.version = SHUTDOWN_INFO_VERSION_1; 136 call dm_compare_shutdown_info (addr (multics_shutdown_info), 137 addr (admin_shutdown_info), addr (resultant_shutdown_info)); 138 139 dm_system_data_$user_warning_time = 140 resultant_shutdown_info.user_warning_time; 141 dm_system_data_$begin_shutdown_time = 142 resultant_shutdown_info.begin_shutdown_time; 143 dm_system_data_$user_shutdown_time = 144 resultant_shutdown_info.user_shutdown_time; 145 dm_system_data_$user_bump_time = resultant_shutdown_info.user_bump_time; 146 dm_system_data_$daemon_logout_time = 147 resultant_shutdown_info.daemon_logout_time; 148 dm_system_data_$shutdown_reason = resultant_shutdown_info.reason; 149 150 shutdown_info = resultant_shutdown_info; 151 end SET_NEW_SHUTDOWN_INFO; 152 153 MAIN_RETURN: 154 return; 155 156 157 /* end dm_set_shutdown_info; */ 158 159 CHECK_VERSION: 160 proc (cv_p_received_version, cv_p_expected_version, cv_p_structure_name); 161 162 dcl ( 163 cv_p_received_version char (*) aligned, 164 cv_p_expected_version char (*) aligned, 165 cv_p_structure_name char (*) 166 ) parameter; 167 168 if cv_p_received_version ^= cv_p_expected_version then 169 call sub_err_ (error_table_$unimplemented_version, myname, 170 ACTION_CANT_RESTART, null, 0, 171 "^/Expected version ^a of the ^a structure. 172 Received version ^d instead.", cv_p_expected_version, cv_p_structure_name, 173 cv_p_received_version); 174 175 end CHECK_VERSION; 176 1 1 /* ***** BEGIN INCLUDE FILE dm_shutdown_spec.incl.pl1 ***** */ 1 2 1 3 /* DESCRIPTION: 1 4* 1 5* Contains the shutdown_spec structure and the shutdown_info 1 6* structure. The shutdown_spec structure a reason for a DM 1 7* shutdown, a set of times and a set of delays. Only times and 1 8* delays which explicitly specified are set, the others are equal to 1 9* 0. 1 10* 1 11* The shutdown_spec is processed with the result being a 1 12* shutdown_info structure. It contains a reason and a set of times. 1 13* The times are either those times specified in the shutdown_spec or 1 14* times calculated from those times using delays. The delays are 1 15* those specified in the shutdown_spec, or, if not specified, 1 16* default delays. Default delays are kept in dm_system_data. 1 17**/ 1 18 1 19 /* HISTORY: 1 20*Written by Matthew Pierret, 09/06/84. 1 21*Modified: 1 22**/ 1 23 1 24 /* format: style2,ind3 */ 1 25 dcl 1 shutdown_spec aligned based (shutdown_spec_ptr), 1 26 2 version char (8) aligned, 1 27 2 reason char (64), 1 28 2 times, 1 29 3 user_warning_time 1 30 fixed bin (71), 1 31 3 begin_shutdown_time 1 32 fixed bin (71), 1 33 3 user_shutdown_time 1 34 fixed bin (71), 1 35 3 user_bump_time fixed bin (71), 1 36 3 daemon_logout_time 1 37 fixed bin (71), 1 38 2 delays, 1 39 3 begin_shutdown_delay 1 40 fixed bin (71), 1 41 3 user_shutdown_delay 1 42 fixed bin (71), 1 43 3 user_bump_delay fixed bin (71), 1 44 3 daemon_logout_delay 1 45 fixed bin (71); 1 46 1 47 dcl shutdown_spec_ptr ptr; 1 48 dcl SHUTDOWN_SPEC_VERSION_1 1 49 init ("ShutSp 1") char (8) aligned internal static options (constant); 1 50 1 51 dcl 1 shutdown_info aligned based (shutdown_info_ptr), 1 52 2 version char (8) aligned, 1 53 2 reason char (64), 1 54 2 times like shutdown_spec.times, 1 55 2 output_flags aligned, 1 56 3 no_time_specified 1 57 bit (1) unal, 1 58 3 times_have_changed 1 59 bit (1) unal, 1 60 3 mbz bit (34) unal; 1 61 1 62 dcl shutdown_info_ptr ptr init (null ()); 1 63 dcl SHUTDOWN_INFO_VERSION_1 1 64 init ("ShutIn 1") char (8) aligned internal static options (constant); 1 65 1 66 /* ******* END INCLUDE FILE dm_shutdown_spec.incl.pl1 ***** */ 177 178 2 1 /* BEGIN INCLUDE FILE sub_err_flags.incl.pl1 BIM 11/81 */ 2 2 /* format: style3 */ 2 3 2 4 /* These constants are to be used for the flags argument of sub_err_ */ 2 5 /* They are just "string (condition_info_header.action_flags)" */ 2 6 2 7 declare ( 2 8 ACTION_CAN_RESTART init (""b), 2 9 ACTION_CANT_RESTART init ("1"b), 2 10 ACTION_DEFAULT_RESTART 2 11 init ("01"b), 2 12 ACTION_QUIET_RESTART 2 13 init ("001"b), 2 14 ACTION_SUPPORT_SIGNAL 2 15 init ("0001"b) 2 16 ) bit (36) aligned internal static options (constant); 2 17 2 18 /* End include file */ 179 180 181 182 end dm_set_shutdown_info; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0758.6 dm_set_shutdown_info.pl1 >spec>on>7138.pbf>dm_set_shutdown_info.pl1 177 1 01/07/85 0859.8 dm_shutdown_spec.incl.pl1 >ldd>include>dm_shutdown_spec.incl.pl1 179 2 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 2-7 set ref 168* SHUTDOWN_INFO_VERSION_1 000002 constant char(8) initial dcl 1-63 set ref 88* 94 111 135 SHUTDOWN_SPEC_VERSION_1 000004 constant char(8) initial dcl 1-48 ref 117 addr builtin function dcl 49 ref 118 118 118 118 136 136 136 136 136 136 admin_shutdown_info 000100 automatic structure level 1 dcl 40 set ref 93* 136 136 begin_shutdown_time 24 000100 automatic fixed bin(71,0) level 3 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 98* begin_shutdown_time 24 000240 automatic fixed bin(71,0) level 3 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 141 cv_p_expected_version parameter char dcl 162 set ref 159 168 168* cv_p_received_version parameter char dcl 162 set ref 159 168 168* cv_p_structure_name parameter char unaligned dcl 162 set ref 159 168* daemon_logout_time 32 000240 automatic fixed bin(71,0) level 3 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 146 daemon_logout_time 32 000100 automatic fixed bin(71,0) level 3 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 104* dm_compare_shutdown_info 000010 constant entry external dcl 58 ref 136 dm_process_shutdown_spec 000012 constant entry external dcl 58 ref 118 dm_system_data_$begin_shutdown_time 000016 external static fixed bin(71,0) dcl 65 set ref 141* dm_system_data_$daemon_logout_time 000020 external static fixed bin(71,0) dcl 65 set ref 146* dm_system_data_$saved_begin_shutdown_time 000022 external static fixed bin(71,0) dcl 65 ref 98 dm_system_data_$saved_daemon_logout_time 000024 external static fixed bin(71,0) dcl 65 ref 104 dm_system_data_$saved_shutdown_reason 000044 external static char(64) dcl 65 ref 95 dm_system_data_$saved_user_bump_time 000026 external static fixed bin(71,0) dcl 65 ref 102 dm_system_data_$saved_user_shutdown_time 000030 external static fixed bin(71,0) dcl 65 ref 100 dm_system_data_$saved_user_warning_time 000032 external static fixed bin(71,0) dcl 65 ref 96 dm_system_data_$shutdown_reason 000042 external static char(64) dcl 65 set ref 148* dm_system_data_$user_bump_time 000034 external static fixed bin(71,0) dcl 65 set ref 145* dm_system_data_$user_shutdown_time 000036 external static fixed bin(71,0) dcl 65 set ref 143* dm_system_data_$user_warning_time 000040 external static fixed bin(71,0) dcl 65 set ref 139* error_table_$unimplemented_version 000046 external static fixed bin(35,0) dcl 65 set ref 168* multics_shutdown_info 000136 automatic structure level 1 dcl 40 set ref 110* 118 118 136 136 multics_shutdown_spec 000174 automatic structure level 1 dcl 40 set ref 116* 118 118 myname 000006 constant varying char(32) initial dcl 52 set ref 168* null builtin function dcl 49 ref 1-62 168 168 p_shutdown_info_ptr parameter pointer dcl 35 ref 30 87 reason 2 000240 automatic char(64) level 2 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 148 reason 2 000100 automatic char(64) level 2 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 95* resultant_shutdown_info 000240 automatic structure level 1 dcl 40 set ref 134* 136 136 150 shutdown_info based structure level 1 dcl 1-51 set ref 150* shutdown_info_ptr 000276 automatic pointer initial dcl 1-62 set ref 87* 88 150 1-62* shutdown_spec based structure level 1 dcl 1-25 sub_err_ 000014 constant entry external dcl 58 ref 168 times 22 000100 automatic structure level 2 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" times 22 000240 automatic structure level 2 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" times 22 000174 automatic structure level 2 in structure "multics_shutdown_spec" dcl 40 in procedure "dm_set_shutdown_info" times 22 based structure level 2 in structure "shutdown_spec" dcl 1-25 in procedure "dm_set_shutdown_info" unspec builtin function dcl 49 set ref 93* 110* 116* 134* user_bump_time 30 000100 automatic fixed bin(71,0) level 3 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 102* user_bump_time 30 000240 automatic fixed bin(71,0) level 3 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 145 user_shutdown_time 26 000240 automatic fixed bin(71,0) level 3 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 143 user_shutdown_time 26 000100 automatic fixed bin(71,0) level 3 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 100* user_warning_time 22 000240 automatic fixed bin(71,0) level 3 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 139 user_warning_time 22 000100 automatic fixed bin(71,0) level 3 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 96* version 000240 automatic char(8) level 2 in structure "resultant_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 135* version 000174 automatic char(8) level 2 in structure "multics_shutdown_spec" dcl 40 in procedure "dm_set_shutdown_info" set ref 117* version 000136 automatic char(8) level 2 in structure "multics_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 111* version 000100 automatic char(8) level 2 in structure "admin_shutdown_info" dcl 40 in procedure "dm_set_shutdown_info" set ref 94* version based char(8) level 2 in structure "shutdown_info" dcl 1-51 in procedure "dm_set_shutdown_info" set ref 88* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACTION_CAN_RESTART internal static bit(36) initial dcl 2-7 ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 2-7 ACTION_QUIET_RESTART internal static bit(36) initial dcl 2-7 ACTION_SUPPORT_SIGNAL internal static bit(36) initial dcl 2-7 shutdown_spec_ptr automatic pointer dcl 1-47 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_VERSION 000247 constant entry internal dcl 159 ref 88 FILL_IN_ADMIN_INFO 000123 constant label dcl 91 MAIN_RETURN 000246 constant label dcl 153 PREPARE_MULTICS_SHUTDOWN_INFO 000147 constant label dcl 108 PROCESS_MULTICS_SHUTDOWN_SPEC 000154 constant label dcl 114 SET_NEW_SHUTDOWN_INFO 000175 constant label dcl 122 dm_set_shutdown_info 000065 constant entry external dcl 30 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 636 706 364 646 Length 1134 364 50 211 251 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dm_set_shutdown_info 286 external procedure is an external procedure. CHECK_VERSION internal procedure shares stack frame of external procedure dm_set_shutdown_info. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dm_set_shutdown_info 000100 admin_shutdown_info dm_set_shutdown_info 000136 multics_shutdown_info dm_set_shutdown_info 000174 multics_shutdown_spec dm_set_shutdown_info 000240 resultant_shutdown_info dm_set_shutdown_info 000276 shutdown_info_ptr dm_set_shutdown_info 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_compare_shutdown_info dm_process_shutdown_spec sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_system_data_$begin_shutdown_time dm_system_data_$daemon_logout_time dm_system_data_$saved_begin_shutdown_time dm_system_data_$saved_daemon_logout_time dm_system_data_$saved_shutdown_reason dm_system_data_$saved_user_bump_time dm_system_data_$saved_user_shutdown_time dm_system_data_$saved_user_warning_time dm_system_data_$shutdown_reason dm_system_data_$user_bump_time dm_system_data_$user_shutdown_time dm_system_data_$user_warning_time error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 30 000062 1 62 000072 87 000074 88 000100 93 000123 94 000126 95 000130 96 000135 98 000137 100 000141 102 000143 104 000145 110 000147 111 000152 116 000154 117 000157 118 000161 134 000175 135 000200 136 000202 139 000223 141 000226 143 000230 145 000232 146 000234 148 000236 150 000242 153 000246 159 000247 168 000272 175 000363 ----------------------------------------------------------- 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