COMPILATION LISTING OF SEGMENT imft_find_input_switch_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 08/08/88 1504.8 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 8 /* Searches a list of I/O switches for the first one for which input is available: if there is no input, optionally block 9* until some becomes available */ 10 11 /* Created: April 1982 by G. Palter */ 12 13 /* format: style4,delnl,insnl,ifthenstmt,ifthen */ 14 15 16 imft_find_input_switch_: 17 procedure (P_fis_info_ptr, P_block, P_switch, P_code); 18 19 20 /* Parameters */ 21 22 dcl P_fis_info_ptr pointer parameter; /* -> the list of switche s */ 23 dcl P_block bit (1) aligned parameter; /* ON => block if no input available */ 24 dcl P_switch fixed binary parameter; /* set to index of switch with input (if any) */ 25 dcl P_code fixed binary (35) parameter; 26 27 28 /* Remaining declarations */ 29 30 dcl 1 rsi aligned like tty_read_status_info; 31 32 dcl 1 ewi aligned like event_wait_info; 33 34 dcl idx fixed binary; 35 36 dcl error_table_$bad_arg fixed binary (35) external; 37 dcl error_table_$unimplemented_version fixed binary (35) external; 38 39 dcl convert_ipc_code_ entry (fixed binary (35)); 40 dcl iox_$control entry (pointer, character (*), pointer, fixed binary (35)); 41 dcl ipc_$block entry (pointer, pointer, fixed binary (35)); 42 43 dcl addr builtin; 44 45 /* */ 46 47 fis_info_ptr = P_fis_info_ptr; 48 49 if fis_info.version ^= FIS_INFO_VERSION_1 then do; 50 P_code = error_table_$unimplemented_version; 51 return; 52 end; 53 54 if fis_info.n_iocbs ^= fis_info.n_channels then do; 55 P_code = error_table_$bad_arg; 56 return; 57 end; 58 59 60 /* Check the list for a switch with available input */ 61 62 CHECK_FOR_INPUT: 63 rsi.input_pending = "0"b; /* some I/O modules don't clear this */ 64 65 do idx = 1 to fis_info.n_iocbs; 66 67 call iox_$control (fis_info.iocbs (idx), "read_status", addr (rsi), P_code); 68 if P_code ^= 0 then return; /* can't check all the switches */ 69 70 if rsi.input_pending then do; /* found it */ 71 P_switch = idx; 72 return; /* ... code already zero from above call */ 73 end; 74 end; 75 76 if ^P_block then do; /* don't wait around */ 77 P_switch = 0; /* ... none found */ 78 return; /* ... code already zeroed by last call above */ 79 end; 80 81 82 /* Block until some input is available: after the wakeup it is necessary to check all the switches again as the I/O 83* modules send wakeups under various conditions (input available, channel hungup, etc.) */ 84 85 call ipc_$block (addr (fis_info.wait_list), addr (ewi), P_code); 86 if P_code ^= 0 then do; /* block failed */ 87 call convert_ipc_code_ (P_code); 88 return; 89 end; 90 91 go to CHECK_FOR_INPUT; /* look again */ 92 93 /* */ 94 1 1 /* BEGIN INCLUDE FILE ... _imft_fis_info.incl.pl1 */ 1 2 /* Created: April 1982 by G. Palter */ 1 3 1 4 /* Describes the I/O switches on which input is expected: no more than 10 switches may be specified (due to PL/I 1 5* restrictions on static storage) */ 1 6 1 7 dcl 1 fis_info aligned based (fis_info_ptr), 1 8 2 version character (8), 1 9 2 n_iocbs fixed binary, /* # of I/O switches */ 1 10 2 iocbs (10) pointer, /* -> the I/O switches */ 1 11 2 wait_list, /* ipc_$block input structure */ 1 12 3 n_channels fixed binary, /* # of IPC channels */ 1 13 3 pad bit (36), 1 14 3 event_channels (10) fixed binary (71); /* the channels */ 1 15 1 16 dcl fis_info_ptr pointer; 1 17 1 18 dcl FIS_INFO_VERSION_1 character (8) static options (constant) initial ("fis_1.00"); 1 19 1 20 /* END INCLUDE FILE ... _imft_fis_info.incl.pl1 */ 95 96 2 1 /* BEGIN INCLUDE FILE event_wait_info.incl.pl1 */ 2 2 2 3 /* T. Casey, May 1978 */ 2 4 2 5 dcl event_wait_info_ptr ptr; 2 6 2 7 dcl 1 event_wait_info aligned based (event_wait_info_ptr), /* argument structure filled in on return from ipc_$block */ 2 8 2 channel_id fixed bin (71), /* event channel on which wakeup occurred */ 2 9 2 message fixed bin (71), /* 72 bits of information passed by sender of wakeup */ 2 10 2 sender bit (36), /* process id of sender */ 2 11 2 origin, 2 12 3 dev_signal bit (18) unaligned, /* "1"b if device signal */ 2 13 3 ring fixed bin (17) unaligned, /* ring from which sent */ 2 14 2 channel_index fixed bin; /* index of this channel in the event wait list */ 2 15 2 16 /* END INCLUDE FILE event_wait_info.incl.pl1 */ 97 98 3 1 /* BEGIN INCLUDE FILE ... tty_read_status_info.incl.pl1 3 2* 3 3* control structure for the read_status and write_status orders to tty_ 3 4* 3 5* Modified 2/1/83 by Olin Sibert to add tty_write_status_info structure in 3 6* support of lap_simplex_ MPX. 3 7**/ 3 8 3 9 3 10 /****^ HISTORY COMMENTS: 3 11* 1) change(88-07-07,Beattie), approve(88-06-27,MCR7926), 3 12* audit(88-07-22,Brunelle), install(88-08-08,MR12.2-1082): 3 13* Prepared for installation. 3 14* END HISTORY COMMENTS */ 3 15 3 16 3 17 dcl 1 tty_read_status_info aligned based (tty_read_status_info_ptr), 3 18 2 event_channel fixed bin (71), 3 19 2 input_pending bit (1); 3 20 3 21 dcl tty_read_status_info_ptr ptr; 3 22 3 23 dcl 1 tty_write_status_info aligned based (tty_write_status_info_ptr), 3 24 2 event_channel fixed bin (71), 3 25 2 output_pending bit (1); 3 26 3 27 dcl tty_write_status_info_ptr ptr; 3 28 3 29 /* END INCLUDE FILE ... tty_read_status_info.incl.pl1 */ 99 100 101 end imft_find_input_switch_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/08/88 1408.8 imft_find_input_switch_.pl1 >special_ldd>install>MR12.2-1082>imft_find_input_switch_.pl1 95 1 05/28/82 1334.9 _imft_fis_info.incl.pl1 >ldd>include>_imft_fis_info.incl.pl1 97 2 06/29/79 1727.8 event_wait_info.incl.pl1 >ldd>include>event_wait_info.incl.pl1 99 3 08/08/88 1400.0 tty_read_status_info.incl.pl1 >special_ldd>install>MR12.2-1082>tty_read_status_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. FIS_INFO_VERSION_1 000000 constant char(8) initial packed unaligned dcl 1-18 ref 49 P_block parameter bit(1) dcl 23 ref 16 76 P_code parameter fixed bin(35,0) dcl 25 set ref 16 50* 55* 67* 68 85* 86 87* P_fis_info_ptr parameter pointer dcl 22 ref 16 47 P_switch parameter fixed bin(17,0) dcl 24 set ref 16 71* 77* addr builtin function dcl 43 ref 67 67 85 85 85 85 convert_ipc_code_ 000014 constant entry external dcl 39 ref 87 error_table_$bad_arg 000010 external static fixed bin(35,0) dcl 36 ref 55 error_table_$unimplemented_version 000012 external static fixed bin(35,0) dcl 37 ref 50 event_wait_info based structure level 1 dcl 2-7 ewi 000104 automatic structure level 1 dcl 32 set ref 85 85 fis_info based structure level 1 dcl 1-7 fis_info_ptr 000114 automatic pointer dcl 1-16 set ref 47* 49 54 54 65 67 85 85 idx 000113 automatic fixed bin(17,0) dcl 34 set ref 65* 67 71* input_pending 2 000100 automatic bit(1) level 2 dcl 30 set ref 62* 70 iocbs 4 based pointer array level 2 dcl 1-7 set ref 67* iox_$control 000016 constant entry external dcl 40 ref 67 ipc_$block 000020 constant entry external dcl 41 ref 85 n_channels 30 based fixed bin(17,0) level 3 dcl 1-7 set ref 54 n_iocbs 2 based fixed bin(17,0) level 2 dcl 1-7 ref 54 65 rsi 000100 automatic structure level 1 dcl 30 set ref 67 67 tty_read_status_info based structure level 1 dcl 3-17 version based char(8) level 2 dcl 1-7 ref 49 wait_list 30 based structure level 2 dcl 1-7 set ref 85 85 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. event_wait_info_ptr automatic pointer dcl 2-5 tty_read_status_info_ptr automatic pointer dcl 3-21 tty_write_status_info based structure level 1 dcl 3-23 tty_write_status_info_ptr automatic pointer dcl 3-27 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_FOR_INPUT 000045 constant label dcl 62 set ref 91 imft_find_input_switch_ 000017 constant entry external dcl 16 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 272 314 172 302 Length 554 172 22 224 77 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME imft_find_input_switch_ 106 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME imft_find_input_switch_ 000100 rsi imft_find_input_switch_ 000104 ewi imft_find_input_switch_ 000113 idx imft_find_input_switch_ 000114 fis_info_ptr imft_find_input_switch_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. convert_ipc_code_ iox_$control ipc_$block THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 16 000012 47 000024 49 000030 50 000034 51 000036 54 000037 55 000042 56 000044 62 000045 65 000046 67 000057 68 000116 70 000121 71 000123 72 000125 74 000126 76 000130 77 000134 78 000135 85 000136 86 000156 87 000161 88 000170 91 000171 ----------------------------------------------------------- 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