COMPILATION LISTING OF SEGMENT lm_signal_ 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.8 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* Signals the condition: "transaction_deadlock_" when a deadlock exists 9* involving the current transaction, "transaction_lock_timeout_" when a 10* timeout occurs waiting for a control interval lock. It is the 11* responsibility of the DM caller to handle these conditions as necessary. 12**/ 13 14 /* HISTORY: 15*Written by Benson I. Margulies 06/01/83. 16*Modified: 17*10/03/84 by Stanford S. Cox: Chg to set support_signal on, rn TDI to local_txn* 18*12/06/84 by Stanford S. Cox: Added dm_lm prefix to txn_deadlock_info.incl.pl1. 19*02/05/85 by Stanford S. Cox: Chg to: handle transaction_lock_timeout_, rollback 20* current txn. Renamed from lm_signal_deadlock_. 21*02/12/85 by Stanford S. Cox: Chg to set cant_restart, improve ioa_$rsnnl call 22* which builds info_string, and moved rollback_txn call before signal_ call. 23*03/02/85 by Lindsey L. Spratt: Fixed to not reference p_give_up_time when 24* using the $deadlock entry (p_give_up_time is only a parameter to 25* the $timeout entry). 26**/ 27 28 /* format: style2 */ 29 lm_signal_$deadlock: 30 proc (p_txn, p_file_uid, p_ci_number, p_requested_mode); 31 32 /* Parameter */ 33 34 declare p_txn bit (36) aligned parameter; 35 declare p_file_uid bit (36) aligned parameter; 36 declare p_ci_number fixed bin (35) parameter; 37 declare p_requested_mode fixed bin parameter; 38 declare p_give_up_time fixed bin (71); 39 40 /* Automatic */ 41 42 declare code fixed bin (35); 43 declare give_up_time fixed bin (71) init (-1); 44 declare signal_type fixed bin (17); 45 46 declare 1 local_txn_timeout_info 47 aligned like txn_timeout_info; 48 declare 1 local_txn_dlk_info aligned like txn_deadlock_info; 49 50 /* Static */ 51 52 declare ( 53 DEADLOCK_SIGNAL_TYPE fixed bin (17) init (1), 54 TIMEOUT_SIGNAL_TYPE fixed bin (17) init (2), 55 ME char (10) init ("lm_signal_"), 56 NO bit (1) init ("0"b), 57 YES bit (1) init ("1"b) 58 ) internal static options (constant); 59 60 /* Builtin */ 61 62 dcl (addr, bin, null, unspec) 63 builtin; 64 65 /* External */ 66 67 declare ( 68 dm_error_$lock_deadlock, 69 dm_error_$lock_timeout, 70 dm_error_$programming_error 71 ) fixed bin (35) external static; 72 73 /* Entry */ 74 75 declare ioa_$rsnnl entry options (variable); 76 declare signal_ entry options (variable); 77 declare sub_err_ entry () options (variable); 78 declare transaction_manager_$rollback_txn 79 entry (bit (36) aligned, fixed bin, fixed bin (35)); 80 81 /**** lm_signal_$deadlock */ 82 83 signal_type = DEADLOCK_SIGNAL_TYPE; 84 goto JOIN; 85 86 lm_signal_$timeout: 87 entry (p_txn, p_file_uid, p_ci_number, p_requested_mode, p_give_up_time); 88 89 give_up_time = p_give_up_time; 90 signal_type = TIMEOUT_SIGNAL_TYPE; 91 goto JOIN; 92 93 JOIN: /*** Fill in common info to both condition structures, move by name if timeout */ 94 unspec (local_txn_dlk_info) = ""b; 95 local_txn_dlk_info.info_string = ""; 96 local_txn_dlk_info.action_flags.cant_restart = YES; 97 local_txn_dlk_info.action_flags.support_signal = YES; 98 local_txn_dlk_info.file_uid = p_file_uid; 99 local_txn_dlk_info.control_interval = p_ci_number; 100 local_txn_dlk_info.transaction_id = p_txn; 101 call ioa_$rsnnl ( 102 "Transaction ID: ^d ^[Timeout ^d^;^s^] File UID: ^w^[, Control Interval ^d^;^s^]. Requested ^a mode lock.", 103 local_txn_dlk_info.info_string, (0), bin (p_txn), (signal_type = TIMEOUT_SIGNAL_TYPE), give_up_time, 104 p_file_uid, p_ci_number ^= -1, p_ci_number, LOCK_MODE_NAMES (p_requested_mode)); 105 106 call transaction_manager_$rollback_txn (p_txn, (0), code); 107 108 if signal_type = DEADLOCK_SIGNAL_TYPE 109 then do; 110 local_txn_dlk_info.version = TXN_DEADLOCK_INFO_VERSION_1; 111 local_txn_dlk_info.status_code = dm_error_$lock_deadlock; 112 call signal_ (TXN_DEADLOCK_CONDITION_NAME, null (), addr (local_txn_dlk_info)); 113 end; 114 else if signal_type = TIMEOUT_SIGNAL_TYPE 115 then do; 116 local_txn_timeout_info = local_txn_dlk_info, by name; 117 local_txn_timeout_info.version = TXN_TIMEOUT_INFO_VERSION_1; 118 local_txn_timeout_info.status_code = dm_error_$lock_timeout; 119 local_txn_timeout_info.give_up_time = give_up_time; 120 call signal_ (TXN_TIMEOUT_CONDITION_NAME, null (), addr (local_txn_timeout_info)); 121 end; 122 else call sub_err_ (dm_error_$programming_error, ME, ACTION_CANT_RESTART, null (), 0, "^/^a", 123 local_txn_dlk_info.info_string); 124 125 return; 126 1 1 /* BEGIN INCLUDE FILE condition_info_header.incl.pl1 BIM 1981 */ 1 2 /* format: style2 */ 1 3 1 4 declare condition_info_header_ptr 1 5 pointer; 1 6 declare 1 condition_info_header 1 7 aligned based (condition_info_header_ptr), 1 8 2 length fixed bin, /* length in words of this structure */ 1 9 2 version fixed bin, /* version number of this structure */ 1 10 2 action_flags aligned, /* tell handler how to proceed */ 1 11 3 cant_restart bit (1) unaligned, /* caller doesn't ever want to be returned to */ 1 12 3 default_restart bit (1) unaligned, /* caller can be returned to with no further action */ 1 13 3 quiet_restart bit (1) unaligned, /* return, and print no message */ 1 14 3 support_signal bit (1) unaligned, /* treat this signal as if the signalling procedure had the support bit set */ 1 15 /* if the signalling procedure had the support bit set, do the same for its caller */ 1 16 3 pad bit (32) unaligned, 1 17 2 info_string char (256) varying, /* may contain printable message */ 1 18 2 status_code fixed bin (35); /* if^=0, code interpretable by com_err_ */ 1 19 1 20 /* END INCLUDE FILE condition_info_header.incl.pl1 */ 127 128 2 1 /* START OF: dm_lm_txn_timeout_info.incl.pl1 * * * * * * * * * * * * * * * * * * * */ 2 2 2 3 /* DESCRIPTION: 2 4* 2 5* Condition info for the Data Management transaction_deadlock condition. 2 6* This include file requires condition_info_header.incl.pl1 2 7**/ 2 8 2 9 /* HISTORY: 2 10*Written by Stanford S. Cox, 02/05/84. 2 11*Modified: 2 12**/ 2 13 2 14 declare txn_timeout_info_ptr pointer; 2 15 declare 1 txn_timeout_info aligned based (txn_timeout_info_ptr), 2 16 2 header aligned like condition_info_header, 2 17 2 transaction_id bit (36) aligned, 2 18 2 file_uid bit (36) aligned, 2 19 2 control_interval fixed bin (27) aligned, 2 20 2 give_up_time fixed bin (71); 2 21 2 22 declare TXN_TIMEOUT_INFO_VERSION_1 fixed bin int static init (1) options (constant); 2 23 2 24 declare TXN_TIMEOUT_CONDITION_NAME char (32) init ("transaction_lock_timeout_") int static options (constant); 2 25 2 26 /* END OF: dm_lm_txn_timeout_info.incl.pl1 * * * * * * * * * * * * * * * * * * * */ 129 130 3 1 /* START OF: dm_lm_txn_deadlock_info.incl.pl1 * * * * * * * * * * * * * * * * * * * */ 3 2 3 3 /* DESCRIPTION: 3 4* 3 5* Condition info for the Data Management transaction_deadlock condition. 3 6* This include file requires condition_info_header.incl.pl1 3 7**/ 3 8 3 9 /* HISTORY: 3 10*Written by BIM, 06/01/83. 3 11*Modified: 3 12*12/06/84 by Stanford S. Cox: Added description, added dm_lm to incl name. 3 13*02/05/85 by Stanford S. Cox: Chg condition name to transaction_deadlock_ 3 14**/ 3 15 /* format: style3,idind30 */ 3 16 3 17 declare txn_deadlock_info_ptr pointer; 3 18 declare 1 txn_deadlock_info aligned based (txn_deadlock_info_ptr), 3 19 2 header aligned like condition_info_header, 3 20 2 transaction_id bit (36) aligned, 3 21 2 file_uid bit (36) aligned, 3 22 2 control_interval fixed bin (27) aligned; 3 23 3 24 declare TXN_DEADLOCK_INFO_VERSION_1 fixed bin int static init (1) options (constant); 3 25 3 26 declare TXN_DEADLOCK_CONDITION_NAME char (32) init ("transaction_deadlock_") int static options (constant); 3 27 3 28 /* END OF: dm_lm_txn_deadlock_info.incl.pl1 * * * * * * * * * * * * * * * * * * * */ 131 132 4 1 /* START OF: dm_lock_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 4 2 4 3 /* DESCRIPTION: 4 4* 4 5* Hierarchical lock modes for Data Management control interval locking. In 4 6*addition to conventional read and write locks, intention locks are provided 4 7*for finer locking granularity. 4 8**/ 4 9 4 10 /* HISTORY: 4 11*Written by Jeffrey D. Ives, 04/30/82. 4 12*Modified: 4 13*12/05/84 by Stanford S. Cox: Added Description. 4 14**/ 4 15 /* format: style3,idind25 */ 4 16 4 17 dcl LOCK_MODE_S fixed bin static options (constant) init (2); 4 18 dcl LOCK_MODE_X fixed bin static options (constant) init (3); 4 19 dcl LOCK_MODE_IS fixed bin static options (constant) init (4); 4 20 dcl LOCK_MODE_IX fixed bin static options (constant) init (5); 4 21 dcl LOCK_MODE_SIX fixed bin static options (constant) init (6); 4 22 4 23 dcl LOCK_ENTIRE_FILE fixed bin (27) static options (constant) init (-1); 4 24 4 25 dcl LOCK_MODE_NAMES (2:6) char (3) int static options (constant) 4 26 init (" S", " X", " IS", " IX", "SIX"); 4 27 4 28 /* 4 29* S Share Let others read it but not modify it. 4 30* X Exclusive Let nobody else read or modify it. 4 31* IS Intention Share I am only using S locks, because I am only reading CIs. 4 32* IX Intention Exclusive I am using S and X locks, because I am reading and modifying CIs. 4 33* SIX Share with Intention Exclusive I am reading control intervals, but only locking the ones I modify. 4 34**/ 4 35 4 36 /* END OF: dm_lock_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 133 134 5 1 /* BEGIN INCLUDE FILE sub_err_flags.incl.pl1 BIM 11/81 */ 5 2 /* format: style3 */ 5 3 5 4 /* These constants are to be used for the flags argument of sub_err_ */ 5 5 /* They are just "string (condition_info_header.action_flags)" */ 5 6 5 7 declare ( 5 8 ACTION_CAN_RESTART init (""b), 5 9 ACTION_CANT_RESTART init ("1"b), 5 10 ACTION_DEFAULT_RESTART 5 11 init ("01"b), 5 12 ACTION_QUIET_RESTART 5 13 init ("001"b), 5 14 ACTION_SUPPORT_SIGNAL 5 15 init ("0001"b) 5 16 ) bit (36) aligned internal static options (constant); 5 17 5 18 /* End include file */ 135 136 137 end lm_signal_$deadlock; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0827.2 lm_signal_.pl1 >spec>on>7192.pbf-04/04/85>lm_signal_.pl1 127 1 03/24/82 1347.2 condition_info_header.incl.pl1 >ldd>include>condition_info_header.incl.pl1 129 2 03/06/85 1031.5 dm_lm_txn_timeout_info.incl.pl1 >ldd>include>dm_lm_txn_timeout_info.incl.pl1 131 3 03/06/85 1031.4 dm_lm_txn_deadlock_info.incl.pl1 >ldd>include>dm_lm_txn_deadlock_info.incl.pl1 133 4 01/07/85 0901.4 dm_lock_modes.incl.pl1 >ldd>include>dm_lock_modes.incl.pl1 135 5 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 000024 constant bit(36) initial dcl 5-7 set ref 122* DEADLOCK_SIGNAL_TYPE constant fixed bin(17,0) initial dcl 52 ref 83 108 LOCK_MODE_NAMES 000000 constant char(3) initial array unaligned dcl 4-25 set ref 101* ME 000025 constant char(10) initial unaligned dcl 52 set ref 122* TIMEOUT_SIGNAL_TYPE constant fixed bin(17,0) initial dcl 52 ref 90 101 114 TXN_DEADLOCK_CONDITION_NAME 000004 constant char(32) initial unaligned dcl 3-26 set ref 112* TXN_DEADLOCK_INFO_VERSION_1 constant fixed bin(17,0) initial dcl 3-24 ref 110 TXN_TIMEOUT_CONDITION_NAME 000014 constant char(32) initial unaligned dcl 2-24 set ref 120* TXN_TIMEOUT_INFO_VERSION_1 constant fixed bin(17,0) initial dcl 2-22 ref 117 YES 000024 constant bit(1) initial unaligned dcl 52 ref 96 97 action_flags 2 000220 automatic structure level 3 dcl 48 addr builtin function dcl 62 ref 112 112 120 120 bin builtin function dcl 62 ref 101 101 cant_restart 2 000220 automatic bit(1) level 4 packed unaligned dcl 48 set ref 96* code 000100 automatic fixed bin(35,0) dcl 42 set ref 106* condition_info_header based structure level 1 dcl 1-6 control_interval 107 000220 automatic fixed bin(27,0) level 2 dcl 48 set ref 99* dm_error_$lock_deadlock 000010 external static fixed bin(35,0) dcl 67 ref 111 dm_error_$lock_timeout 000012 external static fixed bin(35,0) dcl 67 ref 118 dm_error_$programming_error 000014 external static fixed bin(35,0) dcl 67 set ref 122* file_uid 106 000220 automatic bit(36) level 2 dcl 48 set ref 98* give_up_time 000102 automatic fixed bin(71,0) initial dcl 43 in procedure "lm_signal_$deadlock" set ref 43* 89* 101* 119 give_up_time 110 000106 automatic fixed bin(71,0) level 2 in structure "local_txn_timeout_info" dcl 46 in procedure "lm_signal_$deadlock" set ref 119* header 000106 automatic structure level 2 in structure "local_txn_timeout_info" dcl 46 in procedure "lm_signal_$deadlock" header 000220 automatic structure level 2 in structure "local_txn_dlk_info" dcl 48 in procedure "lm_signal_$deadlock" info_string 3 000220 automatic varying char(256) level 3 dcl 48 set ref 95* 101* 122* ioa_$rsnnl 000016 constant entry external dcl 75 ref 101 local_txn_dlk_info 000220 automatic structure level 1 dcl 48 set ref 93* 112 112 116 local_txn_timeout_info 000106 automatic structure level 1 dcl 46 set ref 116* 120 120 null builtin function dcl 62 ref 112 112 120 120 122 122 p_ci_number parameter fixed bin(35,0) dcl 36 set ref 29 86 99 101 101* p_file_uid parameter bit(36) dcl 35 set ref 29 86 98 101* p_give_up_time parameter fixed bin(71,0) dcl 38 ref 86 89 p_requested_mode parameter fixed bin(17,0) dcl 37 ref 29 86 101 p_txn parameter bit(36) dcl 34 set ref 29 86 100 101 101 106* signal_ 000020 constant entry external dcl 76 ref 112 120 signal_type 000104 automatic fixed bin(17,0) dcl 44 set ref 83* 90* 101 108 114 status_code 104 000106 automatic fixed bin(35,0) level 3 in structure "local_txn_timeout_info" dcl 46 in procedure "lm_signal_$deadlock" set ref 118* status_code 104 000220 automatic fixed bin(35,0) level 3 in structure "local_txn_dlk_info" dcl 48 in procedure "lm_signal_$deadlock" set ref 111* sub_err_ 000022 constant entry external dcl 77 ref 122 support_signal 2(03) 000220 automatic bit(1) level 4 packed unaligned dcl 48 set ref 97* transaction_id 105 000220 automatic bit(36) level 2 dcl 48 set ref 100* transaction_manager_$rollback_txn 000024 constant entry external dcl 78 ref 106 txn_deadlock_info based structure level 1 dcl 3-18 txn_timeout_info based structure level 1 dcl 2-15 unspec builtin function dcl 62 set ref 93* version 1 000106 automatic fixed bin(17,0) level 3 in structure "local_txn_timeout_info" dcl 46 in procedure "lm_signal_$deadlock" set ref 117* version 1 000220 automatic fixed bin(17,0) level 3 in structure "local_txn_dlk_info" dcl 48 in procedure "lm_signal_$deadlock" set ref 110* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACTION_CAN_RESTART internal static bit(36) initial dcl 5-7 ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 5-7 ACTION_QUIET_RESTART internal static bit(36) initial dcl 5-7 ACTION_SUPPORT_SIGNAL internal static bit(36) initial dcl 5-7 LOCK_ENTIRE_FILE internal static fixed bin(27,0) initial dcl 4-23 LOCK_MODE_IS internal static fixed bin(17,0) initial dcl 4-19 LOCK_MODE_IX internal static fixed bin(17,0) initial dcl 4-20 LOCK_MODE_S internal static fixed bin(17,0) initial dcl 4-17 LOCK_MODE_SIX internal static fixed bin(17,0) initial dcl 4-21 LOCK_MODE_X internal static fixed bin(17,0) initial dcl 4-18 NO internal static bit(1) initial unaligned dcl 52 condition_info_header_ptr automatic pointer dcl 1-4 txn_deadlock_info_ptr automatic pointer dcl 3-17 txn_timeout_info_ptr automatic pointer dcl 2-14 NAMES DECLARED BY EXPLICIT CONTEXT. JOIN 000150 constant label dcl 93 set ref 84 91 lm_signal_$deadlock 000116 constant entry external dcl 29 lm_signal_$timeout 000134 constant entry external dcl 86 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 656 704 511 666 Length 1176 511 26 256 144 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME lm_signal_$deadlock 292 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME lm_signal_$deadlock 000100 code lm_signal_$deadlock 000102 give_up_time lm_signal_$deadlock 000104 signal_type lm_signal_$deadlock 000106 local_txn_timeout_info lm_signal_$deadlock 000220 local_txn_dlk_info lm_signal_$deadlock THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as r_ne_as call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. ioa_$rsnnl signal_ sub_err_ transaction_manager_$rollback_txn THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$lock_deadlock dm_error_$lock_timeout dm_error_$programming_error LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 43 000105 29 000111 83 000124 84 000126 86 000127 89 000142 90 000145 91 000147 93 000150 95 000153 96 000154 97 000156 98 000160 99 000163 100 000165 101 000167 106 000265 108 000302 110 000305 111 000307 112 000312 113 000335 114 000336 116 000340 117 000405 118 000407 119 000412 120 000414 121 000437 122 000440 125 000506 ----------------------------------------------------------- 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