COMPILATION LISTING OF SEGMENT bjm_adopt_transaction Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/04/85 0939.5 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* format: style4,indattr,ifthenstmt,ifthen,^indcomtxt,idind33 */ 8 9 bjm_adopt_transaction: 10 procedure (p_tid, p_tix, p_code); 11 12 /* DESCRIPTION 13* 14* bjm_adopt_transaction - procedure to allow a process other than the 15* one that started a transaction to complete the transaction. from the 16* point of before journal manager, adoption means the changing of some 17* TXTE information for a transaction. this change is local to before 18* journal manager and there are no implicit effects to any other subsystem. 19**/ 20 21 /* HISTORY: 22*Written by M. Pandolf, 09/01/82. 23*Modified: 24*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 25* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 26*06/07/84 by Lee Baldwin: Fixed to call dm_error_$no_current_transaction 27* instead of dm_error_$bj_no_txn. 28*03/19/85 by Steve Herbst: Fixed to initialize bjm_data_$bj_code. 29**/ 30 31 /* initialize parameters */ 32 33 tid = p_tid; 34 tix = p_tix; 35 p_code = 0; 36 37 /* set up addresses for unexpected error */ 38 39 bjm_data_$bj_exit_err = nonlocal_error_exit; 40 bjm_data_$bj_code = 0; 41 42 on cleanup call CLEANUP; 43 44 if bjm_data_$bj_operation = "" 45 then bjm_data_$bj_operation = ME; 46 else do; 47 p_code = dm_error_$bj_recursive_invoc; 48 goto quick_exit; 49 end; 50 51 /* check parameters */ 52 53 if tix < 1 | tix > dm_system_data_$max_n_transactions | tid = (36)"0"b 54 then do; 55 p_code = dm_error_$no_current_transaction; 56 goto local_error_exit; 57 end; 58 59 bj_txte_ptr = addr (dm_data_$bj_txt_ptr -> bj_txt.entry (tix)); 60 61 if bj_txte.tid ^= tid 62 then do; 63 p_code = dm_error_$bj_bad_tid; 64 goto local_error_exit; 65 end; 66 67 /* the transaction seems valid, so invoke the primitive to adopt the transaciton */ 68 69 call bj_adopt_txn$adopt (tix); 70 71 std_exit: 72 bjm_data_$bj_operation = ""; 73 bjm_data_$bj_exit_err = bjm_data_$bj_default_error_label; 74 75 quick_exit: 76 return; 77 78 nonlocal_error_exit: 79 p_code = bjm_data_$bj_code; 80 81 local_error_exit: 82 call CLEANUP; 83 goto quick_exit; 84 85 86 /* INTERNAL PROCEDURES */ 87 88 CLEANUP: 89 procedure (); 90 91 dcl code fixed bin (35); 92 93 call bj_cleanup_tables$handler (code); 94 95 bjm_data_$bj_operation = ""; 96 bjm_data_$bj_exit_err = bjm_data_$bj_default_error_label; 97 98 return; 99 100 end CLEANUP; 101 102 /* DECLARATIONS */ 103 104 /* Parameter */ 105 106 dcl p_tid bit (36) aligned parameter; /* transaction ID */ 107 dcl p_tix fixed bin parameter; /* transaction index */ 108 dcl p_code fixed bin (35) parameter; /* standard system status code */ 109 110 /* Automatic */ 111 112 dcl tid bit (36) aligned; /* local copy of transaction ID */ 113 dcl tix fixed bin; /* local copy of transaction index */ 114 115 /* Static, External */ 116 117 dcl dm_error_$bj_recursive_invoc fixed bin (35) external static; 118 dcl dm_error_$no_current_transaction fixed bin (35) external static; 119 dcl dm_error_$bj_bad_tid fixed bin (35) external static; 120 dcl dm_data_$bj_txt_ptr pointer external static; 121 122 /* Constant */ 123 124 dcl ME char (32) internal static options (constant) init ("bjm_adopt_transaction"); 125 126 /* Entry */ 127 128 dcl bj_adopt_txn$adopt entry (fixed bin); 129 dcl bj_cleanup_tables$handler entry (fixed bin (35)); 130 131 /* Condition */ 132 133 dcl cleanup condition; 134 135 /* Include Files */ 136 137 1 1 /* BEGIN dm_bj_static.incl.pl1 */ 1 2 /* 1 3*Modified: 1 4*10/04/82 by Lee A. Newcomb: To change from internal static to external 1 5* static. 1 6**/ 1 7 1 8 dcl dm_system_data_$bj_max_n_journals fixed bin ext static; 1 9 dcl dm_system_data_$bj_max_n_processes fixed bin ext static; 1 10 dcl dm_system_data_$max_n_transactions fixed bin ext static; 1 11 1 12 /* END dm_bj_static.incl.pl1 */ 1 13 138 139 2 1 /* BEGIN INCLUDE FILE: dm_bj_txt.incl.pl1 */ 2 2 /* 2 3*dm_bj_txt - before journal per-system transaction table. 2 4* 2 5*Designed by A. Bensoussan 2 6*Written by M. Pandolf 06/02/82 2 7*Modified: 2 8*10/01/82 by Lee A. Newcomb: To use dm_system_data_ for dimension attributes 2 9* and specify alignment on level one. 2 10*08feb83 by M. Pandolf: To restructure the TXT and TXTE. 2 11*30mar83 by M. Pandolf: To add last_completed_operation and ok_to_write. 2 12**/ 2 13 /* format: style4,indattr,idind33,^indcomtxt */ 2 14 2 15 dcl BJ_TXT_VERSION_1 fixed bin int static options (constant) init (1); 2 16 2 17 dcl bj_txt_ptr ptr; /* pointer to transaction table */ 2 18 dcl bj_txte_ptr ptr; /* pointer to transaction table element */ 2 19 2 20 dcl 1 bj_txt aligned based (bj_txt_ptr), /* transaction table */ 2 21 2 version fixed bin, /* should be BJ_TXT_VERSION_1 */ 2 22 2 max_n_entries fixed bin, 2 23 2 n_entries_used fixed bin, /* assumed contiguous */ 2 24 2 pad_header_to_32_words bit (36) dim (29), /* to mod32 align bj_txt.entry */ 2 25 2 entry dim (dm_system_data_$max_n_transactions refer (bj_txt.max_n_entries)) 2 26 like bj_txte; 2 27 2 28 dcl 1 bj_txte based (bj_txte_ptr) aligned, /* single entry, must be mod32 word aligned */ 2 29 2 tid bit (36), /* transaction id if this or last txn */ 2 30 2 bj_uid bit (36), /* UID of before journal chosen at begin mark */ 2 31 2 entry_state aligned, 2 32 3 last_completed_operation char (4), /* to prevent multiple abort and commit */ 2 33 3 ok_to_write bit (1), /* basically validates using this entry */ 2 34 2 owner_info aligned, /* info about creation of txte */ 2 35 3 process_id bit (36), /* of process that wrote begin mark */ 2 36 2 operator_info aligned, /* of process that is currently using this txte */ 2 37 3 process_id bit (36), /* of process that shall write subsequent marks */ 2 38 3 ppte_ptr ptr, /* pointer to PPTE for this transaction */ 2 39 3 bj_oid bit (36), /* before journal opening ID for operator */ 2 40 2 records_info aligned, /* grouped to be saved and restored as one unit */ 2 41 3 curr_checkpoint_rec_id bit (36), /* ident of checkpoint record if doing a rollback, */ 2 42 /* else, this value must be zero. */ 2 43 3 first_bj_rec_id bit (36), /* ident of first mark for this transaction */ 2 44 3 last_bj_rec_id bit (36), /* ident of current mark for this transaction */ 2 45 3 n_rec_written fixed bin (35), /* count of marks written for this transaction */ 2 46 3 n_bytes_written fixed bin (35), /* count of total bytes written to journal */ 2 47 3 last_fm_postcommit_handler_rec_id 2 48 bit (36), /* ident of last special handler in list */ 2 49 2 append_state aligned, /* the first two members define the state of this */ 2 50 3 current_operation char (4), /* transaction and its interaction with bj_storage: */ 2 51 3 pending_bj_rec_id bit (36), /* operation rec_id state */ 2 52 /* *null* XXX quiesed */ 2 53 /* ^null "0"b write pending */ 2 54 /* ^null ^"0"b write completed, needs flushing */ 2 55 /* */ 2 56 3 pending_n_rec_written fixed bin (35), /* copy to n_rec_written before flush */ 2 57 3 pending_n_bytes_written fixed bin (35), /* copy to n_bytes_written before flush */ 2 58 2 pad_entry_to_32_words bit (36) dim (13); /* make any part of table 32 words long */ 2 59 2 60 /* END INCLUDE FILE: dm_bj_txt_ptr */ 140 141 3 1 /* BEGIN INCLUDE FILE dm_bj_global_error_info.incl.pl1 */ 3 2 3 3 /* Originally found in before journal primitives written by */ 3 4 /* A. Bensoussan. Gathered into an include file for ease of use. */ 3 5 /* See the bjm_data_.alm source for details of use. */ 3 6 3 7 /* HISTORY: 3 8*Written by Mike Pandolf, 07/14/82. 3 9*Modified: 3 10*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 3 11* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 3 12**/ 3 13 3 14 /* format: style4,indattr,ifthenstmt,ifthen,^indcomtxt,idind33 */ 3 15 dcl bjm_data_$bj_operation char (32) external static; 3 16 3 17 dcl bjm_data_$bj_exit_err label variable external; 3 18 3 19 dcl bjm_data_$bj_code fixed bin (35) external; 3 20 3 21 dcl bjm_data_$bj_default_error_label label external static; 3 22 3 23 3 24 /* END INCLUDE FILE dm_bj_global_error_info.incl.pl1 */ 142 143 144 145 end bjm_adopt_transaction; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0826.1 bjm_adopt_transaction.pl1 >spec>on>7192.pbf-04/04/85>bjm_adopt_transaction.pl1 138 1 01/07/85 0857.8 dm_bj_static.incl.pl1 >ldd>include>dm_bj_static.incl.pl1 140 2 01/07/85 0858.0 dm_bj_txt.incl.pl1 >ldd>include>dm_bj_txt.incl.pl1 142 3 01/07/85 0857.3 dm_bj_global_error_info.incl.pl1 >ldd>include>dm_bj_global_error_info.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. ME 000000 constant char(32) initial unaligned dcl 124 ref 44 bj_adopt_txn$adopt 000020 constant entry external dcl 128 ref 69 bj_cleanup_tables$handler 000022 constant entry external dcl 129 ref 93 bj_txt based structure level 1 dcl 2-20 bj_txte based structure level 1 dcl 2-28 bj_txte_ptr 000110 automatic pointer dcl 2-18 set ref 59* 61 bjm_data_$bj_code 000032 external static fixed bin(35,0) dcl 3-19 set ref 40* 78 bjm_data_$bj_default_error_label 000034 external static label variable dcl 3-21 ref 73 96 bjm_data_$bj_exit_err 000030 external static label variable dcl 3-17 set ref 39* 73* 96* bjm_data_$bj_operation 000026 external static char(32) unaligned dcl 3-15 set ref 44 44* 71* 95* cleanup 000102 stack reference condition dcl 133 ref 42 code 000100 automatic fixed bin(35,0) dcl 91 set ref 93* dm_data_$bj_txt_ptr 000016 external static pointer dcl 120 ref 59 dm_error_$bj_bad_tid 000014 external static fixed bin(35,0) dcl 119 ref 63 dm_error_$bj_recursive_invoc 000010 external static fixed bin(35,0) dcl 117 ref 47 dm_error_$no_current_transaction 000012 external static fixed bin(35,0) dcl 118 ref 55 dm_system_data_$max_n_transactions 000024 external static fixed bin(17,0) dcl 1-10 ref 53 entry 40 based structure array level 2 dcl 2-20 set ref 59 p_code parameter fixed bin(35,0) dcl 108 set ref 9 35* 47* 55* 63* 78* p_tid parameter bit(36) dcl 106 ref 9 33 p_tix parameter fixed bin(17,0) dcl 107 ref 9 34 tid 000100 automatic bit(36) dcl 112 in procedure "bjm_adopt_transaction" set ref 33* 53 61 tid based bit(36) level 2 in structure "bj_txte" dcl 2-28 in procedure "bjm_adopt_transaction" ref 61 tix 000101 automatic fixed bin(17,0) dcl 113 set ref 34* 53 53 59 69* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. BJ_TXT_VERSION_1 internal static fixed bin(17,0) initial dcl 2-15 bj_txt_ptr automatic pointer dcl 2-17 dm_system_data_$bj_max_n_journals external static fixed bin(17,0) dcl 1-8 dm_system_data_$bj_max_n_processes external static fixed bin(17,0) dcl 1-9 NAMES DECLARED BY EXPLICIT CONTEXT. CLEANUP 000165 constant entry internal dcl 88 ref 42 81 bjm_adopt_transaction 000022 constant entry external dcl 9 local_error_exit 000157 constant label dcl 81 ref 56 64 nonlocal_error_exit 000153 constant label dcl 78 ref 39 quick_exit 000152 constant label dcl 75 ref 48 83 std_exit 000137 constant label dcl 71 NAME DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 59 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 416 454 214 426 Length 722 214 36 232 202 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bjm_adopt_transaction 78 external procedure is an external procedure. on unit on line 42 64 on unit CLEANUP 70 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME CLEANUP 000100 code CLEANUP bjm_adopt_transaction 000100 tid bjm_adopt_transaction 000101 tix bjm_adopt_transaction 000110 bj_txte_ptr bjm_adopt_transaction THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out call_int_this call_int_other return enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. bj_adopt_txn$adopt bj_cleanup_tables$handler THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bjm_data_$bj_code bjm_data_$bj_default_error_label bjm_data_$bj_exit_err bjm_data_$bj_operation dm_data_$bj_txt_ptr dm_error_$bj_bad_tid dm_error_$bj_recursive_invoc dm_error_$no_current_transaction dm_system_data_$max_n_transactions LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000016 33 000027 34 000032 35 000034 39 000035 40 000041 42 000042 44 000064 47 000076 48 000101 53 000102 55 000111 56 000114 59 000115 61 000122 63 000125 64 000130 69 000131 71 000137 73 000144 75 000152 78 000153 81 000157 83 000163 88 000164 93 000172 95 000200 96 000205 98 000213 ----------------------------------------------------------- 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