COMPILATION LISTING OF SEGMENT bj_pste_register Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/04/85 0938.0 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* DESCRIPTION: 8* 9* bj_pste_register - Procedure with three entry points to 10* associate a process with a per-system table entry. The entry points 11* are "check_in", "check_out", and "check_out_dead" which create and 12* delete association information. The two main functions of these 13* operations are to register the procedure in the per-system table 14* check-in-table, and to update the PSTE cell "n_processes". 15* 16* NOTE: (bj_pste.version = 0) means that pste is not in use. 17* 18* ASSUMPTIONS ABOUT ENVIRONMENT: 19* 1) the before journal PST is already locked for one writer only. 20* 2) the process executing this code may not be able to successfuly 21* complete this procedure. 22**/ 23 24 /* HISTORY: 25*Written by Mike Pandolf, 06/28/82. 26*Modified: 27*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 28* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 29*06/07/84 by Lee Baldwin: Renamed dm_error_$bj_(pst pste)_version_bad 30* to bj_bad_(pst pste)_version. 31*11/12/84 by M. Sharpe: to correct format and dcls; to use ERROR_RETURN 32* technology; to remove the unused entrypoint bj_pste_register; 33* to change "if pix ^= 0..." ~line 306 to "if pix = 0...". 34*02/18/85 by Lee A. Newcomb: Fixed to use the new BJ_PSTE_VERSION_2 constant; 35* added the CHECK_VERSION_NUMERIC proc; changed each entry to use 36* its full name in calls to bj_report_err; turned formatting on for 37* the procedure; removed all mention of the never-implemented "undo" 38* functionality; standardized int process variable names. 39*02/28/85 by Lee A. Newcomb: Added journalization comment for previous 40* changes; initialized myname to an indicator of an invalid entry. 41**/ 42 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo,^inddcls,dclind5,idind35,linecom */ 43 44 bj_pste_register$check_in: 45 proc (p_bj_pste_ptr); 46 47 /* DECLARATIONS */ 48 49 /* Parameter */ 50 dcl ( 51 p_bj_pste_ptr ptr, /* PSTE to which we are to "attach" */ 52 p_process_id bit (36) aligned 53 ) parameter; 54 55 /* Automatic */ 56 dcl ( 57 code fixed bin (35) init (0), 58 /* status code we use to verify subroutine calls */ 59 my_process_id bit (36) init (""b),/* used to compare against check_in_table entries */ 60 have_process_ix bit (1) aligned, /* "1"b => found check_in_table entry with our process_id */ 61 first_free_process_ix fixed bin (17) init (0), 62 /* index of empty check_in_table entry that we will use */ 63 this_process_ix fixed bin (17) init (0), 64 /* do loop variable; index into check_in_table */ 65 max_n_processes fixed bin init (0), 66 max_n_journals fixed bin init (0), 67 myname char (32) 68 init (BJ_PSTE_REGISTER_MYNAME_NOT_SET) 69 ) automatic; 70 71 /* Based */ 72 /* Builtin */ 73 dcl (null, ptr) builtin; 74 75 /* Condition */ 76 /* Constants */ 77 dcl ( 78 BJ_PSTE_REGISTER_CHECK_IN char (32) 79 init ("bj_pste_register$check_in"), 80 BJ_PSTE_REGISTER_CHECK_OUT char (32) 81 init ("bj_pste_register$check_out"), 82 BJ_PSTE_REGISTER_CHECK_OUT_DEAD char (32) 83 init ( 84 "bj_pste_register$check_out_dead"), 85 BJ_PSTE_REGISTER_MYNAME_NOT_SET char (32) 86 init ( 87 "bj_pste_register myname not set") 88 ) internal static options (constant); 89 90 /* Entry */ 91 dcl ( 92 bj_report_err entry (fixed bin (35), char (*)), 93 get_process_id_ entry () returns (bit (36)), 94 hcs_$validate_processid entry (bit (36) aligned, 95 fixed bin (35)) 96 ) external; 97 98 /* External */ 99 dcl ( 100 bjm_data_$bj_pst_ptr ptr, 101 ( 102 dm_error_$bj_bad_pst_version, 103 dm_error_$bj_bad_pste_version, 104 dm_error_$bj_pst_cit_full 105 ) fixed bin (35) 106 ) external; 107 108 /* Static */ 109 dcl process_ix fixed bin init (-1) internal static; 110 111 /* END OF DECLARATIONS */ 112 113 /* bj_pste_register$check_in: repeat for reader */ 114 /* proc (p_bj_pste_ptr); */ 115 116 myname = BJ_PSTE_REGISTER_CHECK_IN; 117 bj_pste_ptr = p_bj_pste_ptr; 118 if bj_pste.version ^= 0 then /* will be 0 for first user of PSTE */ 119 call CHECK_VERSION_NUMERIC (bj_pste.version, BJ_PSTE_VERSION_2, 120 dm_error_$bj_bad_pste_version); 121 122 call SET_PTRS (); 123 124 if process_ix = -1 then /* must get an index */ 125 process_ix = GET_PROCESS_IX (); 126 127 if bj_check_in_table.cross_proc_bj (process_ix, bj_pste.bj_ix) = "0"b 128 then do; 129 bj_pste.n_processes = bj_pste.n_processes + 1; 130 bj_check_in_table.cross_proc_bj (process_ix, bj_pste.bj_ix) = "1"b; 131 end; 132 133 go to MAIN_RETURN; 134 135 /* end bj_pste_register$check_in; */ 136 137 bj_pste_register$check_out: 138 entry (p_bj_pste_ptr); 139 140 myname = BJ_PSTE_REGISTER_CHECK_OUT; 141 142 if process_ix = -1 then 143 ; /* process not in check in table */ 144 else do; 145 bj_pste_ptr = p_bj_pste_ptr; /* version of zero ==> not in use */ 146 if bj_pste.version ^= 0 then do; 147 call CHECK_VERSION_NUMERIC (bj_pste.version, BJ_PSTE_VERSION_2, 148 dm_error_$bj_bad_pste_version); 149 150 call SET_PTRS (); 151 152 call CHECK_OUT (process_ix, bj_pste.bj_ix); 153 end; 154 end; 155 156 go to MAIN_RETURN; 157 158 /* end bj_pste_register$check_out; */ 159 160 bj_pste_register$check_out_dead: 161 entry (p_bj_pste_ptr, p_process_id); 162 163 myname = BJ_PSTE_REGISTER_CHECK_OUT_DEAD; 164 call SET_PTRS (); 165 166 if p_bj_pste_ptr ^= null () then do; 167 bj_pste_ptr = p_bj_pste_ptr; 168 call CHECK_VERSION_NUMERIC (bj_pste.version, BJ_PSTE_VERSION_2, 169 dm_error_$bj_bad_pste_version); 170 if p_process_id = "0"b then 171 call CLEAN_ALL_DEAD_IN_ONE_BJ (bj_pste_ptr); 172 else call CLEAN_ONE_DEAD_IN_ONE_BJ (bj_pste_ptr, p_process_id); 173 end; 174 else /* p_bj_pste_ptr must be null */ 175 if p_process_id ^= "0"b then 176 call CLEAN_ONE_DEAD_IN_ALL_BJ (p_process_id); 177 else call CLEAN_ALL_DEAD_IN_ALL_BJ (); 178 179 go to MAIN_RETURN; 180 181 /* end bj_pste_register$check_out_dead; */ 182 183 MAIN_RETURN: 184 return; 185 186 ERROR_RETURN: 187 proc (er_p_code); 188 189 dcl er_p_code fixed bin (35); 190 191 call bj_report_err (er_p_code, myname); /* does not return */ 192 193 end ERROR_RETURN; 194 195 CHECK_VERSION_NUMERIC: 196 proc (cvn_p_given_version, cvn_p_correct_version, cvn_p_error_to_use); 197 198 /* The error code to use is passed since we use this to check several */ 199 /* structures with numeric versions. It is hoped newer versions of */ 200 /* these structures will be changed to use char (8) versions. */ 201 202 dcl ( 203 cvn_p_given_version fixed bin, 204 cvn_p_correct_version fixed bin, 205 cvn_p_error_to_use fixed bin (35) 206 ) parameter; 207 208 if cvn_p_given_version ^= cvn_p_correct_version then 209 call ERROR_RETURN (cvn_p_error_to_use); 210 211 end CHECK_VERSION_NUMERIC; 212 213 SET_PTRS: 214 procedure (); 215 216 /* Get pointers to system tables and the max dimensions of them. */ 217 218 bj_pst_ptr = bjm_data_$bj_pst_ptr; 219 call CHECK_VERSION_NUMERIC (bj_pst.version, BJ_PST_VERSION_1, 220 dm_error_$bj_bad_pst_version); 221 222 bj_check_in_table_ptr = ptr (bj_pst_ptr, bj_pst.check_in_table_offset); 223 224 max_n_processes = dm_system_data_$bj_max_n_processes; 225 max_n_journals = dm_system_data_$bj_max_n_journals; 226 227 return; 228 229 end SET_PTRS; 230 231 CHECK_OUT: 232 proc (co_p_process_index, co_p_journal_index); 233 234 /* Remove the process as a user of the PSTE in the check in table, */ 235 /* decrementing the count of the process' using the PSTE on the way. */ 236 237 dcl ( 238 co_p_process_index fixed bin, /* Input */ 239 co_p_journal_index fixed bin /* Input */ 240 ) parameter; 241 242 if bj_check_in_table.cross_proc_bj (co_p_process_index, co_p_journal_index) 243 = "1"b then do; /* are using */ 244 bj_check_in_table 245 .cross_proc_bj (co_p_process_index, co_p_journal_index) = "0"b; 246 /* now not using */ 247 bj_pst.e (co_p_journal_index).n_processes = 248 bj_pst.e (co_p_journal_index).n_processes - 1; 249 end; 250 251 return; 252 253 end CHECK_OUT; 254 255 CLEAN_ALL_DEAD_IN_ONE_BJ: 256 proc (cadiob_p_bj_pste_ptr); /* Used by bj_close_oid */ 257 258 dcl cadiob_p_bj_pste_ptr ptr parameter; 259 260 dcl ( 261 ( 262 cadiob_journal_index init (0), 263 cadiob_number_of_live_processes init (0), 264 cadiob_process_index init (0) 265 ) fixed bin, 266 cadiob_process_id bit (36) aligned 267 ) automatic; 268 269 bj_pste_ptr = cadiob_p_bj_pste_ptr; 270 271 cadiob_journal_index = bj_pste.bj_ix; 272 273 do cadiob_process_index = 1 to max_n_processes; 274 if bj_check_in_table 275 .cross_proc_bj (cadiob_process_index, cadiob_journal_index) then do; 276 cadiob_process_id = 277 bj_check_in_table.process_id (cadiob_process_index); 278 if PROCESS_IS_DEAD (cadiob_process_id) then 279 call CHECK_OUT (cadiob_process_index, cadiob_journal_index); 280 else cadiob_number_of_live_processes = 281 cadiob_number_of_live_processes + 1; 282 end; 283 end; 284 285 bj_pste.n_processes = cadiob_number_of_live_processes; 286 287 return; 288 289 end CLEAN_ALL_DEAD_IN_ONE_BJ; 290 291 CLEAN_ONE_DEAD_IN_ALL_BJ: 292 proc (codiab_p_process_id); /* Used bt bjm_adjust_processes */ 293 294 dcl codiab_p_process_id bit (36) aligned parameter; 295 296 dcl ( 297 codiab_process_id bit (36) aligned init (""b), 298 codiab_process_index fixed bin init (0), 299 codiab_journal_index fixed bin init (0) 300 ) automatic; 301 302 codiab_process_id = codiab_p_process_id; 303 if ^PROCESS_IS_DEAD (codiab_process_id) then 304 return; 305 306 codiab_process_index = FIND_PROCESS_IX (codiab_process_id); 307 if codiab_process_index = 0 then 308 return; 309 310 do codiab_journal_index = 1 to max_n_journals; 311 312 if bj_pst.e (codiab_journal_index).version = 0 then 313 ; /* pste not in use */ 314 else do; 315 call CHECK_VERSION_NUMERIC (bj_pst.e (codiab_journal_index).version, 316 BJ_PSTE_VERSION_2, dm_error_$bj_bad_pste_version); 317 call CHECK_OUT (codiab_process_index, codiab_journal_index); 318 end; 319 end; 320 321 bj_check_in_table.process_id (codiab_process_index) = (36)"0"b; 322 323 return; 324 325 end CLEAN_ONE_DEAD_IN_ALL_BJ; 326 327 CLEAN_ONE_DEAD_IN_ONE_BJ: 328 proc (codiob_p_bj_pste_ptr, codiob_p_process_id); /* Not very useful */ 329 330 dcl ( 331 codiob_p_bj_pste_ptr ptr, 332 codiob_p_process_id bit (36) aligned 333 ) parameter; 334 335 dcl ( 336 codiob_process_id bit (36) aligned, 337 codiob_process_index fixed bin, 338 codiob_journal_index fixed bin 339 ) automatic; 340 341 bj_pste_ptr = codiob_p_bj_pste_ptr; 342 codiob_process_id = codiob_p_process_id; 343 344 codiob_journal_index = bj_pste.bj_ix; 345 346 codiob_process_index = FIND_PROCESS_IX (codiob_process_id); 347 if codiob_process_index = 0 then 348 return; 349 350 if ^PROCESS_IS_DEAD (codiob_process_id) then 351 return; 352 353 call CHECK_OUT (codiob_process_index, codiob_journal_index); 354 355 return; 356 357 end CLEAN_ONE_DEAD_IN_ONE_BJ; 358 359 CLEAN_ALL_DEAD_IN_ALL_BJ: 360 proc (); 361 362 /* NOT IMPLEMENTED */ 363 return; 364 365 end CLEAN_ALL_DEAD_IN_ALL_BJ; 366 367 PROCESS_IS_DEAD: 368 proc (pid_p_process_id) returns (bit (1) aligned); 369 370 371 dcl pid_p_process_id bit (36) aligned parameter; 372 373 dcl pid_code fixed bin (35) init (0) automatic; 374 375 call hcs_$validate_processid (pid_p_process_id, pid_code); 376 377 if pid_code ^= 0 then 378 return ("1"b); 379 else return ("0"b); 380 381 end PROCESS_IS_DEAD; 382 383 GET_PROCESS_IX: 384 procedure () returns (fixed bin); 385 386 /* See if our process is in the check in table (CIT). If */ 387 /* it is not, we try to find a free spot and claim it for */ 388 /* ourself. Whether we were in it to start or not, we tell */ 389 /* the caller what index into the CIT we have. Note: it is */ 390 /* possible for the CIT to be full; if so, we call the */ 391 /* ERROR_RETURN procedure and do not return to the caller. */ 392 393 dcl ( 394 gpi_first_free_process_index fixed bin init (0), 395 gpi_have_process_index bit (1) aligned init (""b), 396 gpi_this_process_id bit (36) aligned init (""b), 397 gpi_this_process_index fixed bin init (0) 398 ) automatic; 399 400 gpi_this_process_id = get_process_id_ (); 401 402 IS_PROCESS_IN_CIT: 403 do gpi_this_process_index = 1 to dm_system_data_$bj_max_n_processes 404 while (^gpi_have_process_index); /* to see if we are registered in PST already */ 405 406 if bj_check_in_table.process_id (gpi_this_process_index) 407 = gpi_this_process_id then 408 gpi_have_process_index = "1"b; 409 410 else if bj_check_in_table.process_id (gpi_this_process_index) = (36)"0"b 411 then 412 if gpi_first_free_process_index = 0 then 413 gpi_first_free_process_index = gpi_this_process_index; 414 end IS_PROCESS_IN_CIT; 415 416 gpi_this_process_index = gpi_this_process_index - 1; /* cancel out +1 effect of do loop */ 417 418 if ^gpi_have_process_index then /* NOT in PST yet */ 419 if gpi_first_free_process_index = 0 then /* no more room in CIT */ 420 call ERROR_RETURN (dm_error_$bj_pst_cit_full); 421 422 else do; /* we now add new CIT entry for our process */ 423 gpi_this_process_index = gpi_first_free_process_index; 424 425 /* zero the cross_proc_bj row this process will use */ 426 bj_check_in_table.cross_proc_bj (gpi_this_process_index, *) = "0"b; 427 428 bj_check_in_table.process_id (gpi_this_process_index) = 429 gpi_this_process_id; 430 end; /* now in CIT */ 431 432 else ; /* we were already in CIT */ 433 434 return (gpi_this_process_index); 435 436 end GET_PROCESS_IX; 437 438 FIND_PROCESS_IX: 439 proc (fpi_p_process_id) returns (fixed bin); 440 441 dcl fpi_p_process_id bit (36) aligned parameter; 442 443 dcl ( 444 fpi_process_id bit (36) aligned init (""b), 445 fpi_process_index fixed bin init (0) 446 ) automatic; 447 448 fpi_process_id = fpi_p_process_id; 449 450 do fpi_process_index = 1 to max_n_processes; 451 452 if bj_check_in_table.process_id (fpi_process_index) = fpi_process_id then 453 return (fpi_process_index); 454 455 end; 456 457 return (0); 458 459 end FIND_PROCESS_IX; 460 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 461 462 2 1 /* BEGIN INCLUDE FILE: dm_bj_pst.incl.pl1 */ 2 2 /* 2 3*Layout of the before journal per-system table header and BJ table entries. 2 4* 2 5*Written by Andre Bensoussan 06-15-1982 2 6*Modified: 2 7*09/29/82 by Lee A. Newcomb: To use dm_system_data_ for determining 2 8* dimension of bj_pst.e and force bj_pst.mod_list_area and 2 9* bj_pst.e to even word boundaries. 2 10*04/27/82 by M. Pandolf: To add meter space by cutting away from mod_list_area. 2 11**/ 2 12 /* format: style4,indattr,idind33,^indcomtxt */ 2 13 2 14 dcl BJ_PST_VERSION_1 fixed bin internal static options (constant) init (1); 2 15 2 16 dcl bj_pst_ptr ptr; 2 17 2 18 dcl 1 bj_pst based (bj_pst_ptr) aligned, 2 19 2 version fixed bin, 2 20 2 pad1 bit (36), 2 21 2 lock, 2 22 3 pid bit (36), /* process_id holding lock */ 2 23 3 event bit (36), 2 24 2 time_of_bootload fixed bin (71), /* for ease of access */ 2 25 2 max_n_entries fixed bin, /* as determined from dm_system_data_$bj_max_n_journals */ 2 26 2 n_entries_used fixed bin, /* current # of BJs open on the system */ 2 27 2 highest_ix_used fixed bin, /* max. # of BJs that has ever been open of the system */ 2 28 2 pn_table_offset fixed bin (18) uns, /* relative offset of bj_pn_table in bj_pst seg. */ 2 29 2 check_in_table_offset fixed bin (18) uns, /* ditto for bj_check_in_table */ 2 30 2 buffer_table_offset fixed bin (18) uns, /* ditto for where our BJ buffers are located */ 2 31 2 max_n_buffers fixed bin, /* must be <= to max_n_entries */ 2 32 2 pad2 bit (36), /* force next on even word boundary */ 2 33 2 meters, /* dim (50) fixed bin (71), */ 2 34 3 n_calls_begin_txn fixed bin (71), /* meter (1) */ 2 35 3 n_calls_before_image fixed bin (71), /* meter (2) */ 2 36 3 n_calls_abort fixed bin (71), /* meter (3) */ 2 37 3 n_calls_commit fixed bin (71), /* meter (4) */ 2 38 3 n_calls_rb_mark fixed bin (71), /* meter (5) */ 2 39 3 n_calls_fm_pc_mark fixed bin (71), /* meter (6) */ 2 40 3 n_calls_fm_rbh fixed bin (71), /* meter (7) */ 2 41 3 n_calls_rollback fixed bin (71), /* meter (8) */ 2 42 3 meter dim (9:50) fixed bin (71), /* meter (9) - meter (50) */ 2 43 2 mod_list_area (100) fixed bin (35), /* for keeping track of pst mods */ 2 44 2 45 2 e dim (dm_system_data_$bj_max_n_journals refer (bj_pst.max_n_entries)) 2 46 like bj_pste; /* per system BJ table entries */ 2 47 2 48 2 49 /* END INCLUDE FILE: dm_bj_pst.incl.pl1 */ 463 464 3 1 /* BEGIN INCLUDE FILE: dm_bj_pste.incl.pl1 */ 3 2 3 3 /* DESCRIPTION 3 4* 3 5* Layout of the per-system before journal table 3 6* entries. This structure is used to contain information 3 7* about a before journal active in a running DMS. It is 3 8* currently also used as the header of a before journal 3 9* (see dm_bj_header.incl.pl1). Version changes to this 3 10* structure require either automatic conversion to be set 3 11* up, or users to be told to re-create their journals. 3 12* 3 13* Currently, a bj_pste must be 64 words long; any 3 14* future changes must at least make sure a bj_pste is an 3 15* even # of words for the alignment of some of its 3 16* elements. 3 17**/ 3 18 3 19 /* HISTORY: 3 20* 3 21*Written by Andre Bensoussan, 06/15/82. 3 22*Modified: 3 23*08/16/82 by Andre Bensoussan: to add stamp_for_last_ci_put. 3 24*09/29/82 by Lee A. Newcomb: to fix BJ_PSTE_VERSION_1 and fix some 3 25* alignments. 3 26*11/01/82 by Andre Bensoussan: to add "stamp_for_last_ci_on_disk", 3 27* "n_bi_still_unsafe", and "n_bi_being_saved". 3 28*02/08/83 by M. Pandolf: to add append_state structure. 3 29*03/19/83 by L. A. Newcomb: to fix up some alignments and spelling problems. 3 30*04/27/83 by M. Pandolf: to add meter structure at end. 3 31*02/11/85 by Lee A. Newcomb: Fixed version constant name to agree with its 3 32* value of 2; fixed references to page files or PF's; fixed format 3 33* of description and history sections. 3 34*03/07/85 by Lee A. Newcomb: Changed a pad word to be txn_storage_limit and 3 35* expanded on the description for future generations (no 3 36* version was made). 3 37*03/27/85 by Lee A. Newcomb: Changed one of the unused meters to 3 38* n_txn_storage_limit_hits (again without a version change). 3 39**/ 3 40 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo,^inddcls,dclind5,idind35,linecom */ 3 41 3 42 dcl BJ_PSTE_VERSION_2 fixed bin internal static 3 43 options (constant) init (2); 3 44 3 45 dcl bj_pste_ptr ptr; 3 46 3 47 /* MUST HAVE EVEN NUMBER OR WORDS */ 3 48 dcl 1 bj_pste based (bj_pste_ptr) aligned, 3 49 2 version fixed bin, 3 50 2 bj_ix fixed bin, /* Index of this entry in bj_pst table */ 3 51 2 lock aligned, 3 52 3 pid bit (36), /* process ID of lock owner */ 3 53 3 event bit (36), 3 54 2 bj_uid bit (36), /* UID of BJ file */ 3 55 2 ci_size fixed bin, /* In number of bytes */ 3 56 2 max_size fixed bin, /* In number of ci's */ 3 57 2 active bit (1) aligned, /* 0 means journal not being used */ 3 58 2 time_header_updated fixed bin (71), 3 59 2 earliest_meaningful_time fixed bin (71), /* time stamp on first valid control interval */ 3 60 2 update_frequency fixed bin, /* Not used yet, probably will be how many CIs */ 3 61 2 last_rec_id bit (36), /* rec id of the last logical record in journal */ 3 62 2 n_processes fixed bin, /* Number of processes using this BJ */ 3 63 2 n_txn fixed bin, /* Number of txn in progress using this BJ */ 3 64 2 last_ci_info aligned, 3 65 3 last_ci_buffered fixed bin (24) uns, /* Last ci encached in the buffer */ 3 66 3 last_ci_put fixed bin (24) uns, /* Last ci put in the BJ */ 3 67 3 last_ci_flushed fixed bin (24) uns, /* Last ci for which flush initiated */ 3 68 3 last_ci_on_disk fixed bin (24) uns, /* Last ci of that portion of the BJ known to be ... */ 3 69 /* .. completely on disk */ 3 70 3 stamp_for_last_ci_put fixed bin (71), /* Time stamp associated with the last ci put in the BJ */ 3 71 3 stamp_for_last_ci_on_disk fixed bin (71), /* Time stamp associated with the last ci on disk in the BJ */ 3 72 2 n_bi_still_unsafe fixed bin, /* number of bi's still not on disk */ 3 73 2 n_bi_being_saved fixed bin, /* number of bi's for which flush initiated */ 3 74 2 buffer_offset fixed bin (18) uns, /* Now allocated in the bj_pst segment */ 3 75 2 txn_storage_limit fixed bin (35), /* # of bytes a single txn may write */ 3 76 2 cl aligned, /* Circular List */ 3 77 3 origin_ci fixed bin (24) uns, 3 78 3 lowest_ci fixed bin (24) uns, 3 79 3 highest_ci fixed bin (24) uns, 3 80 3 number_ci fixed bin (24) uns, 3 81 2 append_state aligned, 3 82 3 current_operation char (4), /* equal to "appe" when append in progress */ 3 83 3 pending_n_txn fixed bin, /* n_txn value when append done */ 3 84 3 pending_last_rec_id bit (36), /* last_rec_id value after append done */ 3 85 3 pending_last_element_id bit (36), /* last element id after append done */ 3 86 3 txte_rec_id_relp bit (18), /* rel ptr into seg containing TXT for txte.pending_bj_rec_id */ 3 87 2 pad_to_even_word1 bit (36) aligned, 3 88 2 meters aligned, /* dim (10) fixed bin (71), */ 3 89 3 n_bi_written fixed bin (71), /* meter (1) */ 3 90 3 n_bi_bytes_written fixed bin (71), /* meter (2) */ 3 91 3 n_journal_full fixed bin (71), /* meter (3) */ 3 92 3 n_successful_recycles fixed bin (71), /* meter (4) */ 3 93 3 n_ci_recycled fixed bin (71), /* meter (5) */ 3 94 3 n_txn_started fixed bin (71), /* meter (6) */ 3 95 3 n_non_null_txn fixed bin (71), /* meter (7) */ 3 96 3 n_txn_storage_limit_hits fixed bin (71), /* meter (8) */ 3 97 3 meter (9:10) fixed bin (71), 3 98 /* meter (9) - meter (10) */ 3 99 2 pad_to_64_words (6) bit (36); /* 64 is even (see below) */ 3 100 3 101 3 102 /* END INCLUDE FILE: dm_bj_pste.incl.pl1 */ 465 466 4 1 /* BEGIN INCLUDE FILE: dm_bj_check_in_table.incl.pl1 */ 4 2 /* 4 3*Table for fast checking of who's got what BJ open 4 4* 4 5*Written by Andre Bensoussan June/July 1982 4 6*Modified: 4 7*08/30/82 by Lee A. Newcomb: To use dm_system_data_ for max length of 4 8* vector and array bounds. 4 9**/ 4 10 /* format: style4,indattr,idind33,^indcomtxt */ 4 11 4 12 dcl bj_check_in_table_ptr ptr; 4 13 4 14 dcl 1 bj_check_in_table based (bj_check_in_table_ptr) aligned, 4 15 2 max_n_processes fixed bin, 4 16 2 max_n_journals fixed bin, 4 17 2 process_id dim (dm_system_data_$bj_max_n_processes refer 4 18 (bj_check_in_table.max_n_processes)) bit (36), 4 19 2 cross_proc_bj dim (dm_system_data_$bj_max_n_processes refer 4 20 (bj_check_in_table.max_n_processes), 4 21 dm_system_data_$bj_max_n_journals refer (bj_check_in_table.max_n_journals)) 4 22 bit (1) unaligned; 4 23 4 24 /* END INCLUDE FILE: dm_bj_check_in_table.incl.pl1 */ 467 468 469 470 end bj_pste_register$check_in; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0826.1 bj_pste_register.pl1 >spec>on>7192.pbf-04/04/85>bj_pste_register.pl1 461 1 01/07/85 0857.8 dm_bj_static.incl.pl1 >ldd>include>dm_bj_static.incl.pl1 463 2 01/07/85 0857.7 dm_bj_pst.incl.pl1 >ldd>include>dm_bj_pst.incl.pl1 465 3 04/04/85 0819.1 dm_bj_pste.incl.pl1 >spec>on>7192.pbf-04/04/85>dm_bj_pste.incl.pl1 467 4 01/07/85 0857.3 dm_bj_check_in_table.incl.pl1 >ldd>include>dm_bj_check_in_table.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. BJ_PSTE_REGISTER_CHECK_IN 000030 constant char(32) initial unaligned dcl 77 ref 116 BJ_PSTE_REGISTER_CHECK_OUT 000020 constant char(32) initial unaligned dcl 77 ref 140 BJ_PSTE_REGISTER_CHECK_OUT_DEAD 000010 constant char(32) initial unaligned dcl 77 ref 163 BJ_PSTE_REGISTER_MYNAME_NOT_SET 000000 constant char(32) initial unaligned dcl 77 ref 56 BJ_PSTE_VERSION_2 000045 constant fixed bin(17,0) initial dcl 3-42 set ref 118* 147* 168* 315* BJ_PST_VERSION_1 000047 constant fixed bin(17,0) initial dcl 2-14 set ref 219* bj_check_in_table based structure level 1 dcl 4-14 bj_check_in_table_ptr 000122 automatic pointer dcl 4-12 set ref 127 130 222* 242 244 274 276 321 406 410 426 428 452 bj_ix 1 based fixed bin(17,0) level 2 dcl 3-48 set ref 127 130 152* 271 344 bj_pst based structure level 1 dcl 2-18 bj_pst_ptr 000116 automatic pointer dcl 2-16 set ref 218* 219 222 222 247 247 312 315 bj_pste based structure level 1 dcl 3-48 bj_pste_ptr 000120 automatic pointer dcl 3-45 set ref 117* 118 118 127 129 129 130 145* 146 147 152 167* 168 170* 172* 269* 271 285 341* 344 bj_report_err 000012 constant entry external dcl 91 ref 191 bjm_data_$bj_pst_ptr 000020 external static pointer dcl 99 ref 218 cadiob_journal_index 000162 automatic fixed bin(17,0) initial dcl 260 set ref 260* 271* 274 278* cadiob_number_of_live_processes 000163 automatic fixed bin(17,0) initial dcl 260 set ref 260* 280* 280 285 cadiob_p_bj_pste_ptr parameter pointer dcl 258 ref 255 269 cadiob_process_id 000165 automatic bit(36) dcl 260 set ref 276* 278* cadiob_process_index 000164 automatic fixed bin(17,0) initial dcl 260 set ref 260* 273* 274 276 278* check_in_table_offset 12 based fixed bin(18,0) level 2 unsigned dcl 2-18 ref 222 co_p_journal_index parameter fixed bin(17,0) dcl 237 ref 231 242 244 247 247 co_p_process_index parameter fixed bin(17,0) dcl 237 ref 231 242 244 code 000100 automatic fixed bin(35,0) initial dcl 56 set ref 56* codiab_journal_index 000200 automatic fixed bin(17,0) initial dcl 296 set ref 296* 310* 312 315 317* codiab_p_process_id parameter bit(36) dcl 294 ref 291 302 codiab_process_id 000176 automatic bit(36) initial dcl 296 set ref 296* 302* 303* 306* codiab_process_index 000177 automatic fixed bin(17,0) initial dcl 296 set ref 296* 306* 307 317* 321 codiob_journal_index 000212 automatic fixed bin(17,0) dcl 335 set ref 344* 353* codiob_p_bj_pste_ptr parameter pointer dcl 330 ref 327 341 codiob_p_process_id parameter bit(36) dcl 330 ref 327 342 codiob_process_id 000210 automatic bit(36) dcl 335 set ref 342* 346* 350* codiob_process_index 000211 automatic fixed bin(17,0) dcl 335 set ref 346* 347 353* cross_proc_bj based bit(1) array level 2 packed unaligned dcl 4-14 set ref 127 130* 242 244* 274 426* cvn_p_correct_version parameter fixed bin(17,0) dcl 202 ref 195 208 cvn_p_error_to_use parameter fixed bin(35,0) dcl 202 set ref 195 208* cvn_p_given_version parameter fixed bin(17,0) dcl 202 ref 195 208 dm_error_$bj_bad_pst_version 000022 external static fixed bin(35,0) dcl 99 set ref 219* dm_error_$bj_bad_pste_version 000024 external static fixed bin(35,0) dcl 99 set ref 118* 147* 168* 315* dm_error_$bj_pst_cit_full 000026 external static fixed bin(35,0) dcl 99 set ref 418* dm_system_data_$bj_max_n_journals 000030 external static fixed bin(17,0) dcl 1-8 ref 225 dm_system_data_$bj_max_n_processes 000032 external static fixed bin(17,0) dcl 1-9 ref 224 402 e 326 based structure array level 2 dcl 2-18 er_p_code parameter fixed bin(35,0) dcl 189 set ref 186 191* first_free_process_ix 000102 automatic fixed bin(17,0) initial dcl 56 set ref 56* fpi_p_process_id parameter bit(36) dcl 441 ref 438 448 fpi_process_id 000254 automatic bit(36) initial dcl 443 set ref 443* 448* 452 fpi_process_index 000255 automatic fixed bin(17,0) initial dcl 443 set ref 443* 450* 452 452* get_process_id_ 000014 constant entry external dcl 91 ref 400 gpi_first_free_process_index 000240 automatic fixed bin(17,0) initial dcl 393 set ref 393* 410 410* 418 423 gpi_have_process_index 000241 automatic bit(1) initial dcl 393 set ref 393* 402 406* 418 gpi_this_process_id 000242 automatic bit(36) initial dcl 393 set ref 393* 400* 406 428 gpi_this_process_index 000243 automatic fixed bin(17,0) initial dcl 393 set ref 393* 402* 406 410 410* 416* 416 423* 426 428 434 hcs_$validate_processid 000016 constant entry external dcl 91 ref 375 max_n_journals 1 based fixed bin(17,0) level 2 in structure "bj_check_in_table" dcl 4-14 in procedure "bj_pste_register$check_in" ref 127 127 130 130 242 242 244 244 274 274 426 426 426 max_n_journals 000105 automatic fixed bin(17,0) initial dcl 56 in procedure "bj_pste_register$check_in" set ref 56* 225* 310 max_n_processes 000104 automatic fixed bin(17,0) initial dcl 56 in procedure "bj_pste_register$check_in" set ref 56* 224* 273 450 max_n_processes based fixed bin(17,0) level 2 in structure "bj_check_in_table" dcl 4-14 in procedure "bj_pste_register$check_in" ref 127 130 242 244 274 426 426 my_process_id 000101 automatic bit(36) initial unaligned dcl 56 set ref 56* myname 000106 automatic char(32) initial unaligned dcl 56 set ref 56* 116* 140* 163* 191* n_processes 344 based fixed bin(17,0) array level 3 in structure "bj_pst" dcl 2-18 in procedure "bj_pste_register$check_in" set ref 247* 247 n_processes 16 based fixed bin(17,0) level 2 in structure "bj_pste" dcl 3-48 in procedure "bj_pste_register$check_in" set ref 129* 129 285* null builtin function dcl 73 ref 166 p_bj_pste_ptr parameter pointer dcl 50 ref 44 117 137 145 160 166 167 p_process_id parameter bit(36) dcl 50 set ref 160 170 172* 174 174* pid_code 000230 automatic fixed bin(35,0) initial dcl 373 set ref 373* 375* 377 pid_p_process_id parameter bit(36) dcl 371 set ref 367 375* process_id 2 based bit(36) array level 2 dcl 4-14 set ref 276 321* 406 410 428* 452 process_ix 000010 internal static fixed bin(17,0) initial dcl 109 set ref 124 124* 127 130 142 152* ptr builtin function dcl 73 ref 222 this_process_ix 000103 automatic fixed bin(17,0) initial dcl 56 set ref 56* version based fixed bin(17,0) level 2 in structure "bj_pste" dcl 3-48 in procedure "bj_pste_register$check_in" set ref 118 118* 146 147* 168* version based fixed bin(17,0) level 2 in structure "bj_pst" dcl 2-18 in procedure "bj_pste_register$check_in" set ref 219* version 326 based fixed bin(17,0) array level 3 in structure "bj_pst" dcl 2-18 in procedure "bj_pste_register$check_in" set ref 312 315* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. dm_system_data_$max_n_transactions external static fixed bin(17,0) dcl 1-10 have_process_ix automatic bit(1) dcl 56 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_OUT 000434 constant entry internal dcl 231 ref 152 278 317 353 CHECK_VERSION_NUMERIC 000366 constant entry internal dcl 195 ref 118 147 168 219 315 CLEAN_ALL_DEAD_IN_ALL_BJ 000660 constant entry internal dcl 359 ref 177 CLEAN_ALL_DEAD_IN_ONE_BJ 000466 constant entry internal dcl 255 ref 170 CLEAN_ONE_DEAD_IN_ALL_BJ 000546 constant entry internal dcl 291 ref 174 CLEAN_ONE_DEAD_IN_ONE_BJ 000631 constant entry internal dcl 327 ref 172 ERROR_RETURN 000346 constant entry internal dcl 186 ref 208 418 FIND_PROCESS_IX 001032 constant entry internal dcl 438 ref 306 346 GET_PROCESS_IX 000707 constant entry internal dcl 383 ref 124 IS_PROCESS_IN_CIT 000726 constant label dcl 402 MAIN_RETURN 000345 constant label dcl 183 ref 133 156 179 PROCESS_IS_DEAD 000662 constant entry internal dcl 367 ref 278 303 350 SET_PTRS 000402 constant entry internal dcl 213 ref 122 150 164 bj_pste_register$check_in 000073 constant entry external dcl 44 bj_pste_register$check_out 000200 constant entry external dcl 137 bj_pste_register$check_out_dead 000256 constant entry external dcl 160 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1376 1432 1152 1406 Length 1720 1152 34 252 224 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bj_pste_register$check_in 248 external procedure is an external procedure. ERROR_RETURN internal procedure shares stack frame of external procedure bj_pste_register$check_in. CHECK_VERSION_NUMERIC internal procedure shares stack frame of external procedure bj_pste_register$check_in. SET_PTRS internal procedure shares stack frame of external procedure bj_pste_register$check_in. CHECK_OUT internal procedure shares stack frame of external procedure bj_pste_register$check_in. CLEAN_ALL_DEAD_IN_ONE_BJ internal procedure shares stack frame of external procedure bj_pste_register$check_in. CLEAN_ONE_DEAD_IN_ALL_BJ internal procedure shares stack frame of external procedure bj_pste_register$check_in. CLEAN_ONE_DEAD_IN_ONE_BJ internal procedure shares stack frame of external procedure bj_pste_register$check_in. CLEAN_ALL_DEAD_IN_ALL_BJ internal procedure shares stack frame of external procedure bj_pste_register$check_in. PROCESS_IS_DEAD internal procedure shares stack frame of external procedure bj_pste_register$check_in. GET_PROCESS_IX internal procedure shares stack frame of external procedure bj_pste_register$check_in. FIND_PROCESS_IX internal procedure shares stack frame of external procedure bj_pste_register$check_in. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 process_ix bj_pste_register$check_in STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME bj_pste_register$check_in 000100 code bj_pste_register$check_in 000101 my_process_id bj_pste_register$check_in 000102 first_free_process_ix bj_pste_register$check_in 000103 this_process_ix bj_pste_register$check_in 000104 max_n_processes bj_pste_register$check_in 000105 max_n_journals bj_pste_register$check_in 000106 myname bj_pste_register$check_in 000116 bj_pst_ptr bj_pste_register$check_in 000120 bj_pste_ptr bj_pste_register$check_in 000122 bj_check_in_table_ptr bj_pste_register$check_in 000162 cadiob_journal_index CLEAN_ALL_DEAD_IN_ONE_BJ 000163 cadiob_number_of_live_processes CLEAN_ALL_DEAD_IN_ONE_BJ 000164 cadiob_process_index CLEAN_ALL_DEAD_IN_ONE_BJ 000165 cadiob_process_id CLEAN_ALL_DEAD_IN_ONE_BJ 000176 codiab_process_id CLEAN_ONE_DEAD_IN_ALL_BJ 000177 codiab_process_index CLEAN_ONE_DEAD_IN_ALL_BJ 000200 codiab_journal_index CLEAN_ONE_DEAD_IN_ALL_BJ 000210 codiob_process_id CLEAN_ONE_DEAD_IN_ONE_BJ 000211 codiob_process_index CLEAN_ONE_DEAD_IN_ONE_BJ 000212 codiob_journal_index CLEAN_ONE_DEAD_IN_ONE_BJ 000230 pid_code PROCESS_IS_DEAD 000240 gpi_first_free_process_index GET_PROCESS_IX 000241 gpi_have_process_index GET_PROCESS_IX 000242 gpi_this_process_id GET_PROCESS_IX 000243 gpi_this_process_index GET_PROCESS_IX 000254 fpi_process_id FIND_PROCESS_IX 000255 fpi_process_index FIND_PROCESS_IX THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. bj_report_err get_process_id_ hcs_$validate_processid THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bjm_data_$bj_pst_ptr dm_error_$bj_bad_pst_version dm_error_$bj_bad_pste_version dm_error_$bj_pst_cit_full dm_system_data_$bj_max_n_journals dm_system_data_$bj_max_n_processes LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 56 000055 44 000070 116 000101 117 000104 118 000110 122 000125 124 000126 127 000140 129 000160 130 000161 133 000175 137 000176 140 000206 142 000211 145 000216 146 000222 147 000224 150 000236 152 000237 156 000251 160 000252 163 000264 164 000267 166 000270 167 000275 168 000300 170 000313 172 000321 173 000331 174 000332 177 000343 179 000344 183 000345 186 000346 191 000350 193 000365 195 000366 208 000370 211 000401 213 000402 218 000403 219 000407 222 000421 224 000426 225 000431 227 000433 231 000434 242 000436 244 000454 247 000457 251 000465 255 000466 260 000470 269 000473 271 000476 273 000500 274 000507 276 000524 278 000527 280 000537 283 000540 285 000542 287 000545 291 000546 296 000550 302 000553 303 000555 306 000563 307 000565 310 000570 312 000577 315 000605 317 000621 319 000623 321 000625 323 000630 327 000631 341 000633 342 000636 344 000640 346 000642 347 000644 350 000647 353 000655 355 000657 359 000660 363 000661 367 000662 373 000664 375 000665 377 000676 379 000704 383 000707 393 000711 400 000715 402 000726 406 000741 410 000750 414 000756 416 000760 418 000762 423 000776 426 000777 428 001023 434 001026 438 001032 443 001034 448 001036 450 001040 452 001047 455 001056 457 001060 ----------------------------------------------------------- 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