COMPILATION LISTING OF SEGMENT tdcm_detach_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/30/82 1338.7 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 tdcm_detach_: procedure (arg_ws_ptr, arg_ecode); 12 13 /* This program implements the tdcm_$tdcm_detach entry point. 14** Created on 02/20/75 by Bill Silver. 15** 16** This program is called to detach the specified tape drive. 17** Unless the current disposition specifies that we should retain 18** this tape drive assignmnet we will unassign as well as detach 19** this tape drive. 20**/ 21 22 /* ARGUMENT DATA */ 23 24 dcl arg_ecode fixed bin(35); /* (O) Standard error_table_ code. */ 25 dcl arg_ws_ptr ptr; /* (I) Pointer to IOI workspace segment. */ 26 27 28 /* AUTOMATIC DATA */ 29 30 dcl drive_num fixed bin; /* Number of the current drive. */ 31 dcl ecode fixed bin(35); /* Temporary error code. */ 32 dcl save_ecode fixed bin; /* Used to save ecode. */ 33 dcl special_echan fixed bin(71); /* Copied from workspace. */ 34 dcl fast_echan fixed bin(71); 35 36 37 /* EXTERNAL ENTRIES CALLED */ 38 39 dcl ( addr, size, string ) builtin; 40 41 dcl convert_ipc_code_ entry (fixed bin(35)); 42 dcl ipc_$delete_ev_chn entry (fixed bin(71), fixed bin(35)); 43 dcl rcp_$detach entry (bit(36) aligned, bit(*) aligned, fixed bin, char(*), fixed bin(35)); 44 /* */ 1 1 /* Begin include file ... tdcm_info.incl.pl1 1 2* * 1 3* * Created on 02/20/75 by Bill Silver. 1 4* * Modified 5/20/77 by Noel I. Morris for DCC. 1 5* * Modified 3/19/82 by J. A. Bush for Marker interrupt processing 1 6* * This include file defines the IOI workspace used by tdcm_. 1 7**/ 1 8 dcl ws_ptr ptr; /* Pointer to base of tdcm_ IOI workspace. */ 1 9 1 10 dcl 1 ws based (ws_ptr) aligned, /* Starts at base of ioi_ workspace. */ 1 11 2 info like ws_info, /* See ws_info structure below. */ 1 12 2 ndt_list (10), /* List of non-data transfer IDCWs. */ 1 13 3 idcw bit (36), /* IDCWs. */ 1 14 2 rw_list (12), /* DCW list for reads and writes. */ 1 15 3 idcw bit (36), /* IDCW. */ 1 16 3 dcw bit (36), /* DCW. */ 1 17 2 mark_tdcw bit (36), /* TDCW to chain the DCW list when processing Markers */ 1 18 2 statq (4) like istat, /* A queue of IOI status entries. */ 1 19 2 pad_ev ptr, /* to force buffer to even location */ 1 20 2 buffer (0 refer (ws.info.buf_size)) bit (36) aligned, 1 21 2 buf_end bit (36); /* Marks end of data buffer. */ 1 22 1 23 dcl 1 ws_info based aligned, /* Control information. */ 1 24 2 flags, /* All flags in one word. */ 1 25 (3 attached bit (1), /* ON => tape drive has been attached. */ 1 26 3 connected bit (1), /* ON => there is a connect in progress. */ 1 27 3 get_size bit (1), /* ON => return actual read count. */ 1 28 3 ndtrans bit (1), /* ON => non-data transfer type connect. */ 1 29 3 reading bit (1), /* ON => connect issued for reading. */ 1 30 3 large_rec bit (1), /* ON => transmitting record longer than 4096 words */ 1 31 3 allow_marker bit (1), /* ON => Set up DCW list for marker interrupt processing */ 1 32 3 good_ws bit (1)) unaligned, /* ON => can get a workspace big enough to satisfy user. */ 1 33 2 buf_size fixed bin, /* Current size of tdcm_ I/O buffer. */ 1 34 2 rcp_id bit (36) aligned, /* ID used to communicate with rcp_. */ 1 35 2 ioix fixed bin, /* Index used to communicate with ioi_. */ 1 36 2 statqx fixed bin, /* Index of current status queue entry. */ 1 37 2 process_id bit (36) aligned, /* User's process ID. */ 1 38 2 tracks fixed bin, /* Temporary place to save track type. */ 1 39 2 wait_list, /* Used to block. */ 1 40 3 num_ev_chans fixed bin, /* Number of channels in list. */ 1 41 3 wait_echan fixed bin (71), /* Used to wait when blocked. */ 1 42 2 fast_echan fixed bin (71), /* Fast event channel used to wait. */ 1 43 2 special_echan fixed bin (71), /* Event call channel for special interrupts. */ 1 44 2 user_echan fixed bin (71), /* Event channel set up by user in tseg. */ 1 45 2 init_echan fixed bin (71), /* Event channel to use after drive attached. */ 1 46 2 meters, /* temporary meters */ 1 47 3 last_io_time fixed bin (71), /* clock time of last data xfer I/O */ 1 48 3 io_delta fixed bin (71), /* total delta times */ 1 49 3 low_delta fixed bin (71), /* lowest time between data xfer i/os */ 1 50 3 high_delta fixed bin (71), /* longest time between data xfer i/os */ 1 51 3 number_ios fixed bin (35), /* number of data xfer i/os */ 1 52 3 block fixed bin (35), /* # of times we went blocked awaiting I/O to complete */ 1 53 3 no_block fixed bin (35), /* # of times status queue precessed w/o going blocked */ 1 54 3 mark_st fixed bin (35), /* # of marker interrupts received */ 1 55 3 term_st fixed bin (35), /* # of term interrupts received */ 1 56 3 term_ne fixed bin (35), /* # of term interrupts received with no error status */ 1 57 3 most_consec_mark fixed bin (35), /* longest burst of marker interrupts processed */ 1 58 3 consec_mark fixed bin (35), /* counter for keeping track of consecutive markers */ 1 59 3 block_count fixed bin, /* highest number of blocks per I/O call */ 1 60 2 subset_size fixed bin, /* max block size of data xfer I/O */ 1 61 2 detachx fixed bin, /* Index that tells what has been set up. */ 1 62 2 disposition bit (1), /* RCP assignment disposition. */ 1 63 2 read_start fixed bin, /* First tseg buffer we are reading into. */ 1 64 2 buffer_size (12) fixed bin, /* Data size in each workspace buffer. */ 1 65 2 ndt_offsetx fixed bin, /* Offset of non-data transfer DCW list. */ 1 66 2 rw_offsetx fixed bin, /* Offset of read/write DCW list. */ 1 67 2 mark_offset fixed bin, /* buffer offset of last marker interrupt */ 1 68 2 error_count fixed bin, /* Count of errors during attachment. */ 1 69 2 read_idcws (0:5) bit (36) aligned, /* An array of read and write IDCW's. */ 1 70 2 write_idcws (0:5) bit (36) aligned; /* One for each possible buffer in 1 connect. */ 1 71 1 72 /* End of include file ... tdcm_info.incl.pl1 */ 45 46 /* */ 2 1 2 2 /* Begin include file ...... ioi_stat.incl.pl1 */ 2 3 /* Last modified 3/24/75 by Noel I. Morris */ 2 4 2 5 dcl isp ptr; /* pointer to status structure */ 2 6 2 7 dcl 1 istat based (isp) aligned, /* I/O Interfacer status structure */ 2 8 2 completion, /* completion flags */ 2 9 (3 st bit (1), /* "1"b if status returned */ 2 10 3 er bit (1), /* "1"b if status indicates error condition */ 2 11 3 run bit (1), /* "1"b if channel still running */ 2 12 3 time_out bit (1)) unal, /* "1"b if time-out occurred */ 2 13 2 level fixed bin (3), /* IOM interrupt level */ 2 14 2 offset fixed bin (18), /* DCW list offset */ 2 15 2 absaddr fixed bin (24), /* absolute address of workspace */ 2 16 2 iom_stat bit (72), /* IOM status */ 2 17 2 lpw bit (72); /* LPW residue */ 2 18 2 19 dcl imp ptr; /* pointer to message structure */ 2 20 2 21 dcl 1 imess based (imp) aligned, /* I/O Interfacer event message structure */ 2 22 (2 completion like istat.completion, /* completion flags */ 2 23 2 pad bit (11), 2 24 2 level bit (3), /* interrupt level */ 2 25 2 offset bit (18), /* DCW list offset */ 2 26 2 status bit (36)) unal; /* first 36 bits of status */ 2 27 2 28 /* End of include file ...... ioi_stat.incl.pl1 */ 2 29 47 48 /* */ 49 /* Begin tdcm_detach_.pl1 50**/ 51 ws_ptr = arg_ws_ptr; /* Copy arguments. */ 52 53 special_echan = ws.info.special_echan; /* Copy before workspace deleted. */ 54 fast_echan = ws.info.fast_echan; 55 save_ecode = 0; 56 57 goto DETACH(ws.info.detachx); /* Go undo whatever has been done. */ 58 59 DETACH(3): /* Tape drive has been attached. */ 60 call rcp_$detach (ws.info.rcp_id, ws.info.disposition, ws.info.error_count, "", ecode); 61 if ecode ^= 0 62 then if save_ecode = 0 63 then save_ecode = ecode; 64 65 DETACH(2): /* Special event channel was created. */ 66 call ipc_$delete_ev_chn (special_echan, ecode); 67 if ecode ^= 0 68 then do; 69 call convert_ipc_code_ (ecode); 70 if save_ecode = 0 71 then save_ecode = ecode; 72 end; 73 74 DETACH(1): /* Fast event channel was created. */ 75 call ipc_$delete_ev_chn (fast_echan, ecode); 76 if ecode ^= 0 77 then do; 78 call convert_ipc_code_ (ecode); 79 if save_ecode = 0 80 then save_ecode = ecode; 81 end; 82 83 DETACH(0): 84 arg_ecode = save_ecode; /* Return first error code. */ 85 86 end tdcm_detach_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/30/82 1207.8 tdcm_detach_.pl1 >spec>on>11/30/82>tdcm_detach_.pl1 45 1 06/09/82 2051.4 tdcm_info.incl.pl1 >ldd>include>tdcm_info.incl.pl1 47 2 08/17/79 2215.0 ioi_stat.incl.pl1 >ldd>include>ioi_stat.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. arg_ecode parameter fixed bin(35,0) dcl 24 set ref 11 83* arg_ws_ptr parameter pointer dcl 25 ref 11 51 completion based structure level 2 in structure "istat" dcl 2-7 in procedure "tdcm_detach_" completion 150 based structure array level 3 in structure "ws" dcl 1-10 in procedure "tdcm_detach_" convert_ipc_code_ 000010 constant entry external dcl 41 ref 69 78 detachx 46 based fixed bin(17,0) level 3 dcl 1-10 ref 57 disposition 47 based bit(1) level 3 dcl 1-10 set ref 59* ecode 000100 automatic fixed bin(35,0) dcl 31 set ref 59* 61 61 65* 67 69* 70 74* 76 78* 79 error_count 70 based fixed bin(17,0) level 3 dcl 1-10 set ref 59* fast_echan 000104 automatic fixed bin(71,0) dcl 34 in procedure "tdcm_detach_" set ref 54* 74* fast_echan 14 based fixed bin(71,0) level 3 in structure "ws" dcl 1-10 in procedure "tdcm_detach_" ref 54 info based structure level 2 dcl 1-10 ipc_$delete_ev_chn 000012 constant entry external dcl 42 ref 65 74 istat based structure level 1 dcl 2-7 rcp_$detach 000014 constant entry external dcl 43 ref 59 rcp_id 2 based bit(36) level 3 dcl 1-10 set ref 59* save_ecode 000101 automatic fixed bin(17,0) dcl 32 set ref 55* 61 61* 70 70* 79 79* 83 special_echan 000102 automatic fixed bin(71,0) dcl 33 in procedure "tdcm_detach_" set ref 53* 65* special_echan 16 based fixed bin(71,0) level 3 in structure "ws" dcl 1-10 in procedure "tdcm_detach_" ref 53 ws based structure level 1 dcl 1-10 ws_info based structure level 1 dcl 1-23 ws_ptr 000106 automatic pointer dcl 1-8 set ref 51* 53 54 57 59 59 59 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. addr builtin function dcl 39 drive_num automatic fixed bin(17,0) dcl 30 imess based structure level 1 dcl 2-21 imp automatic pointer dcl 2-19 isp automatic pointer dcl 2-5 size builtin function dcl 39 string builtin function dcl 39 NAMES DECLARED BY EXPLICIT CONTEXT. DETACH 000000 constant label array(0:3) dcl 59 ref 57 tdcm_detach_ 000016 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 232 250 154 242 Length 446 154 16 162 55 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tdcm_detach_ 96 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME tdcm_detach_ 000100 ecode tdcm_detach_ 000101 save_ecode tdcm_detach_ 000102 special_echan tdcm_detach_ 000104 fast_echan tdcm_detach_ 000106 ws_ptr tdcm_detach_ 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. convert_ipc_code_ ipc_$delete_ev_chn rcp_$detach NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000012 51 000023 53 000027 54 000031 55 000033 57 000034 59 000036 61 000066 65 000074 67 000105 69 000107 70 000116 74 000122 76 000133 78 000135 79 000144 83 000150 86 000153 ----------------------------------------------------------- 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