1 /* START OF: dm_tm_tdt.incl.pl1 */ 2 3 /* Transaction Definition Table for transaction_manager_ */ 4 /* This structure is used to reference the TDT. The process_id field for the 5 i'th TDT entry, for example, is usually referenced as tm_tdt.process_id (i). 6 A TDT entry is in use by a process when its process_id field is nonzero. 7 An entry is reserved by using the stacq builtin to set process_id, if and 8 only if it is already zero. The entry is being used for a transaction when 9 tm_tdt.txn_id (i) is nonzero. The possible values of tm_tdt.state (i) are 10 listed in dm_tm_states.incl.pl1. If state = 0, no operation has been 11 performed yet on the transaction. */ 12 13 14 /* HISTORY: 15 Designed by Matt Pierret, 01/26/82. 16 Coded by Steve Herbst, 07/27/82. 17 Modified: 18 08/05/82 by Steve Herbst: Added tm_tdt.operation and padded last_uid to full word. 19 08/05/82 by Steve Herbst: Changed creator_process_id to bit (36). 20 08/16/82 by Steve Herbst: Added contents of dm_tm_tdt_entry.incl.pl1. 21 09/09/82 by Steve Herbst: Removed in_use flag from TDT entry and rearranged fields. 22 09/20/82 by Steve Herbst: Removed tm_tdt.operation. 23 11/01/82 by Steve Herbst: Added event_channel and error_sw to tm_tdt_entry. 24 11/05/82 by Steve Herbst: Added suspended_sw and error_code to tm_tdt_entry. 25 11/11/82 by Steve Herbst: Deleted tm_tdt_entry.alloc_complete. 26 11/23/82 by Steve Herbst: Compacted, changed some numbers to unsigned. 27 12/14/82 by Steve Herbst: Added tm_tdt_entry.daemon_error_sw. 28 01/11/83 by Steve Herbst: Added owner_name, abandoned_sw & kill_sw to tm_tdt_entry. 29 01/24/83 by Steve Herbst: Replaced daemon_error_sw with daemon_adjust_count. 30 01/25/83 by Steve Herbst: Moved abandoned_sw from transaction portion to entry header portion. 31 05/13/83 by Steve Herbst: Version 3, changed all fixed bin (18) unal uns numbers to fixed bin (17) unaligned. 32 05/26/83 by Steve Herbst: Added rollback_count and checkpoint_id. 33 */ 34 35 dcl tm_tdt_ptr ptr; 36 dcl tdt_max_count fixed bin; 37 38 dcl TM_TDT_VERSION_3 char (8) int static options (constant) init ("TM-TDT 3"); 39 40 41 dcl 1 tm_tdt aligned based (tm_tdt_ptr), 42 2 version char (8), /* = "TM-TDT 3" */ 43 2 lock fixed bin (71), /* (currently not used) */ 44 2 last_uid bit (27) aligned, /* last transaction uid assigned */ 45 2 flags, 46 3 no_begins bit (1) unaligned, /* ON => only priv process can begin transaction */ 47 3 mbz1 bit (35) unaligned, 48 2 entry_count fixed bin, /* number of slots allocated */ 49 2 mbz2 fixed bin, /* for even word boundary */ 50 2 entry (tdt_max_count refer (tm_tdt.entry_count)) 51 like tm_tdt_entry; 52 53 54 55 /* TDT entries: */ 56 57 dcl tm_tdt_entry_ptr ptr; 58 59 dcl 1 tm_tdt_entry aligned based (tm_tdt_entry_ptr), 60 2 event_channel fixed bin (71), /* for communication with the process */ 61 2 process_id bit (36) aligned, /* process for which this entry is reserved */ 62 2 owner_name char (32), /* person.project of owner process */ 63 2 entry_flags, 64 3 abandoned_sw bit (1) unaligned, /* ON => owner has called tm_$abandon on this entry */ 65 3 mbz3 bit (35) unaligned, 66 2 transaction unaligned, 67 3 txn_id bit (36) aligned, /* unique identifier assigned at begin time */ 68 3 date_time_created fixed bin (71) aligned, 69 3 mode fixed bin (17) unaligned, /* mode specified with transaction begin */ 70 3 state fixed bin (17) unaligned, /* state transaction is currently in */ 71 3 error_code fixed bin (35) aligned, /* goes along with error_sw and error state */ 72 3 checkpoint_id fixed bin (17) unaligned, /* identifier of the current rollback checkpoint */ 73 3 rollback_count fixed bin (17) unaligned, /* number of times bjm_$rollback has been called */ 74 3 daemon_adjust_count fixed bin (17) unaligned, /* number of times daemon has tried to adjust since user */ 75 3 return_idx fixed bin (17) unaligned, /* parent transaction, or zero */ 76 3 flags, 77 4 dead_process_sw bit (1) unaligned, /* ON => treat process as dead even if it isn't yet */ 78 4 suspended_sw bit (1) unaligned, /* ON => suspended by tm_$suspend_txn */ 79 4 error_sw bit (1) unaligned, /* ON => state is one of the error states */ 80 4 kill_sw bit (1) unaligned, /* ON => being processed by tm_$kill */ 81 4 mbz4 bit (29) unaligned, 82 3 post_commit_flags, 83 4 (fmgr, 84 bjmgr, 85 ajmgr) bit (1) unaligned, 86 3 mbz4 fixed bin; 87 88 89 /* END OF: dm_tm_tdt.incl.pl1 */