COMPILATION LISTING OF SEGMENT tm_get_state_info 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.5 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_get_state_info: proc (A_state, A_op_name, A_op_error_code); 10 11 12 /* DESCRIPTION: 13* 14* Given the state of a transaction left in error or part-way through a TM 15* operation, returns the name of the interrupted operation and the appropriate 16* error code dm_error_$unfinished_(abort commit rollback). 17**/ 18 19 /* HISTORY: 20* 21*Written by Steve Herbst, 01/18/83. 22*Modified: 23*08/23/84 by Steve Herbst: Changed to use OP_NAME... constants. 24*10/17/84 by Steve Herbst: Changed in response to audit comments. 25**/ 26 27 /* DECLARATIONS */ 28 29 /* Parameters */ 30 31 dcl A_state fixed bin parameter; 32 dcl A_op_name char (*) parameter; 33 dcl A_op_error_code fixed (35) parameter; 34 35 36 /* Constants */ 37 38 /* Based */ 39 40 /* Static */ 41 42 /* Automatic */ 43 44 dcl state fixed bin; 45 46 /* External */ 47 48 dcl dm_error_$unfinished_abort fixed bin (35) ext; 49 dcl dm_error_$unfinished_commit fixed bin (35) ext; 50 dcl dm_error_$unfinished_rollback fixed bin (35) ext; 51 52 /* Entries */ 53 54 /* Builtins */ 55 56 /* Conditions */ 57 58 /* END OF DECLARATIONS */ 59 60 if A_state > TM_ERROR_INCREMENT then /* an error state */ 61 state = A_state - TM_ERROR_INCREMENT; /* look instead at the corresponding pre-call state */ 62 else state = A_state; 63 64 if state >= LOWEST_ABORT_STATE & state <= HIGHEST_ABORT_STATE then do; 65 A_op_name = OP_NAME_ABORT; 66 A_op_error_code = dm_error_$unfinished_abort; 67 end; 68 else if state >= LOWEST_COMMIT_STATE & state <= HIGHEST_COMMIT_STATE then do; 69 A_op_name = OP_NAME_COMMIT; 70 A_op_error_code = dm_error_$unfinished_commit; 71 end; 72 else if state >= LOWEST_ROLLBACK_STATE & state <= HIGHEST_ROLLBACK_STATE then do; 73 A_op_name = OP_NAME_ROLLBACK; 74 A_op_error_code = dm_error_$unfinished_rollback; 75 end; 76 else do; 77 A_op_name = ""; 78 A_op_error_code = 0; 79 end; 80 81 return; 82 1 1 /* START OF: dm_tm_states.incl.pl1 */ 1 2 1 3 /* HISTORY: 1 4* 1 5*Designed by Matthew Pierret, 01/26/82. 1 6*Coded by Steve Herbst, 08/05/82. 1 7*Modified: 1 8*09/20/82 by Steve Herbst: States renames for distinct operations. 1 9*10/05/82 by Steve Herbst: Added TM_ABORT_POST_COMMIT_STATE. 1 10*01/14/83 by Steve Herbst: Added TM_ERROR_INCREMENT. 1 11*01/18/83 by Steve Herbst: Added HIGHEST_ABORT_STATE, etc. 1 12*08/23/84 by Steve Herbst: Added OP_NAME... constants. 1 13**/ 1 14 1 15 1 16 /* NOTE: Changing this file necessitates changes tm_cleanup */ 1 17 1 18 dcl (HIGHEST_STATE init (96), 1 19 LOWEST_ABORT_STATE init (21), 1 20 HIGHEST_ABORT_STATE init (30), 1 21 LOWEST_COMMIT_STATE init (31), 1 22 HIGHEST_COMMIT_STATE init (40), 1 23 LOWEST_ROLLBACK_STATE init (41), 1 24 HIGHEST_ROLLBACK_STATE init (50)) fixed bin int static options (constant); 1 25 1 26 dcl TM_ERROR_INCREMENT fixed bin int static options (constant) init (50); 1 27 /* error state = corresponding pre-call state + 50 */ 1 28 1 29 1 30 dcl ( TM_IN_PROGRESS_STATE init (1), 1 31 1 32 TM_BEGIN_STARTING_STATE init (11), 1 33 1 34 TM_ABORT_FLUSHING_TXN_STATE init (21), 1 35 TM_ABORT_FLUSHING_TXN_ERROR init (71), 1 36 TM_ABORT_ROLLING_BACK_STATE init (22), 1 37 TM_ABORT_ROLLING_BACK_ERROR init (72), 1 38 TM_ABORT_FLUSHING_CI_STATE init (23), 1 39 TM_ABORT_FLUSHING_CI_ERROR init (73), 1 40 TM_ABORT_WRITING_MARK_STATE init (24), 1 41 TM_ABORT_WRITING_MARK_ERROR init (74), 1 42 TM_ABORT_UNLOCKING_STATE init (25), 1 43 TM_ABORT_UNLOCKING_ERROR init (75), 1 44 TM_ABORT_METERING_STATE init (26), 1 45 TM_ABORT_METERING_ERROR init (76), 1 46 1 47 TM_COMMIT_FLUSHING_TXN_STATE init (31), 1 48 TM_COMMIT_FLUSHING_TXN_ERROR init (81), 1 49 TM_COMMIT_FLUSHING_CI_STATE init (32), 1 50 TM_COMMIT_FLUSHING_CI_ERROR init (82), 1 51 TM_COMMIT_WRITING_MARK_STATE init (33), 1 52 TM_COMMIT_WRITING_MARK_ERROR init (83), 1 53 TM_COMMIT_POST_COMMIT_STATE init (34), 1 54 TM_COMMIT_POST_COMMIT_ERROR init (84), 1 55 TM_COMMIT_UNLOCKING_STATE init (35), 1 56 TM_COMMIT_UNLOCKING_ERROR init (85), 1 57 TM_COMMIT_METERING_STATE init (36), 1 58 TM_COMMIT_METERING_ERROR init (86), 1 59 1 60 TM_ROLLBACK_FLUSHING_TXN_STATE init (41), 1 61 TM_ROLLBACK_FLUSHING_TXN_ERROR init (91), 1 62 TM_ROLLBACK_ROLLING_BACK_STATE init (42), 1 63 TM_ROLLBACK_ROLLING_BACK_ERROR init (92), 1 64 TM_ROLLBACK_FLUSHING_CI_STATE init (43), 1 65 TM_ROLLBACK_FLUSHING_CI_ERROR init (93), 1 66 TM_ROLLBACK_WRITING_MARK_STATE init (44), 1 67 TM_ROLLBACK_WRITING_MARK_ERROR init (94), 1 68 TM_ROLLBACK_UNLOCKING_STATE init (45), 1 69 TM_ROLLBACK_UNLOCKING_ERROR init (95), 1 70 TM_ROLLBACK_METERING_STATE init (46), 1 71 TM_ROLLBACK_METERING_ERROR init (96)) 1 72 1 73 fixed bin int static options (constant); 1 74 1 75 dcl (OP_NAME_ABORT init ("abort"), 1 76 OP_NAME_COMMIT init ("commit"), 1 77 OP_NAME_ROLLBACK init ("rollback")) char (32) int static options (constant); 1 78 1 79 /* END OF: dm_tm_states.incl.pl1 */ 83 84 85 86 end tm_get_state_info; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/03/85 1151.3 tm_get_state_info.pl1 >spec>temp>famis1>tm_get_state_info.pl1 83 1 01/03/85 1004.9 dm_tm_states.incl.pl1 >spec>temp>famis1>dm_tm_states.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. A_op_error_code parameter fixed bin(35,0) dcl 33 set ref 9 66* 70* 74* 78* A_op_name parameter char unaligned dcl 32 set ref 9 65* 69* 73* 77* A_state parameter fixed bin(17,0) dcl 31 ref 9 60 60 62 HIGHEST_ABORT_STATE constant fixed bin(17,0) initial dcl 1-18 ref 64 HIGHEST_COMMIT_STATE constant fixed bin(17,0) initial dcl 1-18 ref 68 HIGHEST_ROLLBACK_STATE constant fixed bin(17,0) initial dcl 1-18 ref 72 LOWEST_ABORT_STATE constant fixed bin(17,0) initial dcl 1-18 ref 64 LOWEST_COMMIT_STATE constant fixed bin(17,0) initial dcl 1-18 ref 68 LOWEST_ROLLBACK_STATE constant fixed bin(17,0) initial dcl 1-18 ref 72 OP_NAME_ABORT 000020 constant char(32) initial unaligned dcl 1-75 ref 65 OP_NAME_COMMIT 000010 constant char(32) initial unaligned dcl 1-75 ref 69 OP_NAME_ROLLBACK 000000 constant char(32) initial unaligned dcl 1-75 ref 73 TM_ERROR_INCREMENT constant fixed bin(17,0) initial dcl 1-26 ref 60 60 dm_error_$unfinished_abort 000010 external static fixed bin(35,0) dcl 48 ref 66 dm_error_$unfinished_commit 000012 external static fixed bin(35,0) dcl 49 ref 70 dm_error_$unfinished_rollback 000014 external static fixed bin(35,0) dcl 50 ref 74 state 000100 automatic fixed bin(17,0) dcl 44 set ref 60* 62* 64 64 68 68 72 72 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. HIGHEST_STATE internal static fixed bin(17,0) initial dcl 1-18 TM_ABORT_FLUSHING_CI_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_FLUSHING_CI_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_FLUSHING_TXN_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_FLUSHING_TXN_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_METERING_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_METERING_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_ROLLING_BACK_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_ROLLING_BACK_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_UNLOCKING_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_UNLOCKING_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_WRITING_MARK_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ABORT_WRITING_MARK_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_BEGIN_STARTING_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_FLUSHING_CI_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_FLUSHING_CI_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_FLUSHING_TXN_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_FLUSHING_TXN_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_METERING_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_METERING_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_POST_COMMIT_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_POST_COMMIT_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_UNLOCKING_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_UNLOCKING_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_WRITING_MARK_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_COMMIT_WRITING_MARK_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_IN_PROGRESS_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_FLUSHING_CI_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_FLUSHING_CI_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_FLUSHING_TXN_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_FLUSHING_TXN_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_METERING_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_METERING_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_ROLLING_BACK_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_ROLLING_BACK_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_UNLOCKING_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_UNLOCKING_STATE internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_WRITING_MARK_ERROR internal static fixed bin(17,0) initial dcl 1-30 TM_ROLLBACK_WRITING_MARK_STATE internal static fixed bin(17,0) initial dcl 1-30 NAME DECLARED BY EXPLICIT CONTEXT. tm_get_state_info 000037 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 216 234 135 226 Length 424 135 16 154 61 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tm_get_state_info 66 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME tm_get_state_info 000100 state tm_get_state_info THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return ext_entry_desc NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_error_$unfinished_abort dm_error_$unfinished_commit dm_error_$unfinished_rollback CONSTANTS 000000 aa 162 157 154 154 roll 000001 aa 142 141 143 153 back 000002 aa 040 040 040 040 000003 aa 040 040 040 040 000004 aa 040 040 040 040 000005 aa 040 040 040 040 000006 aa 040 040 040 040 000007 aa 040 040 040 040 000010 aa 143 157 155 155 comm 000011 aa 151 164 040 040 it 000012 aa 040 040 040 040 000013 aa 040 040 040 040 000014 aa 040 040 040 040 000015 aa 040 040 040 040 000016 aa 040 040 040 040 000017 aa 040 040 040 040 000020 aa 141 142 157 162 abor 000021 aa 164 040 040 040 t 000022 aa 040 040 040 040 000023 aa 040 040 040 040 000024 aa 040 040 040 040 000025 aa 040 040 040 040 000026 aa 040 040 040 040 000027 aa 040 040 040 040 000030 aa 404000000043 000031 aa 526077777777 000032 aa 404000000021 BEGIN PROCEDURE tm_get_state_info ENTRY TO tm_get_state_info STATEMENT 1 ON LINE 9 tm_get_state_info: proc (A_state, A_op_name, A_op_error_code); 000033 at 000003000032 000034 tt 000031000030 000035 ta 000033000000 000036 da 000055300000 000037 aa 000120 6270 00 eax7 80 000040 aa 7 00034 3521 20 epp2 pr7|28,* 000041 aa 2 01046 2721 00 tsp2 pr2|550 ext_entry_desc 000042 aa 000006000000 000043 aa 000000000000 000044 aa 6 00042 3735 20 epp7 pr6|34,* 000045 aa 7 00002 2361 20 ldq pr7|2,* 000046 aa 000002 6040 04 tmi 2,ic 000050 000047 aa 777777 3760 07 anq 262143,dl 000050 aa 0 00250 3761 00 anq pr0|168 = 000077777777 000051 aa 6 00101 7561 00 stq pr6|65 STATEMENT 1 ON LINE 60 if A_state > TM_ERROR_INCREMENT then /* an error state */ state = A_state - TM_ERROR_INCREMENT; 000052 aa 6 00032 3715 20 epp5 pr6|26,* 000053 aa 5 00002 2361 20 ldq pr5|2,* A_state 000054 aa 000062 1160 07 cmpq 50,dl 000055 aa 000004 6044 04 tmoz 4,ic 000061 000056 aa 000062 1760 07 sbq 50,dl 000057 aa 6 00100 7561 00 stq pr6|64 state 000060 aa 000002 7100 04 tra 2,ic 000062 STATEMENT 1 ON LINE 62 else state = A_state; 000061 aa 6 00100 7561 00 stq pr6|64 state STATEMENT 1 ON LINE 64 if state >= LOWEST_ABORT_STATE & state <= HIGHEST_ABORT_STATE then do; 000062 aa 000025 1160 07 cmpq 21,dl 000063 aa 000013 6040 04 tmi 11,ic 000076 000064 aa 000036 1160 07 cmpq 30,dl 000065 aa 000011 6054 04 tpnz 9,ic 000076 STATEMENT 1 ON LINE 65 A_op_name = OP_NAME_ABORT; 000066 aa 5 00004 3535 20 epp3 pr5|4,* 000067 aa 6 00101 2351 00 lda pr6|65 000070 aa 040 140 100 404 mlr (ic),(pr,rl),fill(040) 000071 aa 777730 00 0040 desc9a -40,32 000020 = 141142157162 000072 aa 3 00000 00 0005 desc9a pr3|0,al A_op_name STATEMENT 1 ON LINE 66 A_op_error_code = dm_error_$unfinished_abort; 000073 la 4 00010 2361 20 ldq pr4|8,* dm_error_$unfinished_abort 000074 aa 5 00006 7561 20 stq pr5|6,* A_op_error_code STATEMENT 1 ON LINE 67 end; 000075 aa 000037 7100 04 tra 31,ic 000134 STATEMENT 1 ON LINE 68 else if state >= LOWEST_COMMIT_STATE & state <= HIGHEST_COMMIT_STATE then do; 000076 aa 000037 1160 07 cmpq 31,dl 000077 aa 000013 6040 04 tmi 11,ic 000112 000100 aa 000050 1160 07 cmpq 40,dl 000101 aa 000011 6054 04 tpnz 9,ic 000112 STATEMENT 1 ON LINE 69 A_op_name = OP_NAME_COMMIT; 000102 aa 5 00004 3535 20 epp3 pr5|4,* 000103 aa 6 00101 2351 00 lda pr6|65 000104 aa 040 140 100 404 mlr (ic),(pr,rl),fill(040) 000105 aa 777704 00 0040 desc9a -60,32 000010 = 143157155155 000106 aa 3 00000 00 0005 desc9a pr3|0,al A_op_name STATEMENT 1 ON LINE 70 A_op_error_code = dm_error_$unfinished_commit; 000107 la 4 00012 2361 20 ldq pr4|10,* dm_error_$unfinished_commit 000110 aa 5 00006 7561 20 stq pr5|6,* A_op_error_code STATEMENT 1 ON LINE 71 end; 000111 aa 000023 7100 04 tra 19,ic 000134 STATEMENT 1 ON LINE 72 else if state >= LOWEST_ROLLBACK_STATE & state <= HIGHEST_ROLLBACK_STATE then do; 000112 aa 000051 1160 07 cmpq 41,dl 000113 aa 000013 6040 04 tmi 11,ic 000126 000114 aa 000062 1160 07 cmpq 50,dl 000115 aa 000011 6054 04 tpnz 9,ic 000126 STATEMENT 1 ON LINE 73 A_op_name = OP_NAME_ROLLBACK; 000116 aa 5 00004 3535 20 epp3 pr5|4,* 000117 aa 6 00101 2351 00 lda pr6|65 000120 aa 040 140 100 404 mlr (ic),(pr,rl),fill(040) 000121 aa 777660 00 0040 desc9a -80,32 000000 = 162157154154 000122 aa 3 00000 00 0005 desc9a pr3|0,al A_op_name STATEMENT 1 ON LINE 74 A_op_error_code = dm_error_$unfinished_rollback; 000123 la 4 00014 2361 20 ldq pr4|12,* dm_error_$unfinished_rollback 000124 aa 5 00006 7561 20 stq pr5|6,* A_op_error_code STATEMENT 1 ON LINE 75 end; 000125 aa 000007 7100 04 tra 7,ic 000134 STATEMENT 1 ON LINE 76 else do; STATEMENT 1 ON LINE 77 A_op_name = ""; 000126 aa 5 00004 3535 20 epp3 pr5|4,* 000127 aa 6 00101 2351 00 lda pr6|65 000130 aa 040 140 100 400 mlr (),(pr,rl),fill(040) 000131 aa 000000 00 0000 desc9a 0,0 000132 aa 3 00000 00 0005 desc9a pr3|0,al A_op_name STATEMENT 1 ON LINE 78 A_op_error_code = 0; 000133 aa 5 00006 4501 20 stz pr5|6,* A_op_error_code STATEMENT 1 ON LINE 79 end; STATEMENT 1 ON LINE 81 return; 000134 aa 0 00631 7101 00 tra pr0|409 return STATEMENT 1 ON LINE 86 end tm_get_state_info; END PROCEDURE tm_get_state_info ----------------------------------------------------------- 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