1 /* BEGIN INCLUDE FILE:        dm_bj_txt.incl.pl1  */
 2 /*
 3 dm_bj_txt - before journal per-system transaction table.
 4 
 5 Designed by A. Bensoussan
 6 Written  by M. Pandolf 06/02/82
 7 Modified:
 8 10/01/82 by Lee A. Newcomb:  To use dm_system_data_ for dimension attributes
 9             and specify alignment on level one.
10 08feb83  by M. Pandolf:      To restructure the TXT and TXTE.
11 30mar83  by M. Pandolf:      To add last_completed_operation and ok_to_write.
12 */
13 /* format: style4,indattr,idind33,^indcomtxt */
14 
15 dcl  BJ_TXT_VERSION_1                 fixed bin int static options (constant) init (1);
16 
17 dcl  bj_txt_ptr                       ptr;                  /* pointer to transaction table */
18 dcl  bj_txte_ptr                      ptr;                  /* pointer to transaction table element */
19 
20 dcl  1 bj_txt                         aligned based (bj_txt_ptr), /* transaction table */
21        2 version                      fixed bin,            /* should be BJ_TXT_VERSION_1 */
22        2 max_n_entries                fixed bin,
23        2 n_entries_used               fixed bin,            /* assumed contiguous */
24        2 pad_header_to_32_words       bit (36) dim (29),    /* to mod32 align bj_txt.entry */
25        2 entry                        dim (dm_system_data_$max_n_transactions refer (bj_txt.max_n_entries))
26                                       like bj_txte;
27 
28 dcl  1 bj_txte                        based (bj_txte_ptr) aligned, /* single entry, must be mod32 word aligned */
29        2 tid                          bit (36),             /* transaction id if this or last txn */
30        2 bj_uid                       bit (36),             /* UID of before journal chosen at begin mark */
31        2 entry_state aligned,
32          3 last_completed_operation   char (4),             /* to prevent multiple abort and commit */
33          3 ok_to_write                bit (1),              /* basically validates using this entry */
34        2 owner_info aligned,                                /* info about creation of txte */
35          3 process_id                 bit (36),             /* of process that wrote begin mark */
36        2 operator_info aligned,                             /* of process that is currently using this txte */
37          3 process_id                 bit (36),             /* of process that shall write subsequent marks */
38          3 ppte_ptr                   ptr,                  /* pointer to PPTE for this transaction */
39          3 bj_oid                     bit (36),             /* before journal opening ID for operator */
40        2 records_info aligned,                              /* grouped to be saved and restored as one unit */
41          3 curr_checkpoint_rec_id     bit (36),             /* ident of checkpoint record if doing a rollback, */
42                                                             /* else, this value must be zero. */
43          3 first_bj_rec_id            bit (36),             /* ident of first mark for this transaction */
44          3 last_bj_rec_id             bit (36),             /* ident of current mark for this transaction */
45          3 n_rec_written              fixed bin (35),       /* count of marks written for this transaction */
46          3 n_bytes_written            fixed bin (35),       /* count of total bytes written to journal */
47          3 last_fm_postcommit_handler_rec_id
48                                       bit (36),             /* ident of last special handler in list */
49        2 append_state aligned,                              /* the first two members define the state of this */
50          3 current_operation          char (4),             /* transaction and its interaction with bj_storage: */
51          3 pending_bj_rec_id          bit (36),             /* operation  rec_id  state */
52                                                             /*   *null*    XXX    quiesed */
53                                                             /*   ^null     "0"b   write pending */
54                                                             /*   ^null     ^"0"b  write completed, needs flushing */
55                                                             /* */
56          3 pending_n_rec_written      fixed bin (35),       /* copy to n_rec_written before flush */
57          3 pending_n_bytes_written    fixed bin (35),       /* copy to n_bytes_written before flush */
58        2 pad_entry_to_32_words        bit (36) dim (13);    /* make any part of table 32 words long */
59 
60 /* END INCLUDE FILE:          dm_bj_txt_ptr       */