COMPILATION LISTING OF SEGMENT tm_recover_after_crash 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.3 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 /* format: style4,ifthenstmt,^indproc,^indcomtxt */ 7 /*---------------*/ 8 9 tm_recover_after_crash: proc (A_temp_tdt_ptr, A_bj_txt_ptr, A_code); 10 11 /* DESCRIPTION: 12* 13* Called at system start-up time, this procedure aborts any unfinished 14* transactions left over from the last bootload. Given by the caller 15* (intended to be dm_recovery_) a structure containing transaction info for 16* the left-over transactions, it rebuilds the TDT and calls tm_abort for 17* each transaction. 18* 19* Note: It is only for convenience that we use the tm_tdt and bj_txt 20* structures since these structures contain all the currently needed 21* fields. This convention may be changed in the future. 22**/ 23 24 /* HISTORY: 25* 26*Written by Steve Herbst, 10/12/82. 27*Modified: 28*10/27/82 by Steve Herbst: Added A_temp_tdt_ptr arg. & changed to copy from 29* recovery TDT instead of TXT structure. 30*11/05/82 by Steve Herbst: Added A_code parameter. 31*11/09/82 by Steve Herbst: Changed to turn on tm_tdt.no_begin teporarily, log 32* errors and clear TDT when done. 33*11/18/82 by Steve Herbst: Added call to clear_txn_tables entry in 34* before_journal_manager_. 35*11/06/82 by Steve Herbst: Changed to use state in recovery TDT. 36*11/17/82 by L. A. Newcomb: Put A_code in the parameter list and fixed 37* before_journal_manager_ calls to pass a code. Much 38* general fixing up. 39*03/14/83 by L. A. Newcomb: Call dm_log_ instead of dmsd_logger_. 40*03/15/83 by L. A. Newcomb: To not destroy tm_tdt.entry_count value. 41*03/27/83 by L. A. Newcomb: To report how many txns recovered. 42*03/29/83 by L. A. Newcomb: To report how many txns are to be recovered. 43*04/29/83 by L. A. Newcomb: Expanded log msg of # of txns to recover to 44* include the journal the txns were found in. 45*05/01/83 by L. A. Newcomb: Added clearing of the tm_tdt state and txn_id 46* components so dm_who doesn't think the entries are in use. 47*06/08/83 by Steve Herbst: Renamed tm_adjust to 48* tm_daemon_adjust$tm_adjust_tdt_entry (bug fix) 49*10/17/84 by Steve Herbst: Changed in response to audit comments. 50*03/05/85 by Steve Herbst: Replaced dm_log_ with dm_misc_util_$log. 51**/ 52 53 /* DECLARATIONS */ 54 55 /* Parameters */ 56 57 dcl (A_temp_tdt_ptr, A_bj_txt_ptr) ptr parameter; 58 dcl A_code fixed bin (35) parameter; 59 60 /* Constants */ 61 62 dcl ME char (32) int static options (constant) init ("tm_recover_after_crash"); 63 64 /* Based */ 65 66 /* Static */ 67 68 /* Automatic */ 69 70 dcl bj_dir char (168); 71 dcl bj_name char (32); 72 dcl temp_tdt_ptr ptr; 73 dcl (new_tdt_count, txn_index) fixed bin; 74 dcl (code, sentinel_code) fixed bin (35); 75 76 /* External */ 77 78 dcl dm_data_$current_txn_id bit (36) aligned ext; 79 dcl dm_data_$current_txn_index fixed bin ext; 80 dcl dm_data_$my_tdt_index fixed bin ext; 81 dcl dm_data_$tm_tdt_ptr ptr ext; 82 dcl dm_system_data_$max_n_transactions fixed bin ext; 83 dcl error_table_$action_not_performed fixed bin (35) ext; 84 dcl error_table_$unimplemented_version fixed bin (35) ext; 85 86 /* Entries */ 87 88 dcl before_journal_manager_$clear_txn_tables entry (fixed bin (35)); 89 dcl before_journal_manager_$get_bj_path_from_uid entry (bit (36) aligned, char (*), char (*), fixed bin (35)); 90 dcl before_journal_manager_$rebuild_after_crash entry (ptr, fixed bin (35)); 91 dcl dm_misc_util_$log entry options (variable); 92 dcl tm_daemon_adjust$tm_adjust_tdt_entry entry (bit (36) aligned, fixed bin, fixed bin (35)); 93 94 /* Builtins */ 95 96 dcl clock builtin; 97 98 /* Conditions */ 99 100 /* END OF DECLARATIONS */ 101 102 /* Copy input parameters to local and initialize output error code */ 103 104 temp_tdt_ptr = A_temp_tdt_ptr; /* recovery tm_ data */ 105 bj_txt_ptr = A_bj_txt_ptr; /* recovery bjm_ data */ 106 tm_tdt_ptr = dm_data_$tm_tdt_ptr; /* current bootload tm_ TDT data */ 107 A_code = 0; /* error_code */ 108 109 /* Verify version of the recovery tm_tdt passed to us. */ 110 111 if temp_tdt_ptr -> tm_tdt.version ^= TM_TDT_VERSION_3 then do; 112 A_code = error_table_$unimplemented_version; 113 call dm_misc_util_$log (ERROR_SV, A_code, ME, "Version ^a expected, version ^a supplied.", 114 temp_tdt_ptr -> tm_tdt.version, TM_TDT_VERSION_3); 115 return; 116 end; 117 118 tm_tdt.no_begins = "1"b; /* prevent new transactions from beginning meanwhile */ 119 120 /* Get the before journal path for error msgs, and pray we don't need it */ 121 122 call before_journal_manager_$get_bj_path_from_uid (bj_txt.bj_uid (1), bj_dir, bj_name, code); 123 if code ^= 0 then do; 124 call dm_misc_util_$log (ERROR_SV, code, ME, "Cannot get pathname of before journal to recover."); 125 A_code = code; 126 return; 127 end; 128 129 /* How many txns are to be recovered? */ 130 131 call dm_misc_util_$log (LOG_SV, 0, ME, "^d txns to recover in ^a>^a.", 132 temp_tdt_ptr -> tm_tdt.entry_count, bj_dir, bj_name); 133 134 /* Rebuild TDT containing the transactions passed in recovery TDT structure */ 135 /* Note the temp TDT contains the real number of txns to be recovered. */ 136 137 new_tdt_count = 0; 138 139 do txn_index = 1 to temp_tdt_ptr -> tm_tdt.entry_count; 140 141 if temp_tdt_ptr -> tm_tdt.process_id (txn_index) ^= "0"b then do; /* slot in use */ 142 new_tdt_count = new_tdt_count + 1; 143 if new_tdt_count > tm_tdt.entry_count then do; /* this is unlikely */ 144 call dm_misc_util_$log (ERROR_SV, 0, ME, "TDT too small to hold previous transactions to recover."); 145 return; 146 end; 147 tm_tdt.entry (new_tdt_count) = temp_tdt_ptr -> tm_tdt.entry (txn_index); 148 tm_tdt.entry (new_tdt_count).date_time_created = clock (); 149 tm_tdt.entry (new_tdt_count).mode = TM_NORMAL_MODE; 150 end; 151 end; 152 153 /* Zero unused entries in new TDT */ 154 155 do txn_index = (new_tdt_count + 1) to tm_tdt.entry_count; 156 tm_tdt.entry (txn_index).process_id = ""b; /* the field that counts */ 157 end; 158 159 /* Let before_journal_manager_ rebuild its transaction table(s) also */ 160 161 call before_journal_manager_$rebuild_after_crash (bj_txt_ptr, code); 162 if code ^= 0 then do; 163 call dm_misc_util_$log (ERROR_SV, code, ME, "Cannot rebuild before journal manager tables."); 164 return; 165 end; 166 167 /* Adjust all the transactions */ 168 /* Adopts and abandons are explicit so as to log any failure */ 169 170 sentinel_code = 0; 171 172 do txn_index = 1 to tm_tdt.entry_count; 173 174 dm_data_$current_txn_id = tm_tdt.txn_id (txn_index); 175 dm_data_$current_txn_index, dm_data_$my_tdt_index = txn_index; 176 177 call tm_daemon_adjust$tm_adjust_tdt_entry (tm_tdt.txn_id (txn_index), txn_index, code); 178 if code ^= 0 then do; 179 sentinel_code = code; 180 call dm_misc_util_$log (ERROR_SV, code, ME, 181 "Unable to adjust transaction ^o, before journal uid ^a>^a.", 182 tm_tdt.entry (txn_index).txn_id, bj_dir, bj_name); 183 end; 184 end; 185 186 187 /* Log errors and clear TDT */ 188 189 if sentinel_code ^= 0 then do; /* report recovery error */ 190 A_code = error_table_$action_not_performed; 191 call dm_misc_util_$log (ERROR_SV, sentinel_code, ME, "Recovery errors. Before journal ^a>^a", bj_dir, bj_name); 192 end; 193 else call dm_misc_util_$log (LOG_SV, 0, ME, "No errors recovering before journal ^a>^a", bj_dir, bj_name); 194 195 /* DONE: must free the TDT and TXT entries */ 196 tm_tdt.process_id, /* free all process_id and txn_id */ 197 tm_tdt.transaction.txn_id = "0"b; /* entries so dm_who doesn't see anything */ 198 tm_tdt.transaction.state = 0; /* dm_who also looks at this */ 199 200 call before_journal_manager_$clear_txn_tables (0); 201 202 dm_data_$current_txn_id = "0"b; 203 dm_data_$current_txn_index, dm_data_$my_tdt_index = 0; 204 205 tm_tdt.no_begins = "0"b; 206 207 return; 208 1 1 /* BEGIN INCLUDE FILE: dm_bj_txt.incl.pl1 */ 1 2 /* 1 3*dm_bj_txt - before journal per-system transaction table. 1 4* 1 5*Designed by A. Bensoussan 1 6*Written by M. Pandolf 06/02/82 1 7*Modified: 1 8*10/01/82 by Lee A. Newcomb: To use dm_system_data_ for dimension attributes 1 9* and specify alignment on level one. 1 10*08feb83 by M. Pandolf: To restructure the TXT and TXTE. 1 11*30mar83 by M. Pandolf: To add last_completed_operation and ok_to_write. 1 12**/ 1 13 /* format: style4,indattr,idind33,^indcomtxt */ 1 14 1 15 dcl BJ_TXT_VERSION_1 fixed bin int static options (constant) init (1); 1 16 1 17 dcl bj_txt_ptr ptr; /* pointer to transaction table */ 1 18 dcl bj_txte_ptr ptr; /* pointer to transaction table element */ 1 19 1 20 dcl 1 bj_txt aligned based (bj_txt_ptr), /* transaction table */ 1 21 2 version fixed bin, /* should be BJ_TXT_VERSION_1 */ 1 22 2 max_n_entries fixed bin, 1 23 2 n_entries_used fixed bin, /* assumed contiguous */ 1 24 2 pad_header_to_32_words bit (36) dim (29), /* to mod32 align bj_txt.entry */ 1 25 2 entry dim (dm_system_data_$max_n_transactions refer (bj_txt.max_n_entries)) 1 26 like bj_txte; 1 27 1 28 dcl 1 bj_txte based (bj_txte_ptr) aligned, /* single entry, must be mod32 word aligned */ 1 29 2 tid bit (36), /* transaction id if this or last txn */ 1 30 2 bj_uid bit (36), /* UID of before journal chosen at begin mark */ 1 31 2 entry_state aligned, 1 32 3 last_completed_operation char (4), /* to prevent multiple abort and commit */ 1 33 3 ok_to_write bit (1), /* basically validates using this entry */ 1 34 2 owner_info aligned, /* info about creation of txte */ 1 35 3 process_id bit (36), /* of process that wrote begin mark */ 1 36 2 operator_info aligned, /* of process that is currently using this txte */ 1 37 3 process_id bit (36), /* of process that shall write subsequent marks */ 1 38 3 ppte_ptr ptr, /* pointer to PPTE for this transaction */ 1 39 3 bj_oid bit (36), /* before journal opening ID for operator */ 1 40 2 records_info aligned, /* grouped to be saved and restored as one unit */ 1 41 3 curr_checkpoint_rec_id bit (36), /* ident of checkpoint record if doing a rollback, */ 1 42 /* else, this value must be zero. */ 1 43 3 first_bj_rec_id bit (36), /* ident of first mark for this transaction */ 1 44 3 last_bj_rec_id bit (36), /* ident of current mark for this transaction */ 1 45 3 n_rec_written fixed bin (35), /* count of marks written for this transaction */ 1 46 3 n_bytes_written fixed bin (35), /* count of total bytes written to journal */ 1 47 3 last_fm_postcommit_handler_rec_id 1 48 bit (36), /* ident of last special handler in list */ 1 49 2 append_state aligned, /* the first two members define the state of this */ 1 50 3 current_operation char (4), /* transaction and its interaction with bj_storage: */ 1 51 3 pending_bj_rec_id bit (36), /* operation rec_id state */ 1 52 /* *null* XXX quiesed */ 1 53 /* ^null "0"b write pending */ 1 54 /* ^null ^"0"b write completed, needs flushing */ 1 55 /* */ 1 56 3 pending_n_rec_written fixed bin (35), /* copy to n_rec_written before flush */ 1 57 3 pending_n_bytes_written fixed bin (35), /* copy to n_bytes_written before flush */ 1 58 2 pad_entry_to_32_words bit (36) dim (13); /* make any part of table 32 words long */ 1 59 1 60 /* END INCLUDE FILE: dm_bj_txt_ptr */ 209 210 2 1 /* START OF: dm_tm_tdt.incl.pl1 */ 2 2 2 3 /* Transaction Definition Table for transaction_manager_ */ 2 4 /* This structure is used to reference the TDT. The process_id field for the 2 5* i'th TDT entry, for example, is usually referenced as tm_tdt.process_id (i). 2 6* A TDT entry is in use by a process when its process_id field is nonzero. 2 7* An entry is reserved by using the stacq builtin to set process_id, if and 2 8* only if it is already zero. The entry is being used for a transaction when 2 9* tm_tdt.txn_id (i) is nonzero. The possible values of tm_tdt.state (i) are 2 10* listed in dm_tm_states.incl.pl1. If state = 0, no operation has been 2 11* performed yet on the transaction. */ 2 12 2 13 2 14 /* HISTORY: 2 15*Designed by Matt Pierret, 01/26/82. 2 16*Coded by Steve Herbst, 07/27/82. 2 17*Modified: 2 18*08/05/82 by Steve Herbst: Added tm_tdt.operation and padded last_uid to full word. 2 19*08/05/82 by Steve Herbst: Changed creator_process_id to bit (36). 2 20*08/16/82 by Steve Herbst: Added contents of dm_tm_tdt_entry.incl.pl1. 2 21*09/09/82 by Steve Herbst: Removed in_use flag from TDT entry and rearranged fields. 2 22*09/20/82 by Steve Herbst: Removed tm_tdt.operation. 2 23*11/01/82 by Steve Herbst: Added event_channel and error_sw to tm_tdt_entry. 2 24*11/05/82 by Steve Herbst: Added suspended_sw and error_code to tm_tdt_entry. 2 25*11/11/82 by Steve Herbst: Deleted tm_tdt_entry.alloc_complete. 2 26*11/23/82 by Steve Herbst: Compacted, changed some numbers to unsigned. 2 27*12/14/82 by Steve Herbst: Added tm_tdt_entry.daemon_error_sw. 2 28*01/11/83 by Steve Herbst: Added owner_name, abandoned_sw & kill_sw to tm_tdt_entry. 2 29*01/24/83 by Steve Herbst: Replaced daemon_error_sw with daemon_adjust_count. 2 30*01/25/83 by Steve Herbst: Moved abandoned_sw from transaction portion to entry header portion. 2 31*05/13/83 by Steve Herbst: Version 3, changed all fixed bin (18) unal uns numbers to fixed bin (17) unaligned. 2 32*05/26/83 by Steve Herbst: Added rollback_count and checkpoint_id. 2 33**/ 2 34 2 35 dcl tm_tdt_ptr ptr; 2 36 dcl tdt_max_count fixed bin; 2 37 2 38 dcl TM_TDT_VERSION_3 char (8) int static options (constant) init ("TM-TDT 3"); 2 39 2 40 2 41 dcl 1 tm_tdt aligned based (tm_tdt_ptr), 2 42 2 version char (8), /* = "TM-TDT 3" */ 2 43 2 lock fixed bin (71), /* (currently not used) */ 2 44 2 last_uid bit (27) aligned, /* last transaction uid assigned */ 2 45 2 flags, 2 46 3 no_begins bit (1) unaligned, /* ON => only priv process can begin transaction */ 2 47 3 mbz1 bit (35) unaligned, 2 48 2 entry_count fixed bin, /* number of slots allocated */ 2 49 2 mbz2 fixed bin, /* for even word boundary */ 2 50 2 entry (tdt_max_count refer (tm_tdt.entry_count)) 2 51 like tm_tdt_entry; 2 52 2 53 2 54 2 55 /* TDT entries: */ 2 56 2 57 dcl tm_tdt_entry_ptr ptr; 2 58 2 59 dcl 1 tm_tdt_entry aligned based (tm_tdt_entry_ptr), 2 60 2 event_channel fixed bin (71), /* for communication with the process */ 2 61 2 process_id bit (36) aligned, /* process for which this entry is reserved */ 2 62 2 owner_name char (32), /* person.project of owner process */ 2 63 2 entry_flags, 2 64 3 abandoned_sw bit (1) unaligned, /* ON => owner has called tm_$abandon on this entry */ 2 65 3 mbz3 bit (35) unaligned, 2 66 2 transaction unaligned, 2 67 3 txn_id bit (36) aligned, /* unique identifier assigned at begin time */ 2 68 3 date_time_created fixed bin (71) aligned, 2 69 3 mode fixed bin (17) unaligned, /* mode specified with transaction begin */ 2 70 3 state fixed bin (17) unaligned, /* state transaction is currently in */ 2 71 3 error_code fixed bin (35) aligned, /* goes along with error_sw and error state */ 2 72 3 checkpoint_id fixed bin (17) unaligned, /* identifier of the current rollback checkpoint */ 2 73 3 rollback_count fixed bin (17) unaligned, /* number of times bjm_$rollback has been called */ 2 74 3 daemon_adjust_count fixed bin (17) unaligned, /* number of times daemon has tried to adjust since user */ 2 75 3 return_idx fixed bin (17) unaligned, /* parent transaction, or zero */ 2 76 3 flags, 2 77 4 dead_process_sw bit (1) unaligned, /* ON => treat process as dead even if it isn't yet */ 2 78 4 suspended_sw bit (1) unaligned, /* ON => suspended by tm_$suspend_txn */ 2 79 4 error_sw bit (1) unaligned, /* ON => state is one of the error states */ 2 80 4 kill_sw bit (1) unaligned, /* ON => being processed by tm_$kill */ 2 81 4 mbz4 bit (29) unaligned, 2 82 3 post_commit_flags, 2 83 4 (fmgr, 2 84 bjmgr, 2 85 ajmgr) bit (1) unaligned, 2 86 3 mbz4 fixed bin; 2 87 2 88 2 89 /* END OF: dm_tm_tdt.incl.pl1 */ 211 212 3 1 /* START OF: dm_tm_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 3 2 3 3 /* HISTORY: 3 4* 3 5*Designed by Matthew C. Pierret, 01/26/82. 3 6*Coded by Jeffrey D. Ives, 04/30/82. 3 7*Modified: 3 8*10/18/82 by Steve Herbst: Names changed. 3 9*01/19/83 by Steve Herbst: Added (LOWEST HIGHEST)_MODE. 3 10**/ 3 11 3 12 dcl (LOWEST_MODE init (1), 3 13 HIGHEST_MODE init (8)) fixed bin int static options (constant); 3 14 3 15 dcl TM_NORMAL_MODE fixed bin static options (constant) init (1); 3 16 dcl TM_STATISTICAL_MODE fixed bin static options (constant) init (2); 3 17 dcl TM_READ_ONLY_MODE fixed bin static options (constant) init (3); 3 18 dcl TM_NEVER_WRITE_MODE fixed bin static options (constant) init (4); 3 19 dcl TM_TEST_NORMAL_MODE fixed bin static options (constant) init (5); 3 20 dcl TM_TEST_STATISTICAL_MODE fixed bin static options (constant) init (6); 3 21 dcl TM_TEST_READ_ONLY_MODE fixed bin static options (constant) init (7); 3 22 dcl TM_TEST_NEVER_WRITE_MODE fixed bin static options (constant) init (8); 3 23 3 24 /* END OF: dm_tm_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 213 214 4 1 /* START OF: dm_tm_states.incl.pl1 */ 4 2 4 3 /* HISTORY: 4 4* 4 5*Designed by Matthew Pierret, 01/26/82. 4 6*Coded by Steve Herbst, 08/05/82. 4 7*Modified: 4 8*09/20/82 by Steve Herbst: States renames for distinct operations. 4 9*10/05/82 by Steve Herbst: Added TM_ABORT_POST_COMMIT_STATE. 4 10*01/14/83 by Steve Herbst: Added TM_ERROR_INCREMENT. 4 11*01/18/83 by Steve Herbst: Added HIGHEST_ABORT_STATE, etc. 4 12*08/23/84 by Steve Herbst: Added OP_NAME... constants. 4 13**/ 4 14 4 15 4 16 /* NOTE: Changing this file necessitates changes tm_cleanup */ 4 17 4 18 dcl (HIGHEST_STATE init (96), 4 19 LOWEST_ABORT_STATE init (21), 4 20 HIGHEST_ABORT_STATE init (30), 4 21 LOWEST_COMMIT_STATE init (31), 4 22 HIGHEST_COMMIT_STATE init (40), 4 23 LOWEST_ROLLBACK_STATE init (41), 4 24 HIGHEST_ROLLBACK_STATE init (50)) fixed bin int static options (constant); 4 25 4 26 dcl TM_ERROR_INCREMENT fixed bin int static options (constant) init (50); 4 27 /* error state = corresponding pre-call state + 50 */ 4 28 4 29 4 30 dcl ( TM_IN_PROGRESS_STATE init (1), 4 31 4 32 TM_BEGIN_STARTING_STATE init (11), 4 33 4 34 TM_ABORT_FLUSHING_TXN_STATE init (21), 4 35 TM_ABORT_FLUSHING_TXN_ERROR init (71), 4 36 TM_ABORT_ROLLING_BACK_STATE init (22), 4 37 TM_ABORT_ROLLING_BACK_ERROR init (72), 4 38 TM_ABORT_FLUSHING_CI_STATE init (23), 4 39 TM_ABORT_FLUSHING_CI_ERROR init (73), 4 40 TM_ABORT_WRITING_MARK_STATE init (24), 4 41 TM_ABORT_WRITING_MARK_ERROR init (74), 4 42 TM_ABORT_UNLOCKING_STATE init (25), 4 43 TM_ABORT_UNLOCKING_ERROR init (75), 4 44 TM_ABORT_METERING_STATE init (26), 4 45 TM_ABORT_METERING_ERROR init (76), 4 46 4 47 TM_COMMIT_FLUSHING_TXN_STATE init (31), 4 48 TM_COMMIT_FLUSHING_TXN_ERROR init (81), 4 49 TM_COMMIT_FLUSHING_CI_STATE init (32), 4 50 TM_COMMIT_FLUSHING_CI_ERROR init (82), 4 51 TM_COMMIT_WRITING_MARK_STATE init (33), 4 52 TM_COMMIT_WRITING_MARK_ERROR init (83), 4 53 TM_COMMIT_POST_COMMIT_STATE init (34), 4 54 TM_COMMIT_POST_COMMIT_ERROR init (84), 4 55 TM_COMMIT_UNLOCKING_STATE init (35), 4 56 TM_COMMIT_UNLOCKING_ERROR init (85), 4 57 TM_COMMIT_METERING_STATE init (36), 4 58 TM_COMMIT_METERING_ERROR init (86), 4 59 4 60 TM_ROLLBACK_FLUSHING_TXN_STATE init (41), 4 61 TM_ROLLBACK_FLUSHING_TXN_ERROR init (91), 4 62 TM_ROLLBACK_ROLLING_BACK_STATE init (42), 4 63 TM_ROLLBACK_ROLLING_BACK_ERROR init (92), 4 64 TM_ROLLBACK_FLUSHING_CI_STATE init (43), 4 65 TM_ROLLBACK_FLUSHING_CI_ERROR init (93), 4 66 TM_ROLLBACK_WRITING_MARK_STATE init (44), 4 67 TM_ROLLBACK_WRITING_MARK_ERROR init (94), 4 68 TM_ROLLBACK_UNLOCKING_STATE init (45), 4 69 TM_ROLLBACK_UNLOCKING_ERROR init (95), 4 70 TM_ROLLBACK_METERING_STATE init (46), 4 71 TM_ROLLBACK_METERING_ERROR init (96)) 4 72 4 73 fixed bin int static options (constant); 4 74 4 75 dcl (OP_NAME_ABORT init ("abort"), 4 76 OP_NAME_COMMIT init ("commit"), 4 77 OP_NAME_ROLLBACK init ("rollback")) char (32) int static options (constant); 4 78 4 79 /* END OF: dm_tm_states.incl.pl1 */ 215 216 5 1 /* BEGIN INCLUDE FILE dm_log_sv_codes.incl.pl1 */ 5 2 5 3 /* format: ^indcom */ 5 4 5 5 /* DESCRIPTION: 5 6* These are the severity codes used by the dms daemon when calling its logger. 5 7* The severity is ranked thusly: 5 8* 5 9* severity log write situation 5 10* -------- --- ----- --------- 5 11* 0 no yes standard output, query, etc. 5 12* 1 yes yes fatal error, terminate dms daemon. 5 13* 2 yes yes nonfatal error. 5 14* 3 yes yes informative message. 5 15* 4 yes no log information only. 5 16**/ 5 17 5 18 /* HISTORY: 5 19* 5 20*Written by M. Pandolf, 10/06/82. 5 21*Modified: 5 22*12/10/84 by R. Michael Tague: Rename and reformat description/history. 5 23*01/13/85 by Lee A. Newcomb: Renamed to dm_log_sv_codes from 5 24* dm_daemon_sv_codes as the severity codes for the DM log are not 5 25* restrained to the DM Daemon's use. 5 26*01/24/85 by Lee A. Newcomb: Fixed to say dm_log_sv_codes.incl.pl1 in the 5 27* BEGIN and END INCLUDE comments, instead of dm_daemon_sv_codes.==. 5 28**/ 5 29 5 30 /* format: style5 */ 5 31 5 32 dcl (PRINT_SV, QUERY_SV) fixed bin internal static 5 33 options (constant) init (0); 5 34 dcl (CRASH_SV, FATAL_SV) fixed bin internal static 5 35 options (constant) init (1); 5 36 dcl ERROR_SV fixed bin internal static 5 37 options (constant) init (2); 5 38 dcl INFORM_SV fixed bin internal static 5 39 options (constant) init (3); 5 40 dcl LOG_SV fixed bin internal static 5 41 options (constant) init (4); 5 42 5 43 /* END INCLUDE FILE dm_log_sv_codes.incl.pl1 */ 217 218 219 220 end tm_recover_after_crash; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0827.2 tm_recover_after_crash.pl1 >spec>on>7192.pbf-04/04/85>tm_recover_after_crash.pl1 209 1 01/07/85 0858.0 dm_bj_txt.incl.pl1 >ldd>include>dm_bj_txt.incl.pl1 211 2 01/07/85 0900.1 dm_tm_tdt.incl.pl1 >ldd>include>dm_tm_tdt.incl.pl1 213 3 01/07/85 0900.0 dm_tm_modes.incl.pl1 >ldd>include>dm_tm_modes.incl.pl1 215 4 01/07/85 0900.1 dm_tm_states.incl.pl1 >ldd>include>dm_tm_states.incl.pl1 217 5 03/06/85 1031.1 dm_log_sv_codes.incl.pl1 >ldd>include>dm_log_sv_codes.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_bj_txt_ptr parameter pointer dcl 57 ref 9 105 A_code parameter fixed bin(35,0) dcl 58 set ref 9 107* 112* 113* 125* 190* A_temp_tdt_ptr parameter pointer dcl 57 ref 9 104 ERROR_SV 000033 constant fixed bin(17,0) initial dcl 5-36 set ref 113* 124* 144* 163* 180* 191* LOG_SV 000000 constant fixed bin(17,0) initial dcl 5-40 set ref 131* 193* ME 000004 constant char(32) initial unaligned dcl 62 set ref 113* 124* 131* 144* 163* 180* 191* 193* TM_NORMAL_MODE constant fixed bin(17,0) initial dcl 3-15 ref 149 TM_TDT_VERSION_3 000002 constant char(8) initial unaligned dcl 2-38 set ref 111 113* before_journal_manager_$clear_txn_tables 000024 constant entry external dcl 88 ref 200 before_journal_manager_$get_bj_path_from_uid 000026 constant entry external dcl 89 ref 122 before_journal_manager_$rebuild_after_crash 000030 constant entry external dcl 90 ref 161 bj_dir 000100 automatic char(168) unaligned dcl 70 set ref 122* 131* 180* 191* 193* bj_name 000152 automatic char(32) unaligned dcl 71 set ref 122* 131* 180* 191* 193* bj_txt based structure level 1 dcl 1-20 bj_txt_ptr 000170 automatic pointer dcl 1-17 set ref 105* 122 161* bj_txte based structure level 1 dcl 1-28 bj_uid 41 based bit(36) array level 3 dcl 1-20 set ref 122* clock builtin function dcl 96 ref 148 code 000166 automatic fixed bin(35,0) dcl 74 set ref 122* 123 124* 125 161* 162 163* 177* 178 179 180* date_time_created 26 based fixed bin(71,0) array level 4 dcl 2-41 set ref 148* dm_data_$current_txn_id 000010 external static bit(36) dcl 78 set ref 174* 202* dm_data_$current_txn_index 000012 external static fixed bin(17,0) dcl 79 set ref 175* 203* dm_data_$my_tdt_index 000014 external static fixed bin(17,0) dcl 80 set ref 175* 203* dm_data_$tm_tdt_ptr 000016 external static pointer dcl 81 ref 106 dm_misc_util_$log 000032 constant entry external dcl 91 ref 113 124 131 144 163 180 191 193 entry 10 based structure array level 2 in structure "tm_tdt" dcl 2-41 in procedure "tm_recover_after_crash" set ref 147* 147 entry 40 based structure array level 2 in structure "bj_txt" dcl 1-20 in procedure "tm_recover_after_crash" entry_count 6 based fixed bin(17,0) level 2 dcl 2-41 set ref 131* 139 143 155 172 196 196 198 error_table_$action_not_performed 000020 external static fixed bin(35,0) dcl 83 ref 190 error_table_$unimplemented_version 000022 external static fixed bin(35,0) dcl 84 ref 112 flags 5 based structure level 2 dcl 2-41 mode 30 based fixed bin(17,0) array level 4 packed unaligned dcl 2-41 set ref 149* new_tdt_count 000164 automatic fixed bin(17,0) dcl 73 set ref 137* 142* 142 143 147 148 149 155 no_begins 5 based bit(1) level 3 packed unaligned dcl 2-41 set ref 118* 205* process_id 12 based bit(36) array level 3 dcl 2-41 set ref 141 156* 196* sentinel_code 000167 automatic fixed bin(35,0) dcl 74 set ref 170* 179* 189 191* state 30(18) based fixed bin(17,0) array level 4 packed unaligned dcl 2-41 set ref 198* temp_tdt_ptr 000162 automatic pointer dcl 72 set ref 104* 111 113 131 139 141 147 tm_daemon_adjust$tm_adjust_tdt_entry 000034 constant entry external dcl 92 ref 177 tm_tdt based structure level 1 dcl 2-41 tm_tdt_entry based structure level 1 dcl 2-59 tm_tdt_ptr 000172 automatic pointer dcl 2-35 set ref 106* 118 143 147 148 149 155 156 172 174 177 180 196 196 198 205 transaction 24 based structure array level 3 unaligned dcl 2-41 txn_id 24 based bit(36) array level 4 dcl 2-41 set ref 174 177* 180* 196* txn_index 000165 automatic fixed bin(17,0) dcl 73 set ref 139* 141 147* 155* 156* 172* 174 175 177 177* 180* version based char(8) level 2 dcl 2-41 set ref 111 113* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. BJ_TXT_VERSION_1 internal static fixed bin(17,0) initial dcl 1-15 CRASH_SV internal static fixed bin(17,0) initial dcl 5-34 FATAL_SV internal static fixed bin(17,0) initial dcl 5-34 HIGHEST_ABORT_STATE internal static fixed bin(17,0) initial dcl 4-18 HIGHEST_COMMIT_STATE internal static fixed bin(17,0) initial dcl 4-18 HIGHEST_MODE internal static fixed bin(17,0) initial dcl 3-12 HIGHEST_ROLLBACK_STATE internal static fixed bin(17,0) initial dcl 4-18 HIGHEST_STATE internal static fixed bin(17,0) initial dcl 4-18 INFORM_SV internal static fixed bin(17,0) initial dcl 5-38 LOWEST_ABORT_STATE internal static fixed bin(17,0) initial dcl 4-18 LOWEST_COMMIT_STATE internal static fixed bin(17,0) initial dcl 4-18 LOWEST_MODE internal static fixed bin(17,0) initial dcl 3-12 LOWEST_ROLLBACK_STATE internal static fixed bin(17,0) initial dcl 4-18 OP_NAME_ABORT internal static char(32) initial unaligned dcl 4-75 OP_NAME_COMMIT internal static char(32) initial unaligned dcl 4-75 OP_NAME_ROLLBACK internal static char(32) initial unaligned dcl 4-75 PRINT_SV internal static fixed bin(17,0) initial dcl 5-32 QUERY_SV internal static fixed bin(17,0) initial dcl 5-32 TM_ABORT_FLUSHING_CI_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_FLUSHING_CI_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_FLUSHING_TXN_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_FLUSHING_TXN_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_METERING_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_METERING_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_ROLLING_BACK_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_ROLLING_BACK_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_UNLOCKING_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_UNLOCKING_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_WRITING_MARK_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ABORT_WRITING_MARK_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_BEGIN_STARTING_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_FLUSHING_CI_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_FLUSHING_CI_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_FLUSHING_TXN_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_FLUSHING_TXN_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_METERING_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_METERING_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_POST_COMMIT_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_POST_COMMIT_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_UNLOCKING_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_UNLOCKING_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_WRITING_MARK_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_COMMIT_WRITING_MARK_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ERROR_INCREMENT internal static fixed bin(17,0) initial dcl 4-26 TM_IN_PROGRESS_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_NEVER_WRITE_MODE internal static fixed bin(17,0) initial dcl 3-18 TM_READ_ONLY_MODE internal static fixed bin(17,0) initial dcl 3-17 TM_ROLLBACK_FLUSHING_CI_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_FLUSHING_CI_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_FLUSHING_TXN_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_FLUSHING_TXN_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_METERING_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_METERING_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_ROLLING_BACK_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_ROLLING_BACK_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_UNLOCKING_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_UNLOCKING_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_WRITING_MARK_ERROR internal static fixed bin(17,0) initial dcl 4-30 TM_ROLLBACK_WRITING_MARK_STATE internal static fixed bin(17,0) initial dcl 4-30 TM_STATISTICAL_MODE internal static fixed bin(17,0) initial dcl 3-16 TM_TEST_NEVER_WRITE_MODE internal static fixed bin(17,0) initial dcl 3-22 TM_TEST_NORMAL_MODE internal static fixed bin(17,0) initial dcl 3-19 TM_TEST_READ_ONLY_MODE internal static fixed bin(17,0) initial dcl 3-21 TM_TEST_STATISTICAL_MODE internal static fixed bin(17,0) initial dcl 3-20 bj_txte_ptr automatic pointer dcl 1-18 dm_system_data_$max_n_transactions external static fixed bin(17,0) dcl 82 tdt_max_count automatic fixed bin(17,0) dcl 2-36 tm_tdt_entry_ptr automatic pointer dcl 2-57 NAME DECLARED BY EXPLICIT CONTEXT. tm_recover_after_crash 000176 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 1276 1334 1075 1306 Length 1632 1075 36 262 200 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tm_recover_after_crash 215 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME tm_recover_after_crash 000100 bj_dir tm_recover_after_crash 000152 bj_name tm_recover_after_crash 000162 temp_tdt_ptr tm_recover_after_crash 000164 new_tdt_count tm_recover_after_crash 000165 txn_index tm_recover_after_crash 000166 code tm_recover_after_crash 000167 sentinel_code tm_recover_after_crash 000170 bj_txt_ptr tm_recover_after_crash 000172 tm_tdt_ptr tm_recover_after_crash THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry clock THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. before_journal_manager_$clear_txn_tables before_journal_manager_$get_bj_path_from_uid before_journal_manager_$rebuild_after_crash dm_misc_util_$log tm_daemon_adjust$tm_adjust_tdt_entry THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. dm_data_$current_txn_id dm_data_$current_txn_index dm_data_$my_tdt_index dm_data_$tm_tdt_ptr error_table_$action_not_performed error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000172 104 000203 105 000207 106 000212 107 000215 111 000216 112 000222 113 000224 115 000263 118 000264 122 000267 123 000316 124 000320 125 000350 126 000353 131 000354 137 000420 139 000421 141 000431 142 000436 143 000437 144 000443 145 000474 147 000475 148 000504 149 000507 151 000512 155 000514 156 000525 157 000530 161 000532 162 000543 163 000545 164 000575 170 000576 172 000577 174 000607 175 000614 177 000620 178 000632 179 000634 180 000635 184 000705 189 000707 190 000711 191 000715 192 000753 193 000754 196 001014 198 001040 200 001054 202 001064 203 001066 205 001070 207 001073 ----------------------------------------------------------- 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