COMPILATION LISTING OF SEGMENT pps_close Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 02/02/88 1648.6 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 pps_close: proc (iocb_ptr_arg, code); 12 13 14 15 /* PARAMETERS */ 16 17 18 dcl code fixed bin (35); 19 dcl iocb_ptr ptr; 20 21 22 /* ENTRY CONSTANTS */ 23 24 25 dcl default_handler_$set entry (entry); 26 dcl hcs_$reset_ips_mask entry (fixed bin (35), fixed bin (35)); 27 dcl hcs_$set_ips_mask entry (fixed bin (35), fixed bin (35)); 28 dcl iox_$propagate entry (ptr); 29 dcl pps_control entry (ptr, char (*), ptr, fixed bin (35)); 30 dcl pps_detach entry (ptr, fixed bin (35)); 31 dcl pps_open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 32 dcl pps_report_man_$stop entry (ptr, fixed bin (35)); 33 34 35 /* EXTERNAL DATA */ 36 37 38 39 40 /* BUILTIN FUNCTIONS */ 41 42 43 dcl addr builtin; 44 dcl null builtin; 45 46 47 /* AUTOMATIC STORAGE */ 48 49 50 dcl iocb_ptr_arg ptr; 51 dcl mask fixed bin (35); 52 53 54 /* CONSTANTS */ 55 56 57 58 59 /* INTERNAL STATIC */ 60 61 62 63 64 /* BASED VARIABLES */ 65 66 /* 67* 68* Initialize necessary data. 69* 70**/ 71 72 73 code = 0; 74 mask = 0; 75 iocb_ptr = iocb_ptr_arg -> iocb.actual_iocb_ptr; 76 ppsab_ptr = iocb.attach_data_ptr; 77 78 call default_handler_$set (Default_Condition_Handler); 79 80 81 /* 82* 83* Now close the I/O switch. 84* 85**/ 86 87 88 call hcs_$set_ips_mask (0, mask); 89 90 iocb.open_descrip_ptr = null (); 91 iocb.open = pps_open; 92 iocb.detach_iocb = pps_detach; 93 iocb.control = pps_control; 94 call iox_$propagate (iocb_ptr); 95 96 call hcs_$reset_ips_mask (mask, mask); 97 98 99 /* 100* 101* Terminate the current output report (close and detach target I/O switch). 102* 103**/ 104 105 106 call pps_report_man_$stop (iocb_ptr, code); 107 108 109 return; 110 111 /* 112* 113* Internal procedure to handle faults while IPS interrupts are masked. While not masked, any signals are simply 114* passed on up the stack to their normal handlers. For a fault while masked, the process is terminated (with the 115* reason "unable to do critical I/O") because the I/O control blocks are in an inconsistent state, and we can 116* tolerate neither spawning a command loop with interrupts masked nor a restart with a possibly changed mask. 117* 118**/ 119 120 121 Default_Condition_Handler: proc (p1, name, p2, p3, continue); 122 123 124 dcl continue bit (1) aligned; 125 dcl error_table_$unable_to_do_io fixed (35) ext; 126 dcl name char (*); 127 dcl p1 ptr; 128 dcl p2 ptr; 129 dcl p3 ptr; 130 dcl terminate_process_ entry (char (*), ptr); 131 132 dcl 1 ti aligned, 133 2 version fixed, 134 2 code fixed (35); 135 136 137 if mask ^= 0 then do; 138 ti.version = 0; 139 ti.code = error_table_$unable_to_do_io; 140 call terminate_process_ ("fatal_error", addr (ti)); 141 end; 142 if name ^= "cleanup" then continue = "1"b; 143 return; 144 145 146 end Default_Condition_Handler; 147 1 1 1 2 dcl 1 iocb aligned based (iocb_ptr), 1 3 /* I/O control block. */ 1 4 2 iocb_version fixed init (1), /* Version number of structure. */ 1 5 2 name char (32), /* I/O name of this block. */ 1 6 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 7 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 8 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 9 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 10 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 11 2 reserved bit (72), /* Reserved for future use. */ 1 12 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 13 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 14 /* open(p,mode,not_used,s) */ 1 15 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 16 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 17 /* get_line(p,bufptr,buflen,actlen,s) */ 1 18 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 19 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 20 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 21 /* put_chars(p,bufptr,buflen,s) */ 1 22 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 23 /* modes(p,newmode,oldmode,s) */ 1 24 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 25 /* position(p,u1,u2,s) */ 1 26 2 control entry (ptr, char (*), ptr, fixed (35)), 1 27 /* control(p,order,infptr,s) */ 1 28 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 29 /* read_record(p,bufptr,buflen,actlen,s) */ 1 30 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 31 /* write_record(p,bufptr,buflen,s) */ 1 32 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 33 /* rewrite_record(p,bufptr,buflen,s) */ 1 34 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 35 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 36 /* seek_key(p,key,len,s) */ 1 37 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 38 /* read_key(p,key,len,s) */ 1 39 2 read_length entry (ptr, fixed (21), fixed (35)); 1 40 /* read_length(p,len,s) */ 1 41 148 149 2 1 /* Begin include file ... pps_attach_block.incl.pl1 */ 2 2 2 3 2 4 dcl pps_attach_block_version_1 fixed bin static internal options (constant) init (1); 2 5 dcl ppsab_ptr ptr; 2 6 2 7 dcl 1 ppsab based (ppsab_ptr) aligned, 2 8 2 version fixed bin, 2 9 2 attach_descrip char (256) varying, 2 10 2 target_name char (32) unal, 2 11 2 target_attach_descrip char (256) unal, 2 12 2 detach_time_attach_descrip char (256) unal, 2 13 2 target_iocb_ptr ptr, 2 14 2 modes, 2 15 3 debug bit (1) unal, 2 16 3 no_print bit (1) unal, 2 17 3 single_page bit (1) unal, 2 18 2 ppscb_dir char (168) unal, 2 19 2 ppscb_entry char (32) unal, 2 20 2 ppscb_name char (32) unal, 2 21 2 ppscb_ptr ptr, 2 22 2 tape_density fixed bin, 2 23 2 file_number fixed bin, 2 24 2 file_name char (17), 2 25 2 retain_option char (4) varying, 2 26 2 volids char (256) varying, 2 27 2 open_descrip char (256) varying, 2 28 2 table_ptr ptr, 2 29 2 mvt_entry entry, 2 30 2 stop_every fixed bin (71), 2 31 2 stop_count fixed bin (71), 2 32 2 chars_printed fixed bin (35), 2 33 2 paper_info, 2 34 3 cpii fixed bin, 2 35 3 lpii fixed bin, 2 36 3 swi fixed bin, 2 37 3 sli fixed bin, 2 38 2 pps_pci like pci; 2 39 3 1 3 2 /* BEGIN INCLUDE FILE ... prt_conv_info.incl.pl1 */ 3 3 /* Modified: 12 September 1980 by G. Palter */ 3 4 3 5 3 6 /****^ HISTORY COMMENTS: 3 7* 1) change(87-05-10,Gilcrease), approve(87-07-31,MCR7686), 3 8* audit(88-02-01,Farley), install(88-02-02,MR12.2-1019): 3 9* Add modes.line_nbrs, flags.(eol eof) bits for eor -nb. 3 10* END HISTORY COMMENTS */ 3 11 3 12 3 13 dcl pcip ptr; /* pointer to conversion info structure */ 3 14 3 15 dcl 1 pci based (pcip) aligned, /* printer conversion info structure */ 3 16 2 cv_proc ptr, /* pointer to character conversion procedure */ 3 17 2 lmarg fixed bin, /* left margin indentation */ 3 18 2 rmarg fixed bin, /* right margin limit */ 3 19 2 page_length fixed bin, /* number of lines on page */ 3 20 2 phys_line_length fixed bin, /* physical width of paper */ 3 21 2 phys_page_length fixed bin, /* physical length of paper */ 3 22 2 lpi fixed bin, /* lines per inch */ 3 23 2 sheets_per_page fixed bin, /* sheets of paper per logical page */ 3 24 2 line_count fixed bin, /* count of converted lines */ 3 25 2 page_count fixed bin, /* count of converted pages */ 3 26 2 func fixed bin, /* special conversion function */ 3 27 /* 0 => normal conversion */ 3 28 /* 1 => change NL to FF */ 3 29 /* 2 => change NL to top inside page */ 3 30 /* 3 => change NL to end of page */ 3 31 /* 4 => change NL to top of outside page */ 3 32 (2 modes, /* conversion modes */ 3 33 3 overflow_off bit (1), /* "1"b to suppress end of page overflow */ 3 34 3 single_space bit (1), /* "1"b to change all forms advance chars to NL */ 3 35 3 non_edited bit (1), /* "1"b to print ASCII control chars */ 3 36 3 truncate bit (1), /* "1"b to truncate lines that are too long */ 3 37 3 esc bit (1), /* "1"b to process ESC character */ 3 38 3 ctl_char bit (1), /* "1"b to output control characters */ 3 39 3 line_nbrs bit (1), /* "1"b to output line numbers */ 3 40 3 pci_pad bit (5), 3 41 2 flags, /* flags internal to prt_conv_ */ 3 42 3 ignore_next_ff bit (1), /* ON => prt_conv_ just output a FF; ignore next character if 3 43* it's a FF */ 3 44 3 eol bit (1), /* "1"b = end-of-line encountered */ 3 45 3 eof bit (1), /* "1"b = end-of-segment encountered */ 3 46 3 flags_pad bit (3), 3 47 2 coroutine_modes, 3 48 3 upper_case bit(1), /* "1"b to convert to upper case */ 3 49 3 ht bit(1), /* "1"b to skip tab conversion */ 3 50 3 coroutine_pad bit(13), 3 51 3 slew_table_idx bit(3) ) unal, /* slew table index */ 3 52 2 top_label_line char (136), /* contains an optional top of page label */ 3 53 2 bot_label_line char (136), /* contains an optional bottom of page label */ 3 54 2 top_label_length fixed bin, /* length of top label line */ 3 55 2 bot_label_length fixed bin, /* length of bottom label line */ 3 56 2 form_stops (256) unal, /* logical form stops */ 3 57 3 lbits bit (9), /* leftmost bits */ 3 58 3 rbits bit (9), /* rightmost bits */ 3 59 3 60 /* The following items are for internal use by the print conversion procedure. 3 61* They should be zeroed once and then never referenced again. */ 3 62 3 63 2 level fixed bin, /* overstrike level */ 3 64 2 pos fixed bin, /* print position at end of incomplete line */ 3 65 2 line fixed bin, /* current line number */ 3 66 2 slew_residue fixed bin, /* number of lines remaining to be slewed */ 3 67 2 label_nelem fixed bin, /* characters remaining in label */ 3 68 2 label_wksp ptr, /* pointer to label being processed */ 3 69 2 sav_pos fixed bin, /* position saved during label processing */ 3 70 2 esc_state fixed bin, /* state of ESC processing */ 3 71 2 esc_num fixed bin, /* number following ESC sequence */ 3 72 2 temp bit (36); /* conversion proc temporary */ 3 73 3 74 /* End of include file ...... prt_conv_info.incl.pl1 */ 3 75 2 40 2 41 2 42 2 43 /* End include file ... pps_attach_block.incl.pl1 */ 150 151 152 153 end pps_close; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 02/02/88 1540.0 pps_close.pl1 >special_ldd>install>MR12.2-1019>pps_close.pl1 148 1 07/02/81 1905.0 iocbv.incl.pl1 >ldd>include>iocbv.incl.pl1 150 2 03/27/82 0438.0 pps_attach_block.incl.pl1 >ldd>include>pps_attach_block.incl.pl1 2-40 3 02/02/88 1529.2 prt_conv_info.incl.pl1 >special_ldd>install>MR12.2-1019>prt_conv_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. actual_iocb_ptr 12 based pointer level 2 dcl 1-2 ref 75 addr builtin function dcl 43 ref 140 140 attach_data_ptr 16 based pointer level 2 dcl 1-2 ref 76 code parameter fixed bin(35,0) dcl 18 in procedure "pps_close" set ref 11 73* 106* code 1 000100 automatic fixed bin(35,0) level 2 in structure "ti" dcl 132 in procedure "Default_Condition_Handler" set ref 139* continue parameter bit(1) dcl 124 set ref 121 142* control 66 based entry variable level 2 dcl 1-2 set ref 93* default_handler_$set 000010 constant entry external dcl 25 ref 78 detach_iocb 26 based entry variable level 2 dcl 1-2 set ref 92* error_table_$unable_to_do_io 000030 external static fixed bin(35,0) dcl 125 ref 139 hcs_$reset_ips_mask 000012 constant entry external dcl 26 ref 96 hcs_$set_ips_mask 000014 constant entry external dcl 27 ref 88 iocb based structure level 1 dcl 1-2 iocb_ptr 000100 automatic pointer dcl 19 set ref 75* 76 90 91 92 93 94* 106* iocb_ptr_arg parameter pointer dcl 50 ref 11 75 iox_$propagate 000016 constant entry external dcl 28 ref 94 mask 000102 automatic fixed bin(35,0) dcl 51 set ref 74* 88* 96* 96* 137 name parameter char unaligned dcl 126 ref 121 142 null builtin function dcl 44 ref 90 open 32 based entry variable level 2 dcl 1-2 set ref 91* open_descrip_ptr 20 based pointer level 2 dcl 1-2 set ref 90* p1 parameter pointer dcl 127 ref 121 p2 parameter pointer dcl 128 ref 121 p3 parameter pointer dcl 129 ref 121 pci based structure level 1 dcl 3-15 pps_control 000020 constant entry external dcl 29 ref 93 pps_detach 000022 constant entry external dcl 30 ref 92 pps_open 000024 constant entry external dcl 31 ref 91 pps_report_man_$stop 000026 constant entry external dcl 32 ref 106 ppsab_ptr 000104 automatic pointer dcl 2-5 set ref 76* terminate_process_ 000032 constant entry external dcl 130 ref 140 ti 000100 automatic structure level 1 dcl 132 set ref 140 140 version 000100 automatic fixed bin(17,0) level 2 dcl 132 set ref 138* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. pcip automatic pointer dcl 3-13 pps_attach_block_version_1 internal static fixed bin(17,0) initial dcl 2-4 ppsab based structure level 1 dcl 2-7 NAMES DECLARED BY EXPLICIT CONTEXT. Default_Condition_Handler 000132 constant entry internal dcl 121 ref 78 78 pps_close 000021 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 370 424 212 400 Length 662 212 34 222 155 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME pps_close 86 external procedure is an external procedure. Default_Condition_Handler 84 internal procedure is assigned to an entry variable. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME Default_Condition_Handler 000100 ti Default_Condition_Handler pps_close 000100 iocb_ptr pps_close 000102 mask pps_close 000104 ppsab_ptr pps_close THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry int_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. default_handler_$set hcs_$reset_ips_mask hcs_$set_ips_mask iox_$propagate pps_control pps_detach pps_open pps_report_man_$stop terminate_process_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$unable_to_do_io LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000015 73 000026 74 000030 75 000031 76 000035 78 000037 88 000050 90 000062 91 000065 92 000072 93 000075 94 000100 96 000106 106 000116 109 000130 121 000131 137 000145 138 000150 139 000151 140 000153 142 000175 143 000206 ----------------------------------------------------------- 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