/* START OF: tape_ioi_workspace.incl.pl1 * * * * * * * * * * * * * * * * */ /****^ HISTORY COMMENTS: 1) change(87-07-06,Hartogs), approve(87-07-06,MCR7726), audit(87-08-27,GWMay), install(87-08-27,MR12.1-1094): A) Added variable at_bot to structure tai. B) Added density_command to tai structure for use by error_retry. END HISTORY COMMENTS */ /* * This include file describes the workspace maintained by tape_ioi_. * No programs other than tape_ioi_ programs should need to use this include file. * * This workspace is the ioi_ workspace. */ /* Written 8/78 by R.J.C. Kissel. */ /* Modified April-May 1982 by Chris Jones for installation. */ /* Modified 2/4/83 by Chris Jones to add last_terminate_time */ /* format: style4,delnl,insnl,indattr,ifthen,declareind10,dclind10 */ dcl wksp ptr; dcl 1 tai based (wksp) aligned, /* Activation info and order buffer. */ 2 ioi_index fixed bin, /* For communication with ioi. */ 2 tioi_id unal, /* 36 bit activation identifier. */ 3 segno bit (18), /* Segment number of the workspace. */ 3 actid fixed bin (18) unsigned, /* Per process, per activation number. */ 2 event_id fixed bin (71), /* All ipc done on this channel. */ 2 max_timeout fixed bin (71), /* maximum timeout value */ 2 cur_timeout fixed bin (71), /* current timeout value */ 2 last_terminate_time fixed bin (71), /* when the last terminate interrupt was received */ ( 2 workspace_max fixed bin (18) unsigned, /* max_len-1 to fit in 18 bits. */ 2 workspace_len fixed bin (18) unsigned, /* len-1 to fit in 18 bits. */ 2 buffer_list_offset fixed bin (18) unsigned, /* to list of all buffers */ 2 free_list_offset fixed bin (18) unsigned, /* to list of free buffers */ 2 queue_list_offset fixed bin (18) unsigned, /* to list of buffers which are queued */ 2 susp_list_offset fixed bin (18) unsigned, /* to list of suspended buffers */ 2 retry_count fixed bin (9) unsigned, /* number of times we've retried this operation */ 2 buffer_count fixed bin (9) unsigned, /* Number of I/O buffers allocated. */ 2 status_entry_count fixed bin (9) unsigned, /* Number of status queue entries. */ 2 status_entry_idx fixed bin (9) unsigned, /* index of next status entry to be used */ 2 status_queue_offset fixed bin (18) unsigned, /* Status queue offset. */ 2 pad1 bit (12), 2 density_command bit (6), /* density of data on storage */ 2 workarea_len fixed bin (18) unsigned, /* len-1 to fit in 18 bits. */ 2 workarea_offset fixed bin (18) unsigned /* Workarea offset. */ ) unal, 2 modes unal, /* tape_ioi_ modes settings. */ 3 data_code bit (6), /* Encoded representation of data mode. */ 3 cif_code bit (6), /* CIF field for channel instructions. */ 3 align bit (1), /* "0"b--left aligned, "1"b--right aligned. */ 3 length bit (1), /* "0"b--normal, "1"b--special. */ 3 recovery bit (1), /* "0"b--no error recovery, "1"b--error recovery. */ 3 wait bit (1), /* "0"b--simplex, "1"b--multiplex. */ 3 req_len bit (1), /* "0"b--don't need to know record length, "1"b--do need it */ 2 flags unal, /* Used internally by tape_ioi_. */ 3 order_queued bit (1), /* "0"b--no order queued, "1"b--order queued. */ 3 read_queued bit (1), /* "0"b--no read queued, "1"b--read queued. */ 3 write_queued bit (1), /* "0"b--no write queued, "1"b--write queued. */ 3 order_done bit (1), /* "1"b--the queue_order entry finished the order */ 3 workarea_last bit (1), /* "1"b--user workarea at end of workspace */ 3 special_status_expected bit (1), /* set if we're waiting for a special interrupt */ 3 retry_in_progress bit (1), 3 suspect_short_record bit (1), /* "1"b--got invalid DCW on list service last */ 3 at_bot bit (1), /* "1"b-- tape is positioned to BOT. */ 2 pad2 bit (1) unal, 2 order_idx fixed bin (9) unsigned unaligned, /* encoding of last order queued */ 2 counts aligned, /* error and operation counts */ 3 total_reads fixed bin (35), 3 read_errors fixed bin (35), 3 total_writes fixed bin (35), 3 write_errors fixed bin (35), 3 total_orders fixed bin (35), 3 order_errors fixed bin (35), 3 times_status_lost fixed bin (35), 3 extra_statuses fixed bin (35), 3 times_tape_stopped fixed bin (35), 3 recovery_succeeded (7) fixed bin (35), /* meters which kind of recovery worked */ 2 order_count_requested fixed bin (18) unsigned unaligned, 2 order_count_done fixed bin (18) unsigned unaligned, 2 saved_special_status bit (36), 2 order_data_ptr ptr, 2 order_idcw bit (36) aligned, 2 order_dcw bit (36) aligned, 2 order_data (1:8) bit (36) aligned; /**** The buffers go here, followed by the status queue entries. There are min (1, tai.nbufs) status queue entries. */ /**** It is considered a good idea to have the length of the previous structure b an even number of words long. This is accomplished by the aligned pointer "order_data_ptr" being followed by an even number of words. */ %page; /* Tape buffer overlay. Each tape buffer consists of a variable length header followed by the data area. Whenever a buffer pointer is returned to a caller of tape_ioi_, it points to the data area. */ dcl 1 tbi based aligned, /* I/O buffer overlay. */ ( 2 data_offset fixed bin (18) unsigned, /* to the data portion of the buffer */ 2 next_buf_offset fixed bin (18) unsigned, /* to the next buffer in list of all buffers */ 2 next_state_offset fixed bin (18) unsigned, /* to the next buffer in the same state */ 2 state fixed bin (9) unsigned, /* buffer state */ 2 ndcws fixed bin (9) unsigned /* number of DCWs necessary to fill buffer */ ) unal, 2 modes unal like tai.modes, /* mode settings when buffer was queued */ 2 reserved bit (1) unal, /* "1"b=>won't be used for reads unless explicitly asked */ 2 buffer_len fixed bin (21), /* length of buffer in 9-bit bytes */ 2 data_len fixed bin (21), /* length of data in buffer in 9-bit bytes */ 2 bit_len fixed bin (24), /* length of data in buffer in bits */ 2 idcw_word bit (36), /* holds IDCW */ 2 dcw_words (1 refer (tbi.ndcws)) bit (36), /* data DCWs */ 2 tdcw_word bit (36); /* transfer to the next buffer */ /* This header is followed by the actual buffer area. */ %page; /* * N__o_t_e_s * * Both structures are carefully packed into words, so care should be * taken when modifying them. * * The workspace_max, workspace_len, and workarea_len must be at least one long. * This allows us to store the value-1 and thus fit into 18 bits. * * None of the offsets (first_buf_off, statq_off, etc.) can be zero since the first * word in the workspace contains the ioi_index. This allows a zero offset * to be used as a null offset indication. * * The data_code, cif_code, and tbi.state are encoded as follows: * * data mode | buffer | * setting | data_code cif_code | Meaning state | Meaning * __________|__________ _________|_______________________ _______|________ * bin | 05 20 | no retry, high 1 | ready * bcd | 04 21 | no retry, low 2 | busy * tap9 | 03 22 | no retry, high, deskew 3 | suspended * asc | 27 23 | no retry, low, deskew * ebc | 24 30 | retry, high * a/e | 25 31 | retry, low * 32 | retry, high, deskew * 33 | retry, low, deskew * * * Before data_code can be used for the command field in the IDCW the fourth * bit (from the right) must be set to "0"b for read commands and to "1"b for write commands. * * The general layout of the workspace maintained by tape_ioi_ is as follows: * * _________________________ * | | * | General Information | * | (see tai) | * |_______________________| * |______O____r__d__e__r_I_D_C_W________| * |______O____r__d__e__r_D_C_W_________| * | | * | Order data buffer | * | (8 words) | * |_______________________| * | | * | Optional workarea | * | (unlimited) | * |_______________________| * |________I__O___I_D_C_W_________| * | | * | IO DCW list | * |_______________________| * |________I__O___T_D_C_W_________| * | | * | IO buffer | * | (user specified) | * |_______________________| * . * . * . * _________________________ * |________I__O___I_D_C_W_________| * | | * | IO DCW list | * |_______________________| * |__________z_e_r_o_s_________| * | | * | IO buffer | * | (user specified) | * |_______________________| * | | * | Status queue | * | (at least one entry) | * |_______________________| * | | * | Optional workarea | * | (limited) | * |_______________________| */ /* END OF: tape_ioi_workspace.incl.pl1 * * * * * * * * * * * * * * * * */ */ ----------------------------------------------------------- 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 */