COMPILATION LISTING OF SEGMENT log_initialize_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1025.8 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* *********************************************************** */ 8 log_initialize_: 9 procedure (P_old_log_ptr, P_new_log_ptr, P_log_size, P_prev_dname, P_code); 10 11 /* * This procedure initializes a new log segment, either cleaning out 12* * the header entirely, or copying all pertinent information from the 13* * header of a previous log. If P_old_log_ptr is null, the P_prev_dname 14* * is ignored. 15* * 16* * Written 84-05-05, W. Olin Sibert 17* */ 18 19 declare P_old_log_ptr pointer parameter; 20 declare P_new_log_ptr pointer parameter; 21 declare P_log_size fixed bin (18) parameter; 22 declare P_prev_dname char (*) parameter; 23 declare P_code fixed bin (35) parameter; 24 25 declare old_log_ptr pointer; 26 declare new_log_ptr pointer; 27 declare log_size fixed bin (18); 28 declare code fixed bin (35); 29 declare last_message fixed bin (35); 30 31 declare error_table_$log_segment_damaged fixed bin (35) external static; 32 33 declare log_segment_$initialize_sequence entry (pointer, fixed bin (35), fixed bin (35)); 34 declare log_segment_$last_message_info entry (pointer, fixed bin (35), fixed bin (18), fixed bin (35)); 35 declare log_segment_$place_in_service entry (pointer, fixed bin (35)); 36 declare log_segment_$remove_from_service entry (pointer, fixed bin (35)); 37 38 declare (clock, null, size, unspec) builtin; 39 40 /* */ 41 42 old_log_ptr = P_old_log_ptr; 43 new_log_ptr = P_new_log_ptr; 44 log_size = P_log_size; 45 46 if (old_log_ptr = null ()) then 47 call initialize_new_log (); 48 else call copy_old_log (); 49 50 call log_segment_$place_in_service (new_log_ptr, (0)); /* Had better work.... */ 51 52 P_code = code; 53 return; 54 55 56 57 initialize_new_log: 58 procedure (); 59 60 code = 0; 61 log_segment_ptr = new_log_ptr; 62 63 unspec (log_segment.header) = ""b; 64 65 log_segment.max_size = log_size - size (log_segment_header); 66 67 /* All sys logs start with message 100000, to make output formatting more pleasant */ 68 69 call log_segment_$initialize_sequence (log_segment_ptr, 999999, (0)); 70 71 log_segment.previous_log_dir = ""; /* Since there was no old log */ 72 log_segment.time_created = clock (); /* Record time of creation */ 73 log_segment.version = LOG_SEGMENT_VERSION_1; 74 75 return; 76 end initialize_new_log; 77 78 /* */ 79 80 copy_old_log: 81 procedure (); 82 83 code = 0; 84 log_segment_ptr = null (); /* Since we don't use it here */ 85 86 if (old_log_ptr -> log_segment.version ^= LOG_SEGMENT_VERSION_1) then do; 87 code = error_table_$log_segment_damaged; 88 return; 89 end; 90 91 unspec (new_log_ptr -> log_segment.header) = ""b; 92 93 new_log_ptr -> log_segment.max_size = log_size - size (log_segment_header); 94 95 call log_segment_$remove_from_service (old_log_ptr, (0)); 96 call log_segment_$last_message_info (old_log_ptr, last_message, (0), (0)); 97 call log_segment_$initialize_sequence (new_log_ptr, last_message, (0)); 98 99 new_log_ptr -> log_segment.previous_log_dir = P_prev_dname; 100 101 new_log_ptr -> log_segment.listener = old_log_ptr -> log_segment.listener; 102 new_log_ptr -> log_segment.last_wakeup_time = old_log_ptr -> log_segment.last_wakeup_time; 103 new_log_ptr -> log_segment.wakeup_delta = old_log_ptr -> log_segment.wakeup_delta; 104 105 new_log_ptr -> log_segment.time_created = clock (); /* Record when this happened */ 106 new_log_ptr -> log_segment.version = LOG_SEGMENT_VERSION_1; 107 108 return; 109 end copy_old_log; 110 111 /* BEGIN INCLUDE FILE ... log_segment.incl.pl1 ... 84-05-03 ... W. Olin Sibert */ 1 2 1 3 declare log_segment_ptr pointer; 1 4 declare log_segment_max_size fixed bin (18); 1 5 declare LOG_SEGMENT_VERSION_1 char (8) internal static options (constant) init ("SysLog01"); 1 6 1 7 1 8 declare 1 log_segment aligned based (log_segment_ptr), 1 9 2 header aligned like log_segment_header, 1 10 2 data dim (log_segment_max_size refer (log_segment.max_size)) bit (36) aligned; 1 11 1 12 1 13 declare 1 log_segment_header aligned based, 1 14 2 version char (8) unaligned, /* LOG_SEGMENT_VERSION_1 */ 1 15 2 time_created fixed bin (71), /* When the segment header was initialized */ 1 16 2 previous_log_dir char (168) unaligned, /* Directory containing previous log segment */ 1 17 1 18 2 limits, 1 19 3 first_sequence fixed bin (35), /* First and last sequence numbers / time stamps */ 1 20 3 last_sequence fixed bin (35), /* of messages in the log. These may be slightly */ 1 21 3 first_time fixed bin (71), /* incorrect due to lockless updating strategy */ 1 22 3 last_time fixed bin (71), 1 23 1 24 2 alloc_info, /* Complex STACQ hack for allocating and assigning */ 1 25 3 word_1 fixed bin (18), /* sequence numbers locklessly. See log_segment_ */ 1 26 3 word_2 bit (36) aligned, /* for details of strategy */ 1 27 2 max_size fixed bin (18), /* Total words in data area */ 1 28 1 29 2 listeners_registered bit (1) aligned, /* Set if ANY processes were ever registered-- it's only */ 1 30 2 listener_bootload_time fixed bin (71), /* kept here for efficiency. The bootload time is used to */ 1 31 /* detect all the dead listeners after a reboot */ 1 32 2 listener (25), /* Processes waiting for messages in the log */ 1 33 3 process_id bit (36) aligned, 1 34 3 event_channel fixed bin (71) unaligned, /* Saves space-- allows 3-word entries */ 1 35 1 36 2 last_wakeup_time fixed bin (71), /* When last wakeup was sent */ 1 37 2 wakeup_delta fixed bin (71), /* Wakeups sent no more than once per this interval */ 1 38 1 39 2 pad (6) fixed bin (71); /* Pad header to 150 words */ 1 40 1 41 1 42 declare LOG_SEGMENT_NEW_MESSAGE init ("777111555333"b3) bit (36) aligned internal static options (constant); 1 43 declare LOG_SEGMENT_COMPLETE_MESSAGE init ("666000444222"b3) bit (36) aligned internal static options (constant); 1 44 1 45 /* END INCLUDE FILE ... log_segment.incl.pl1 */ 111 112 113 end log_initialize_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0801.8 log_initialize_.pl1 >spec>install>1111>log_initialize_.pl1 111 1 12/04/84 2124.9 log_segment.incl.pl1 >ldd>include>log_segment.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. LOG_SEGMENT_VERSION_1 000000 constant char(8) initial packed unaligned dcl 1-5 ref 73 86 106 P_code parameter fixed bin(35,0) dcl 23 set ref 8 52* P_log_size parameter fixed bin(18,0) dcl 21 ref 8 44 P_new_log_ptr parameter pointer dcl 20 ref 8 43 P_old_log_ptr parameter pointer dcl 19 ref 8 42 P_prev_dname parameter char packed unaligned dcl 22 ref 8 99 clock builtin function dcl 38 ref 72 105 code 000105 automatic fixed bin(35,0) dcl 28 set ref 52 60* 83* 87* error_table_$log_segment_damaged 000010 external static fixed bin(35,0) dcl 31 ref 87 header based structure level 2 dcl 1-8 set ref 63* 91* last_message 000106 automatic fixed bin(35,0) dcl 29 set ref 96* 97* last_wakeup_time 206 based fixed bin(71,0) level 3 dcl 1-8 set ref 102* 102 listener 72 based structure array level 3 dcl 1-8 set ref 101* 101 log_segment based structure level 1 dcl 1-8 log_segment_$initialize_sequence 000012 constant entry external dcl 33 ref 69 97 log_segment_$last_message_info 000014 constant entry external dcl 34 ref 96 log_segment_$place_in_service 000016 constant entry external dcl 35 ref 50 log_segment_$remove_from_service 000020 constant entry external dcl 36 ref 95 log_segment_header based structure level 1 dcl 1-13 ref 65 93 log_segment_ptr 000110 automatic pointer dcl 1-3 set ref 61* 63 65 69* 71 72 73 84* log_size 000104 automatic fixed bin(18,0) dcl 27 set ref 44* 65 93 max_size 66 based fixed bin(18,0) level 3 dcl 1-8 set ref 65* 93* new_log_ptr 000102 automatic pointer dcl 26 set ref 43* 50* 61 91 93 97* 99 101 102 103 105 106 null builtin function dcl 38 ref 46 84 old_log_ptr 000100 automatic pointer dcl 25 set ref 42* 46 86 95* 96* 101 102 103 previous_log_dir 4 based char(168) level 3 packed packed unaligned dcl 1-8 set ref 71* 99* size builtin function dcl 38 ref 65 93 time_created 2 based fixed bin(71,0) level 3 dcl 1-8 set ref 72* 105* unspec builtin function dcl 38 set ref 63* 91* version based char(8) level 3 packed packed unaligned dcl 1-8 set ref 73* 86 106* wakeup_delta 210 based fixed bin(71,0) level 3 dcl 1-8 set ref 103* 103 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. LOG_SEGMENT_COMPLETE_MESSAGE internal static bit(36) initial dcl 1-43 LOG_SEGMENT_NEW_MESSAGE internal static bit(36) initial dcl 1-42 log_segment_max_size automatic fixed bin(18,0) dcl 1-4 NAMES DECLARED BY EXPLICIT CONTEXT. copy_old_log 000134 constant entry internal dcl 80 ref 48 initialize_new_log 000070 constant entry internal dcl 57 ref 46 log_initialize_ 000017 constant entry external dcl 8 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 360 402 253 370 Length 572 253 22 154 105 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME log_initialize_ 122 external procedure is an external procedure. initialize_new_log internal procedure shares stack frame of external procedure log_initialize_. copy_old_log internal procedure shares stack frame of external procedure log_initialize_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME log_initialize_ 000100 old_log_ptr log_initialize_ 000102 new_log_ptr log_initialize_ 000104 log_size log_initialize_ 000105 code log_initialize_ 000106 last_message log_initialize_ 000110 log_segment_ptr log_initialize_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac ext_entry_desc clock_mac THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. log_segment_$initialize_sequence log_segment_$last_message_info log_segment_$place_in_service log_segment_$remove_from_service THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$log_segment_damaged LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 8 000012 42 000032 43 000036 44 000041 46 000043 48 000051 50 000052 52 000064 53 000067 57 000070 60 000071 61 000072 63 000074 65 000100 69 000103 71 000121 72 000125 73 000130 75 000133 80 000134 83 000135 84 000136 86 000140 87 000145 88 000150 91 000151 93 000155 95 000160 96 000172 97 000211 99 000225 101 000234 102 000240 103 000242 105 000244 106 000247 108 000252 ----------------------------------------------------------- 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