COMPILATION LISTING OF SEGMENT tm_handle_conditions Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 01/03/85 1653.6 mst Thu Options: optimize list 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 /* format: style4,ifthenstmt,^indproc,^indcomtxt */ 7 /* --------------- */ 8 9 tm_handle_conditions: proc (); 10 11 /* DESCRIPTION: 12* Suspends the current transaction, resignals the condition, and resumes 13* the transaction. Called so that condition handlers execute with 14* transactions suspended. Any program that begiins and commits transactions 15* should say: 16* on any_other call transaction_manager_$handle_conditions (); 17**/ 18 19 /* HISTORY: 20* 21*Written by Steve Herbst, 01/10/83. 22*Modified: 23*01/11/83 by Steve Herbst: Made to suspend and resume. 24*01/25/83 by Steve Herbst: Changed to not check code from suspend before 25* resuming. 26*04/13/83 by Steve Herbst: Changed to call signal_ with the condition name. 27*05/18/83 by Lindsey L. Spratt: Fixed to call signal_ with a fixed char string 28* for the name, rather than the call by reference with 29* auto_cond_info.condition_name since signal_ takes a nonvarying 30* char name argument. Also, fixed the code variable to be 31* initialized to 0 (with an init in the dcl statement). 32*07/14/83 by Steve Herbst: Re-declared signal_ from options(variable) to 33* explicit args so that condition name will REALLY be passed as 34* a fixed-length string. 35*10/17/84 by Steve Herbst: Changed in response to audit comments. 36**/ 37 38 /* DECLARATIONS */ 39 40 /* Parameters */ 41 42 /* Constants */ 43 44 /* Based */ 45 46 /* Static */ 47 48 dcl recurse_sw bit (1) int static init ("0"b); /* prevents recursive invocation */ 49 50 /* Automatic */ 51 52 dcl 1 auto_condition_info aligned like condition_info; 53 dcl resume_sw bit (1); 54 dcl code fixed bin (35) init (0); 55 56 /* External */ 57 58 /* Entries */ 59 60 dcl continue_to_signal_ entry (fixed bin (35)); 61 dcl find_condition_info_ entry (ptr, ptr, fixed bin (35)); 62 dcl signal_ entry (char (*), ptr, ptr, ptr); 63 dcl transaction_manager_$resume_txn entry (fixed bin (35)); 64 dcl transaction_manager_$suspend_txn entry (fixed bin (35)); 65 66 /* Builtins */ 67 68 dcl (addr, null, unspec) builtin; 69 70 /* Conditions */ 71 72 dcl cleanup condition; 73 74 /* END OF DECLARATIONS */ 75 76 if recurse_sw then do; /* prevent recursive loop */ 77 call continue_to_signal_ (0); 78 return; 79 end; 80 81 resume_sw = "0"b; 82 on cleanup call CLEAN_UP; 83 84 recurse_sw = "1"b; 85 86 call transaction_manager_$suspend_txn (code); 87 resume_sw = (code = 0); /* don't resume if transaction was previously suspended */ 88 89 unspec (auto_condition_info) = "0"b; 90 auto_condition_info.version = condition_info_version_1; 91 92 call find_condition_info_ (null, addr (auto_condition_info), code); 93 if code = 0 94 then call signal_ ((auto_condition_info.condition_name), auto_condition_info.mc_ptr, 95 auto_condition_info.info_ptr, auto_condition_info.wc_ptr); 96 97 call CLEAN_UP; 98 99 return; 100 101 CLEAN_UP: proc; 102 103 recurse_sw = "0"b; 104 105 if resume_sw then call transaction_manager_$resume_txn (0); 106 107 end CLEAN_UP; 108 1 1 /* BEGIN INCLUDE FILE ... condition_info.incl.pl1 */ 1 2 1 3 /* Structure for find_condition_info_. 1 4* 1 5* Written 1-Mar-79 by M. N. Davidoff. 1 6**/ 1 7 1 8 /* automatic */ 1 9 1 10 declare condition_info_ptr pointer; 1 11 1 12 /* based */ 1 13 1 14 declare 1 condition_info aligned based (condition_info_ptr), 1 15 2 mc_ptr pointer, /* pointer to machine conditions at fault time */ 1 16 2 version fixed binary, /* Must be 1 */ 1 17 2 condition_name char (32) varying, /* name of condition */ 1 18 2 info_ptr pointer, /* pointer to the condition data structure */ 1 19 2 wc_ptr pointer, /* pointer to wall crossing machine conditions */ 1 20 2 loc_ptr pointer, /* pointer to location where condition occured */ 1 21 2 flags unaligned, 1 22 3 crawlout bit (1), /* on if condition occured in lower ring */ 1 23 3 pad1 bit (35), 1 24 2 pad2 bit (36), 1 25 2 user_loc_ptr pointer, /* ptr to most recent nonsupport loc before condition occurred */ 1 26 2 pad3 (4) bit (36); 1 27 1 28 /* internal static */ 1 29 1 30 declare condition_info_version_1 1 31 fixed binary internal static options (constant) initial (1); 1 32 1 33 /* END INCLUDE FILE ... condition_info.incl.pl1 */ 109 110 2 1 /* BEGIN INCLUDE FILE sub_error_info.incl.pl1 */ 2 2 /* format: style2 */ 2 3 2 4 /* The include file condition_info_header must be used with this file */ 2 5 2 6 declare sub_error_info_ptr pointer; 2 7 declare 1 sub_error_info aligned based (sub_error_info_ptr), 2 8 2 header aligned like condition_info_header, 2 9 2 retval fixed bin (35), /* return value */ 2 10 2 name char (32), /* module name */ 2 11 2 info_ptr ptr; 2 12 2 13 declare sub_error_info_version_1 2 14 internal static options (constant) fixed bin init (1); 2 15 2 16 /* END INCLUDE FILE sub_error_info.incl.pl1 */ 111 112 3 1 /* BEGIN INCLUDE FILE condition_info_header.incl.pl1 BIM 1981 */ 3 2 /* format: style2 */ 3 3 3 4 declare condition_info_header_ptr 3 5 pointer; 3 6 declare 1 condition_info_header 3 7 aligned based (condition_info_header_ptr), 3 8 2 length fixed bin, /* length in words of this structure */ 3 9 2 version fixed bin, /* version number of this structure */ 3 10 2 action_flags aligned, /* tell handler how to proceed */ 3 11 3 cant_restart bit (1) unaligned, /* caller doesn't ever want to be returned to */ 3 12 3 default_restart bit (1) unaligned, /* caller can be returned to with no further action */ 3 13 3 quiet_restart bit (1) unaligned, /* return, and print no message */ 3 14 3 support_signal bit (1) unaligned, /* treat this signal as if the signalling procedure had the support bit set */ 3 15 /* if the signalling procedure had the support bit set, do the same for its caller */ 3 16 3 pad bit (32) unaligned, 3 17 2 info_string char (256) varying, /* may contain printable message */ 3 18 2 status_code fixed bin (35); /* if^=0, code interpretable by com_err_ */ 3 19 3 20 /* END INCLUDE FILE condition_info_header.incl.pl1 */ 113 114 115 116 end tm_handle_conditions; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/03/85 1151.3 tm_handle_conditions.pl1 >spec>temp>famis1>tm_handle_conditions.pl1 109 1 06/28/79 1204.8 condition_info.incl.pl1 >ldd>include>condition_info.incl.pl1 111 2 07/18/81 1100.0 sub_error_info.incl.pl1 >ldd>include>sub_error_info.incl.pl1 113 3 03/24/82 1347.2 condition_info_header.incl.pl1 >ldd>include>condition_info_header.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. addr builtin function dcl 68 ref 92 92 auto_condition_info 000100 automatic structure level 1 dcl 52 set ref 89* 92 92 cleanup 000134 stack reference condition dcl 72 ref 82 code 000133 automatic fixed bin(35,0) initial dcl 54 set ref 54* 86* 87 92* 93 condition_info based structure level 1 dcl 1-14 condition_info_header based structure level 1 dcl 3-6 condition_info_version_1 constant fixed bin(17,0) initial dcl 1-30 ref 90 condition_name 3 000100 automatic varying char(32) level 2 dcl 52 set ref 93 continue_to_signal_ 000012 constant entry external dcl 60 ref 77 find_condition_info_ 000014 constant entry external dcl 61 ref 92 info_ptr 14 000100 automatic pointer level 2 dcl 52 set ref 93* mc_ptr 000100 automatic pointer level 2 dcl 52 set ref 93* null builtin function dcl 68 ref 92 92 recurse_sw 000010 internal static bit(1) initial unaligned dcl 48 set ref 76 84* 103* resume_sw 000132 automatic bit(1) unaligned dcl 53 set ref 81* 87* 105 signal_ 000016 constant entry external dcl 62 ref 93 transaction_manager_$resume_txn 000020 constant entry external dcl 63 ref 105 transaction_manager_$suspend_txn 000022 constant entry external dcl 64 ref 86 unspec builtin function dcl 68 set ref 89* version 2 000100 automatic fixed bin(17,0) level 2 dcl 52 set ref 90* wc_ptr 16 000100 automatic pointer level 2 dcl 52 set ref 93* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. condition_info_header_ptr automatic pointer dcl 3-4 condition_info_ptr automatic pointer dcl 1-10 sub_error_info based structure level 1 dcl 2-7 sub_error_info_ptr automatic pointer dcl 2-6 sub_error_info_version_1 internal static fixed bin(17,0) initial dcl 2-13 NAMES DECLARED BY EXPLICIT CONTEXT. CLEAN_UP 000156 constant entry internal dcl 101 ref 82 97 tm_handle_conditions 000007 constant entry external dcl 9 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 312 336 177 322 Length 570 177 24 216 113 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tm_handle_conditions 134 external procedure is an external procedure. on unit on line 82 64 on unit CLEAN_UP 70 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 recurse_sw tm_handle_conditions STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME tm_handle_conditions 000100 auto_condition_info tm_handle_conditions 000132 resume_sw tm_handle_conditions 000133 code tm_handle_conditions THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_cs call_ext_out_desc call_ext_out call_int_this call_int_other return enable shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. continue_to_signal_ find_condition_info_ signal_ transaction_manager_$resume_txn transaction_manager_$suspend_txn NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. CONSTANTS 000000 aa 464000000000 000001 aa 524000000000 000002 aa 077777000043 000003 aa 000001000000 000004 aa 143 154 145 141 clea 000005 aa 156 165 160 000 nup BEGIN PROCEDURE tm_handle_conditions ENTRY TO tm_handle_conditions STATEMENT 1 ON LINE 9 tm_handle_conditions: proc (); 000006 da 000073200000 000007 aa 000220 6270 00 eax7 144 000010 aa 7 00034 3521 20 epp2 pr7|28,* 000011 aa 2 01045 2721 00 tsp2 pr2|549 ext_entry 000012 aa 000000000000 000013 aa 000000000000 STATEMENT 1 ON LINE 54 000014 aa 6 00133 4501 00 stz pr6|91 code STATEMENT 1 ON LINE 76 if recurse_sw then do; 000015 ia 4 00010 2351 00 lda pr4|8 recurse_sw 000016 aa 000011 6000 04 tze 9,ic 000027 STATEMENT 1 ON LINE 77 call continue_to_signal_ (0); 000017 aa 6 00142 4501 00 stz pr6|98 000020 aa 6 00142 3521 00 epp2 pr6|98 000021 aa 6 00146 2521 00 spri2 pr6|102 000022 aa 6 00144 6211 00 eax1 pr6|100 000023 aa 004000 4310 07 fld 2048,dl 000024 la 4 00012 3521 20 epp2 pr4|10,* continue_to_signal_ 000025 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 78 return; 000026 aa 0 00631 7101 00 tra pr0|409 return STATEMENT 1 ON LINE 79 end; STATEMENT 1 ON LINE 81 resume_sw = "0"b; 000027 aa 6 00132 4501 00 stz pr6|90 resume_sw STATEMENT 1 ON LINE 82 on cleanup call CLEAN_UP; 000030 aa 000007 7260 07 lxl6 7,dl 000031 aa 777753 3520 04 epp2 -21,ic 000004 = 143154145141 000032 aa 0 00717 7001 00 tsx0 pr0|463 enable 000033 aa 000004 7100 04 tra 4,ic 000037 000034 aa 000134000000 000035 aa 000015 7100 04 tra 13,ic 000052 BEGIN CONDITION cleanup.1 ENTRY TO cleanup.1 STATEMENT 1 ON LINE 82 on cleanup call CLEAN_UP; 000036 da 000101200000 000037 aa 000100 6270 00 eax7 64 000040 aa 7 00034 3521 20 epp2 pr7|28,* 000041 aa 2 01047 2721 00 tsp2 pr2|551 int_entry 000042 aa 000000000000 000043 aa 000000000000 000044 aa 000001 7270 07 lxl7 1,dl 000045 aa 6 00056 6211 00 eax1 pr6|46 000046 aa 000000 4310 07 fld 0,dl 000047 aa 000107 3520 04 epp2 71,ic 000156 = 000120627000 000050 aa 0 00627 7001 00 tsx0 pr0|407 call_int_other 000051 aa 0 00631 7101 00 tra pr0|409 return END CONDITION cleanup.1 STATEMENT 1 ON LINE 84 recurse_sw = "1"b; 000052 aa 400000 2350 03 lda 131072,du 000053 aa 6 00044 3701 20 epp4 pr6|36,* 000054 ia 4 00010 7551 00 sta pr4|8 recurse_sw STATEMENT 1 ON LINE 86 call transaction_manager_$suspend_txn (code); 000055 aa 6 00133 3521 00 epp2 pr6|91 code 000056 aa 6 00146 2521 00 spri2 pr6|102 000057 aa 6 00144 6211 00 eax1 pr6|100 000060 aa 004000 4310 07 fld 2048,dl 000061 la 4 00022 3521 20 epp2 pr4|18,* transaction_manager_$suspend_txn 000062 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 87 resume_sw = (code = 0); 000063 aa 6 00133 2361 00 ldq pr6|91 code 000064 aa 0 00512 7001 00 tsx0 pr0|330 r_e_as 000065 aa 6 00132 7551 00 sta pr6|90 resume_sw STATEMENT 1 ON LINE 89 unspec (auto_condition_info) = "0"b; 000066 aa 000 100 100 400 mlr (),(pr),fill(000) 000067 aa 000000 00 0000 desc9a 0,0 000070 aa 6 00100 00 0150 desc9a pr6|64,104 STATEMENT 1 ON LINE 90 auto_condition_info.version = condition_info_version_1; 000071 aa 000001 2360 07 ldq 1,dl 000072 aa 6 00102 7561 00 stq pr6|66 auto_condition_info.version STATEMENT 1 ON LINE 92 call find_condition_info_ (null, addr (auto_condition_info), code); 000073 aa 777707 3734 24 epp7 -57,ic* 000074 aa 6 00150 6535 00 spri7 pr6|104 000075 aa 6 00100 3715 00 epp5 pr6|64 auto_condition_info 000076 aa 6 00152 6515 00 spri5 pr6|106 000077 aa 6 00150 3521 00 epp2 pr6|104 000100 aa 6 00156 2521 00 spri2 pr6|110 000101 aa 6 00152 3521 00 epp2 pr6|106 000102 aa 6 00160 2521 00 spri2 pr6|112 000103 aa 6 00133 3521 00 epp2 pr6|91 code 000104 aa 6 00162 2521 00 spri2 pr6|114 000105 aa 6 00154 6211 00 eax1 pr6|108 000106 aa 014000 4310 07 fld 6144,dl 000107 aa 6 00044 3701 20 epp4 pr6|36,* 000110 la 4 00014 3521 20 epp2 pr4|12,* find_condition_info_ 000111 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 93 if code = 0 then call signal_ ((auto_condition_info.condition_name), auto_condition_info.mc_ptr, auto_condition_info.info_ptr, auto_condition_info.wc_ptr); 000112 aa 6 00133 2361 00 ldq pr6|91 code 000113 aa 000034 6010 04 tnz 28,ic 000147 000114 aa 6 00103 2361 00 ldq pr6|67 auto_condition_info.condition_name 000115 aa 524000 2760 03 orq 174080,du 000116 aa 6 00142 7561 00 stq pr6|98 000117 aa 6 00103 2361 00 ldq pr6|67 auto_condition_info.condition_name 000120 aa 0 00551 7001 00 tsx0 pr0|361 alloc_cs 000121 aa 6 00166 2521 00 spri2 pr6|118 000122 aa 6 00103 7271 00 lxl7 pr6|67 auto_condition_info.condition_name 000123 aa 040 140 100 540 mlr (pr,rl),(pr,rl),fill(040) 000124 aa 6 00104 00 0017 desc9a pr6|68,x7 auto_condition_info.condition_name 000125 aa 2 00000 00 0006 desc9a pr2|0,ql 000126 aa 6 00100 3521 00 epp2 pr6|64 auto_condition_info.mc_ptr 000127 aa 6 00170 2521 00 spri2 pr6|120 000130 aa 6 00114 3521 00 epp2 pr6|76 auto_condition_info.info_ptr 000131 aa 6 00172 2521 00 spri2 pr6|122 000132 aa 6 00116 3521 00 epp2 pr6|78 auto_condition_info.wc_ptr 000133 aa 6 00174 2521 00 spri2 pr6|124 000134 aa 6 00142 3521 00 epp2 pr6|98 000135 aa 6 00176 2521 00 spri2 pr6|126 000136 aa 777642 3520 04 epp2 -94,ic 000000 = 464000000000 000137 aa 6 00200 2521 00 spri2 pr6|128 000140 aa 6 00202 2521 00 spri2 pr6|130 000141 aa 6 00204 2521 00 spri2 pr6|132 000142 aa 6 00164 6211 00 eax1 pr6|116 000143 aa 020000 4310 07 fld 8192,dl 000144 aa 6 00044 3701 20 epp4 pr6|36,* 000145 la 4 00016 3521 20 epp2 pr4|14,* signal_ 000146 aa 0 00622 7001 00 tsx0 pr0|402 call_ext_out_desc STATEMENT 1 ON LINE 97 call CLEAN_UP; 000147 aa 0 01014 7001 00 tsx0 pr0|524 shorten_stack 000150 aa 6 00056 6211 00 eax1 pr6|46 000151 aa 000000 4310 07 fld 0,dl 000152 aa 000004 3520 04 epp2 4,ic 000156 = 000120627000 000153 aa 0 00625 7001 00 tsx0 pr0|405 call_int_this STATEMENT 1 ON LINE 99 return; 000154 aa 0 00631 7101 00 tra pr0|409 return STATEMENT 1 ON LINE 116 end tm_handle_conditions; BEGIN PROCEDURE CLEAN_UP ENTRY TO CLEAN_UP STATEMENT 1 ON LINE 101 CLEAN_UP: proc; 000155 da 000107200000 000156 aa 000120 6270 00 eax7 80 000157 aa 7 00034 3521 20 epp2 pr7|28,* 000160 aa 2 01047 2721 00 tsp2 pr2|551 int_entry 000161 aa 000000000000 000162 aa 000000000000 STATEMENT 1 ON LINE 103 recurse_sw = "0"b; 000163 ia 4 00010 4501 00 stz pr4|8 recurse_sw STATEMENT 1 ON LINE 105 if resume_sw then call transaction_manager_$resume_txn (0); 000164 aa 6 00040 3735 20 epp7 pr6|32,* 000165 aa 7 00132 2351 00 lda pr7|90 resume_sw 000166 aa 000010 6000 04 tze 8,ic 000176 000167 aa 6 00100 4501 00 stz pr6|64 000170 aa 6 00100 3521 00 epp2 pr6|64 000171 aa 6 00104 2521 00 spri2 pr6|68 000172 aa 6 00102 6211 00 eax1 pr6|66 000173 aa 004000 4310 07 fld 2048,dl 000174 la 4 00020 3521 20 epp2 pr4|16,* transaction_manager_$resume_txn 000175 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 107 end CLEAN_UP; 000176 aa 0 00631 7101 00 tra pr0|409 return END PROCEDURE CLEAN_UP END PROCEDURE tm_handle_conditions ----------------------------------------------------------- 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