COMPILATION LISTING OF SEGMENT tm_ips_wakeup Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/05/85 0913.6 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* The tm_ips_wakeup sends a (Data Management) IPS to a current user of 10* a DMS. At this writing, the only valid DM IPS is dm_shutdown_scheduled_. 11* We do not currently lock the TDT. Note: the current caretaker Daemon of 12* the DMS is never sent an IPS. 13* 14* The first entry, $all_processes, walks the TDT looking for processes 15* using the DMS and then sends the IPS. The other entry, $single_process, 16* sends the IPS to only one process as specified by the caller; if the 17* process is not in the TDT, the IPS is NOT sent. 18* 19* A call to sub_err_ will result if the TDT is not the version we 20* expect it to be. 21**/ 22 23 /* HISTORY: 24* 25*Written by Lee A. Newcomb, 08/07/84. 26*Modified: 27*09/17/84 by Lee A. Newcomb: Added check of TDT version, fixed bad format 28* comment, and corrected DESCRIPTION section. 29*10/01/84 by Lee A. Newcomb: Renamed original program to be tm_ips_wakeup to 30* correspond to the TV entry calling it, changed original program to 31* be the $all_processes entry, added the $single_process entry, and 32* changed CHECK_VERSION to use sub_err_ to report an error. 33**/ 34 35 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo */ 36 /* format: ^inddcls,dclind5,idind35,linecom */ 37 38 tm_ips_wakeup$all_processes: 39 proc (p_ips_name, p_dm_system_in_use); 40 41 /* START OF DECLARATIONS */ 42 /* Parameter */ 43 dcl ( 44 p_ips_name char (*), /*the name of the IPS to send to each process using the DMS.*/ 45 p_dm_system_in_use bit (1) aligned, /* used by $all_processes entry */ 46 p_process_id bit (36) aligned /* for $single_process */ 47 ) parameter; 48 49 /* Automatic */ 50 dcl ( 51 dm_system_in_use bit (1) aligned init ("0"b), 52 /* active users/txns in DMS */ 53 ips_name char (32), /* parameter copy */ 54 process_id bit (36) aligned, /* parameter copy */ 55 tdt_index fixed bin /* to loop through TDT */ 56 ) automatic; 57 58 /* Based */ 59 /* Builtin */ 60 dcl null builtin; 61 62 /* Constant */ 63 dcl ( 64 myname char (32) init ("tm_ips_wakeup") 65 ) int static options (constant); 66 67 /* Entry */ 68 dcl ( 69 dm_hphcs_$ips_wakeup entry (bit (36) aligned, char (*)), 70 sub_err_ entry () options (variable) 71 ) external; 72 73 /* External */ 74 dcl ( 75 dm_data_$tm_tdt_ptr ptr, 76 dm_system_data_$initializer_processid 77 bit (36) aligned, 78 error_table_$unimplemented_version fixed bin (35) 79 ) external; 80 81 /* END OF DECLARATIONS */ 82 83 ips_name = p_ips_name; /* copy parameter for use */ 84 tm_tdt_ptr = dm_data_$tm_tdt_ptr; /* and find TDT */ 85 call CHECK_VERSION (tm_tdt.version, (TM_TDT_VERSION_3), "tm_tdt"); 86 /* if return, then OK */ 87 88 FIND_PROCESSES_TO_SIGNAL: 89 do tdt_index = 1 to tm_tdt.entry_count; 90 91 if tm_tdt.process_id (tdt_index) ^= "0"b then 92 if tm_tdt.process_id (tdt_index) 93 ^= dm_system_data_$initializer_processid then 94 SEND_SIGNAL: 95 do; 96 call dm_hphcs_$ips_wakeup (tm_tdt.process_id (tdt_index), ips_name) 97 ; 98 dm_system_in_use = "1"b; 99 end SEND_SIGNAL; 100 else if tm_tdt.txn_id (tdt_index) ^= "0"b then /* Daemon adjusting a txn */ 101 dm_system_in_use = "1"b; /* do not send IPS to Daemon */ 102 end FIND_PROCESSES_TO_SIGNAL; 103 104 p_dm_system_in_use = dm_system_in_use; 105 106 MAIN_RETURN: 107 return; 108 109 /* end tm_ips_wakeup$all_processes; */ 110 111 112 tm_ips_wakeup$single_process: 113 entry (p_ips_name, p_process_id); 114 115 ips_name = p_ips_name; /* copy parameters */ 116 process_id = p_process_id; 117 if process_id = dm_system_data_$initializer_processid then 118 call RETURN; /* we don't allow this */ 119 120 tm_tdt_ptr = dm_data_$tm_tdt_ptr; /* and find TDT */ 121 call CHECK_VERSION (tm_tdt.version, (TM_TDT_VERSION_3), "tm_tdt"); 122 123 /* dm_system_in_use in $single_process tells if user is active */ 124 TRY_TO_FIND_SINGLE_USER: /* or how to do a pick-up */ 125 do tdt_index = 1 to tm_tdt.entry_count while (^dm_system_in_use); 126 if tm_tdt.process_id (tdt_index) = process_id then 127 dm_system_in_use = "1"b; 128 end TRY_TO_FIND_SINGLE_USER; 129 130 if dm_system_in_use then 131 SEND_SIGNAL_TO_SINGLE_USER: 132 call dm_hphcs_$ips_wakeup (process_id, ips_name); 133 134 return; 135 136 /* end tm_ips_wakeup$single_process; */ 137 138 RETURN: 139 proc (); 140 go to MAIN_RETURN; 141 142 end RETURN; 143 144 145 146 CHECK_VERSION: 147 proc (cv_p_input_version, cv_p_expected_version, cv_p_structure_name); 148 149 dcl ( 150 cv_p_input_version char (8) aligned, 151 cv_p_expected_version char (8) aligned, 152 cv_p_structure_name char (*) 153 ) parameter; 154 155 if cv_p_input_version ^= cv_p_expected_version then 156 call sub_err_ (error_table_$unimplemented_version, myname, 157 ACTION_CANT_RESTART, null (), (0), 158 "Expected version ^a of structure ^a, received ^a.", 159 cv_p_structure_name, cv_p_expected_version, cv_p_input_version); 160 161 end CHECK_VERSION; 162 1 1 /* START OF: dm_tm_tdt.incl.pl1 */ 1 2 1 3 /* Transaction Definition Table for transaction_manager_ */ 1 4 /* This structure is used to reference the TDT. The process_id field for the 1 5* i'th TDT entry, for example, is usually referenced as tm_tdt.process_id (i). 1 6* A TDT entry is in use by a process when its process_id field is nonzero. 1 7* An entry is reserved by using the stacq builtin to set process_id, if and 1 8* only if it is already zero. The entry is being used for a transaction when 1 9* tm_tdt.txn_id (i) is nonzero. The possible values of tm_tdt.state (i) are 1 10* listed in dm_tm_states.incl.pl1. If state = 0, no operation has been 1 11* performed yet on the transaction. */ 1 12 1 13 1 14 /* HISTORY: 1 15*Designed by Matt Pierret, 01/26/82. 1 16*Coded by Steve Herbst, 07/27/82. 1 17*Modified: 1 18*08/05/82 by Steve Herbst: Added tm_tdt.operation and padded last_uid to full word. 1 19*08/05/82 by Steve Herbst: Changed creator_process_id to bit (36). 1 20*08/16/82 by Steve Herbst: Added contents of dm_tm_tdt_entry.incl.pl1. 1 21*09/09/82 by Steve Herbst: Removed in_use flag from TDT entry and rearranged fields. 1 22*09/20/82 by Steve Herbst: Removed tm_tdt.operation. 1 23*11/01/82 by Steve Herbst: Added event_channel and error_sw to tm_tdt_entry. 1 24*11/05/82 by Steve Herbst: Added suspended_sw and error_code to tm_tdt_entry. 1 25*11/11/82 by Steve Herbst: Deleted tm_tdt_entry.alloc_complete. 1 26*11/23/82 by Steve Herbst: Compacted, changed some numbers to unsigned. 1 27*12/14/82 by Steve Herbst: Added tm_tdt_entry.daemon_error_sw. 1 28*01/11/83 by Steve Herbst: Added owner_name, abandoned_sw & kill_sw to tm_tdt_entry. 1 29*01/24/83 by Steve Herbst: Replaced daemon_error_sw with daemon_adjust_count. 1 30*01/25/83 by Steve Herbst: Moved abandoned_sw from transaction portion to entry header portion. 1 31*05/13/83 by Steve Herbst: Version 3, changed all fixed bin (18) unal uns numbers to fixed bin (17) unaligned. 1 32*05/26/83 by Steve Herbst: Added rollback_count and checkpoint_id. 1 33**/ 1 34 1 35 dcl tm_tdt_ptr ptr; 1 36 dcl tdt_max_count fixed bin; 1 37 1 38 dcl TM_TDT_VERSION_3 char (8) int static options (constant) init ("TM-TDT 3"); 1 39 1 40 1 41 dcl 1 tm_tdt aligned based (tm_tdt_ptr), 1 42 2 version char (8), /* = "TM-TDT 3" */ 1 43 2 lock fixed bin (71), /* (currently not used) */ 1 44 2 last_uid bit (27) aligned, /* last transaction uid assigned */ 1 45 2 flags, 1 46 3 no_begins bit (1) unaligned, /* ON => only priv process can begin transaction */ 1 47 3 mbz1 bit (35) unaligned, 1 48 2 entry_count fixed bin, /* number of slots allocated */ 1 49 2 mbz2 fixed bin, /* for even word boundary */ 1 50 2 entry (tdt_max_count refer (tm_tdt.entry_count)) 1 51 like tm_tdt_entry; 1 52 1 53 1 54 1 55 /* TDT entries: */ 1 56 1 57 dcl tm_tdt_entry_ptr ptr; 1 58 1 59 dcl 1 tm_tdt_entry aligned based (tm_tdt_entry_ptr), 1 60 2 event_channel fixed bin (71), /* for communication with the process */ 1 61 2 process_id bit (36) aligned, /* process for which this entry is reserved */ 1 62 2 owner_name char (32), /* person.project of owner process */ 1 63 2 entry_flags, 1 64 3 abandoned_sw bit (1) unaligned, /* ON => owner has called tm_$abandon on this entry */ 1 65 3 mbz3 bit (35) unaligned, 1 66 2 transaction unaligned, 1 67 3 txn_id bit (36) aligned, /* unique identifier assigned at begin time */ 1 68 3 date_time_created fixed bin (71) aligned, 1 69 3 mode fixed bin (17) unaligned, /* mode specified with transaction begin */ 1 70 3 state fixed bin (17) unaligned, /* state transaction is currently in */ 1 71 3 error_code fixed bin (35) aligned, /* goes along with error_sw and error state */ 1 72 3 checkpoint_id fixed bin (17) unaligned, /* identifier of the current rollback checkpoint */ 1 73 3 rollback_count fixed bin (17) unaligned, /* number of times bjm_$rollback has been called */ 1 74 3 daemon_adjust_count fixed bin (17) unaligned, /* number of times daemon has tried to adjust since user */ 1 75 3 return_idx fixed bin (17) unaligned, /* parent transaction, or zero */ 1 76 3 flags, 1 77 4 dead_process_sw bit (1) unaligned, /* ON => treat process as dead even if it isn't yet */ 1 78 4 suspended_sw bit (1) unaligned, /* ON => suspended by tm_$suspend_txn */ 1 79 4 error_sw bit (1) unaligned, /* ON => state is one of the error states */ 1 80 4 kill_sw bit (1) unaligned, /* ON => being processed by tm_$kill */ 1 81 4 mbz4 bit (29) unaligned, 1 82 3 post_commit_flags, 1 83 4 (fmgr, 1 84 bjmgr, 1 85 ajmgr) bit (1) unaligned, 1 86 3 mbz4 fixed bin; 1 87 1 88 1 89 /* END OF: dm_tm_tdt.incl.pl1 */ 163 164 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 */ 165 166 167 168 end tm_ips_wakeup$all_processes; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/05/85 0759.9 tm_ips_wakeup.pl1 >spec>on>7138.pbf>tm_ips_wakeup.pl1 163 1 01/07/85 0900.1 dm_tm_tdt.incl.pl1 >ldd>include>dm_tm_tdt.incl.pl1 165 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 000016 constant bit(36) initial dcl 2-7 set ref 155* TM_TDT_VERSION_3 000000 constant char(8) initial unaligned dcl 1-38 ref 85 121 cv_p_expected_version parameter char(8) dcl 149 set ref 146 155 155* cv_p_input_version parameter char(8) dcl 149 set ref 146 155 155* cv_p_structure_name parameter char unaligned dcl 149 set ref 146 155* dm_data_$tm_tdt_ptr 000014 external static pointer dcl 74 ref 84 120 dm_hphcs_$ips_wakeup 000010 constant entry external dcl 68 ref 96 130 dm_system_data_$initializer_processid 000016 external static bit(36) dcl 74 ref 91 117 dm_system_in_use 000100 automatic bit(1) initial dcl 50 set ref 50* 98* 100* 104 124 126* 130 entry 10 based structure array level 2 dcl 1-41 entry_count 6 based fixed bin(17,0) level 2 dcl 1-41 ref 88 124 error_table_$unimplemented_version 000020 external static fixed bin(35,0) dcl 74 set ref 155* ips_name 000101 automatic char(32) unaligned dcl 50 set ref 83* 96* 115* 130* myname 000002 constant char(32) initial unaligned dcl 63 set ref 155* null builtin function dcl 60 ref 155 155 p_dm_system_in_use parameter bit(1) dcl 43 set ref 38 104* p_ips_name parameter char unaligned dcl 43 ref 38 83 112 115 p_process_id parameter bit(36) dcl 43 ref 112 116 process_id 12 based bit(36) array level 3 in structure "tm_tdt" dcl 1-41 in procedure "tm_ips_wakeup$all_processes" set ref 91 91 96* 126 process_id 000111 automatic bit(36) dcl 50 in procedure "tm_ips_wakeup$all_processes" set ref 116* 117 126 130* sub_err_ 000012 constant entry external dcl 68 ref 155 tdt_index 000112 automatic fixed bin(17,0) dcl 50 set ref 88* 91 91 96 100* 124* 126* tm_tdt based structure level 1 dcl 1-41 tm_tdt_entry based structure level 1 dcl 1-59 tm_tdt_ptr 000114 automatic pointer dcl 1-35 set ref 84* 85 88 91 91 96 100 120* 121 124 126 transaction 24 based structure array level 3 unaligned dcl 1-41 txn_id 24 based bit(36) array level 4 dcl 1-41 ref 100 version based char(8) level 2 dcl 1-41 set ref 85* 121* 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 tdt_max_count automatic fixed bin(17,0) dcl 1-36 tm_tdt_entry_ptr automatic pointer dcl 1-57 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_VERSION 000336 constant entry internal dcl 146 ref 85 121 FIND_PROCESSES_TO_SIGNAL 000130 constant label dcl 88 MAIN_RETURN 000204 constant label dcl 106 ref 140 RETURN 000334 constant entry internal dcl 138 ref 117 SEND_SIGNAL 000151 constant label dcl 91 SEND_SIGNAL_TO_SINGLE_USER 000316 constant label dcl 130 TRY_TO_FIND_SINGLE_USER 000270 constant label dcl 124 tm_ips_wakeup$all_processes 000057 constant entry external dcl 38 tm_ips_wakeup$single_process 000211 constant entry external dcl 112 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 610 632 440 620 Length 1042 440 22 174 147 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tm_ips_wakeup$all_processes 172 external procedure is an external procedure. RETURN internal procedure shares stack frame of external procedure tm_ips_wakeup$all_processes. CHECK_VERSION internal procedure shares stack frame of external procedure tm_ips_wakeup$all_processes. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME tm_ips_wakeup$all_processes 000100 dm_system_in_use tm_ips_wakeup$all_processes 000101 ips_name tm_ips_wakeup$all_processes 000111 process_id tm_ips_wakeup$all_processes 000112 tdt_index tm_ips_wakeup$all_processes 000114 tm_tdt_ptr tm_ips_wakeup$all_processes THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. dm_hphcs_$ips_wakeup sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_data_$tm_tdt_ptr dm_system_data_$initializer_processid error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 50 000050 38 000053 83 000073 84 000101 85 000105 88 000130 91 000141 96 000151 98 000170 99 000172 100 000173 102 000177 104 000201 106 000204 112 000205 115 000225 116 000233 117 000235 120 000241 121 000245 124 000270 126 000303 128 000312 130 000314 134 000333 138 000334 140 000335 146 000336 155 000347 161 000437 ----------------------------------------------------------- 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