COMPILATION LISTING OF SEGMENT terminate_file_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 12/17/85 1340.0 mst Tue Options: optimize map single_symbol_list 1 /****^ ****************************************************** 2* * * 3* * Copyright (c) 1985 by Massachusetts Institute of * 4* * Technology and Honeywell Information Systems, Inc. * 5* * * 6* * Copyright (c) 1972 by Massachusetts Institute of * 7* * Technology and Honeywell Information Systems, Inc. * 8* * * 9* ****************************************************** */ 10 11 /****^ HISTORY COMMENTS: 12* 1) change(85-09-12,Spitzer), approve(85-09-12,MCR7265), 13* audit(85-09-13,Blair): Bugfix. Don't attempt further operations on the 14* segptr if the segment is actually deleted. 15* END HISTORY COMMENTS */ 16 /* Utility subroutine to perform standard completion operations when a program has finished with a segment. 17* 18* Written 25 July 1980 by M. N. Davidoff after THVV suggested at the right 19* time of the week, Friday 6:00, that doing force_writes in some 20* places would improve reliablity. 21* Modified 26 Aug 1985 by C Spitzer. If successful delete, don't attempt to 22* do the rest of the options. 23**/ 24 /* format: style2 */ 25 terminate_file_: 26 procedure (P_seg_ptr, P_bit_count, P_switches, P_code); 27 28 declare P_seg_ptr pointer; /* (Input/Output) segment to finish, 29* set to null after segment is terminated */ 30 declare P_bit_count fixed binary (24); /* (Input) number of used bits */ 31 declare P_switches bit (*); /* (Input) control switches */ 32 declare P_code fixed binary (35); /* (Output) standard status code */ 33 34 /* automatic */ 35 36 declare bit_count fixed binary (24); 37 declare code fixed binary (35); 38 declare seg_ptr pointer; 39 declare 1 tfs aligned like terminate_file_switches; 40 41 /* based */ 42 43 declare segment bit (36 * sys_info$max_seg_size) based; 44 45 /* builtin */ 46 47 declare (divide, mod, null, pointer, string, substr) 48 builtin; 49 50 /* external static */ 51 52 declare error_table_$invalidsegno 53 fixed binary (35) external static; 54 declare sys_info$max_seg_size fixed binary (19) external static; 55 56 /* entry */ 57 58 declare delete_$ptr entry (pointer, bit (6), character (*), fixed binary (35)); 59 declare hcs_$force_write entry (pointer, bit (36), fixed binary (35)); 60 declare hcs_$set_bc_seg entry (pointer, fixed binary (24), fixed binary (35)); 61 declare hcs_$terminate_noname entry (pointer, fixed binary (35)); 62 declare hcs_$truncate_seg entry (pointer, fixed binary (19), fixed binary (35)); 63 1 1 /* BEGIN INCLUDE FILE ... terminate_file.incl.pl1 */ 1 2 /* format: style2,^inddcls,idind32 */ 1 3 1 4 declare 1 terminate_file_switches based, 1 5 2 truncate bit (1) unaligned, 1 6 2 set_bc bit (1) unaligned, 1 7 2 terminate bit (1) unaligned, 1 8 2 force_write bit (1) unaligned, 1 9 2 delete bit (1) unaligned; 1 10 1 11 declare TERM_FILE_TRUNC bit (1) internal static options (constant) initial ("1"b); 1 12 declare TERM_FILE_BC bit (2) internal static options (constant) initial ("01"b); 1 13 declare TERM_FILE_TRUNC_BC bit (2) internal static options (constant) initial ("11"b); 1 14 declare TERM_FILE_TERM bit (3) internal static options (constant) initial ("001"b); 1 15 declare TERM_FILE_TRUNC_BC_TERM bit (3) internal static options (constant) initial ("111"b); 1 16 declare TERM_FILE_FORCE_WRITE bit (4) internal static options (constant) initial ("0001"b); 1 17 declare TERM_FILE_DELETE bit (5) internal static options (constant) initial ("00001"b); 1 18 1 19 /* END INCLUDE FILE ... terminate_file.incl.pl1 */ 64 2 1 /* BEGIN INCLUDE FILE ... force_write_flags.incl.pl1 ... Created January 1977 */ 2 2 2 3 dcl fwfp ptr; 2 4 2 5 dcl 1 force_write_flags aligned based (fwfp), 2 6 2 priority_write bit (1) unal, /* "1"b if request to be queued for priority write */ 2 7 /* "0"b if request to be queued for normal write */ 2 8 2 serial_write bit (1) unal, /* "1"b if force write to be done serially */ 2 9 /* "0"b if force write to be done in parallel */ 2 10 2 lru_or_mru bit (1) unal, /* "1"b thread force written pages into list as mru */ 2 11 /* "0"b thread force written pages into lru list */ 2 12 2 mbz bit (33) unal; 2 13 2 14 /* END INCLUDE FILE ... force_write_flags.incl.pl1 */ 65 66 67 /* program */ 68 69 P_code = 0; 70 seg_ptr = P_seg_ptr; 71 bit_count = P_bit_count; 72 string (tfs) = P_switches; 73 74 if seg_ptr = null 75 then return; 76 77 seg_ptr = pointer (seg_ptr, 0); 78 79 /* Completion operations continue if code ^= 0 since the caller is done with 80* the segment, and there is nothing left to do with this segment except the 81* stuff below. Might as well do as much as we can. */ 82 83 84 /* We continue in delete case, in case it fails and user has set other */ 85 /* bits that we can do */ 86 87 if tfs.delete 88 then do; 89 call delete_$ptr (seg_ptr, "100111"b, "", code); /* Force, dont question, dirs and segs ignored, links okay, chase them. "" for unised questioner name. */ 90 P_code = code; 91 if code = 0 92 then return; /* no other options make sense after deleting */ 93 end; 94 95 if tfs.truncate 96 then do; 97 substr (seg_ptr -> segment, bit_count + 1, mod (-bit_count, 36)) = ""b; 98 99 call hcs_$truncate_seg (seg_ptr, divide (bit_count + 35, 36, 19), code); 100 if code ^= 0 101 then P_code = code; 102 end; 103 104 if tfs.set_bc 105 then do; 106 call hcs_$set_bc_seg (seg_ptr, bit_count, code); 107 if code ^= 0 & P_code = 0 108 then P_code = code; 109 end; 110 111 if tfs.force_write 112 then begin; 113 declare 1 fwf aligned like force_write_flags; 114 115 string (fwf) = ""b; 116 call hcs_$force_write (seg_ptr, string (fwf), code); 117 if code ^= 0 & code ^= error_table_$invalidsegno & P_code = 0 118 then P_code = code; 119 end; 120 121 if tfs.terminate 122 then do; 123 P_seg_ptr = null; 124 call hcs_$terminate_noname (seg_ptr, code); 125 if code ^= 0 & P_code = 0 126 then P_code = code; 127 end; 128 end terminate_file_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 12/17/85 1315.4 terminate_file_.pl1 >spec>install>1001>terminate_file_.pl1 64 1 04/06/83 1239.4 terminate_file.incl.pl1 >ldd>include>terminate_file.incl.pl1 65 2 11/16/78 0718.7 force_write_flags.incl.pl1 >ldd>include>force_write_flags.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) P_bit_count parameter fixed bin(24,0) dcl 30 ref 25 71 P_code parameter fixed bin(35,0) dcl 32 set ref 25 69* 90* 100* 107 107* 117 117* 125 125* P_seg_ptr parameter pointer dcl 28 set ref 25 70 123* P_switches parameter bit unaligned dcl 31 ref 25 72 TERM_FILE_BC internal static bit(2) initial unaligned dcl 1-12 TERM_FILE_DELETE internal static bit(5) initial unaligned dcl 1-17 TERM_FILE_FORCE_WRITE internal static bit(4) initial unaligned dcl 1-16 TERM_FILE_TERM internal static bit(3) initial unaligned dcl 1-14 TERM_FILE_TRUNC internal static bit(1) initial unaligned dcl 1-11 TERM_FILE_TRUNC_BC internal static bit(2) initial unaligned dcl 1-13 TERM_FILE_TRUNC_BC_TERM internal static bit(3) initial unaligned dcl 1-15 bit_count 000100 automatic fixed bin(24,0) dcl 36 set ref 71* 97 97 99 99 106* code 000101 automatic fixed bin(35,0) dcl 37 set ref 89* 90 91 99* 100 100 106* 107 107 116* 117 117 117 124* 125 125 delete 0(04) 000104 automatic bit(1) level 2 packed unaligned dcl 39 set ref 87 delete_$ptr 000014 constant entry external dcl 58 ref 89 divide builtin function dcl 47 ref 99 99 error_table_$invalidsegno 000010 external static fixed bin(35,0) dcl 52 ref 117 force_write 0(03) 000104 automatic bit(1) level 2 packed unaligned dcl 39 set ref 111 force_write_flags based structure level 1 dcl 2-5 fwf 000105 automatic structure level 1 dcl 113 set ref 115* 116 116 fwfp automatic pointer dcl 2-3 hcs_$force_write 000016 constant entry external dcl 59 ref 116 hcs_$set_bc_seg 000020 constant entry external dcl 60 ref 106 hcs_$terminate_noname 000022 constant entry external dcl 61 ref 124 hcs_$truncate_seg 000024 constant entry external dcl 62 ref 99 mod builtin function dcl 47 ref 97 null builtin function dcl 47 ref 74 123 pointer builtin function dcl 47 ref 77 seg_ptr 000102 automatic pointer dcl 38 set ref 70* 74 77* 77 89* 97 99* 106* 116* 124* segment based bit unaligned dcl 43 set ref 97* set_bc 0(01) 000104 automatic bit(1) level 2 packed unaligned dcl 39 set ref 104 string builtin function dcl 47 set ref 72* 115* 116 116 substr builtin function dcl 47 set ref 97* sys_info$max_seg_size 000012 external static fixed bin(19,0) dcl 54 ref 97 terminate 0(02) 000104 automatic bit(1) level 2 packed unaligned dcl 39 set ref 121 terminate_file_ 000015 constant entry external dcl 25 terminate_file_switches based structure level 1 packed unaligned dcl 1-4 tfs 000104 automatic structure level 1 dcl 39 set ref 72* truncate 000104 automatic bit(1) level 2 packed unaligned dcl 39 set ref 95 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 374 422 256 404 Length 640 256 26 201 115 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME terminate_file_ 102 external procedure is an external procedure. begin block on line 111 begin block shares stack frame of external procedure terminate_file_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME terminate_file_ 000100 bit_count terminate_file_ 000101 code terminate_file_ 000102 seg_ptr terminate_file_ 000104 tfs terminate_file_ 000105 fwf begin block on line 111 THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return mod_fx1 ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. delete_$ptr hcs_$force_write hcs_$set_bc_seg hcs_$terminate_noname hcs_$truncate_seg THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$invalidsegno sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 25 000010 69 000030 70 000032 71 000035 72 000037 74 000045 77 000051 87 000053 89 000056 90 000104 91 000107 95 000110 97 000113 99 000123 100 000142 104 000146 106 000151 107 000164 111 000173 115 000176 116 000177 117 000214 121 000226 123 000231 124 000234 125 000245 128 000254 ----------------------------------------------------------- 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