COMPILATION LISTING OF SEGMENT mtape_mount_cntl_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 11/30/87 1325.4 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 6* * * 7* *********************************************************** */ 8 9 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(82-10-05,Bush), approve(), audit(), install(): 14* Created. 15* 2) change(83-12-01,Bush), approve(), audit(), install(): 16* Modified for performance improvements. 17* 3) change(85-10-03,GWMay), approve(85-10-03,MCR7282), audit(85-12-16,GDixon), 18* install(85-12-17,MR12.0-1001): 19* Added history comments in required format. Modified the display that 20* tells the recording density of the requested tape. It was printing "CPI" 21* instead of "BPI". 22* 4) change(87-08-17,GWMay), approve(87-09-09,MECR0006), 23* audit(87-09-04,Farley), install(87-09-09,MR12.1-1101): 24* Simplified the code that determines the type of tape being read. 25* Added interrupt masking while modifying the iocb. 26* 5) change(87-10-19,GWMay), approve(87-10-19,MCR7779), audit(87-11-02,Farley), 27* install(87-11-30,MR12.2-1006): 28* Formally install MECR0006. 29* END HISTORY COMMENTS */ 30 31 32 mtape_mount_cntl_: procedure; 33 34 /* format: style4 */ 35 36 /* * This program is part of the mtape_ I/O module and as such is not 37* * called directly by users, but through the iox_ I/O system. This 38* * module implements the mtape_ interface to RCP for mounting, 39* * demounting and volume switching tape volumes. 40* * 41**/ 42 43 /* ARGUMENT DATA */ 44 45 dcl arg_mtdp ptr; /* Input pointer to the mtape_data structure */ 46 dcl arg_code fixed bin (35); /* Return error code */ 47 dcl vs_arg_mtdp ptr; /* Input pointer to the mtape_data structure */ 48 dcl vs_arg_code fixed bin (35); /* Return error code */ 49 dcl vs_arg_volp ptr; /* Pointer to VS structure of volume to mount */ 50 51 /* AUTOMATIC DATA */ 52 53 dcl (req_work_area_len, act_work_area_len, ws_max) fixed bin (19); 54 dcl (rcp_state, ioi_id, err_count, num_waits) fixed bin; 55 dcl ips_mask bit (36) aligned; 56 dcl to_max fixed bin (71); 57 dcl (code, vs_code, max_buf_len) fixed bin (35); 58 dcl (dl, act_len) fixed bin (21); 59 dcl susp_buf_ptrs (16) ptr; 60 dcl lbuf_arrayp (1) ptr; 61 dcl (i, j, n_susp_bufs, act_num) fixed bin; 62 dcl (wa_ptr, tptr, volp) ptr; 63 dcl rcp_comment char (256); 64 dcl Stape_is_readable bit (1) aligned; 65 dcl 1 auto_tioi_info aligned like tioi_info; 66 dcl 1 auto_err_count aligned like tec; 67 dcl 1 atbs aligned like tbs; 68 dcl 1 event_info aligned like event_wait_info; 69 70 /* CONSTANT DATA */ 71 72 dcl myname char (6) int static options (constant) init ("mtape_"); 73 dcl DISPOSITION bit (1) int static options (constant) init ("0"b); 74 dcl SAVE_CUR_BUF bit (1) int static options (constant) init ("1"b); 75 dcl DONT_SAVE_CUR_BUF bit (1) int static options (constant) init ("0"b); 76 dcl WRITE_IO fixed bin int static options (constant) init (2); 77 78 /* EXTERNAL STATIC DATA */ 79 80 dcl error_table_$resource_unavailable fixed bin (35) ext static; 81 dcl error_table_$resource_reserved fixed bin (35) ext static; 82 dcl error_table_$area_too_small fixed bin (35) ext static; 83 dcl error_table_$unimplemented_version fixed bin (35) ext static; 84 85 /* BUILTIN FUNCTIONS */ 86 87 dcl (addr, null, size, unspec) builtin; 88 dcl (any_other, cleanup) condition; 89 90 /* EXTERNAL ENTRIES */ 91 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 92 dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); 93 dcl mtape_util_$alloc entry (ptr, fixed bin, ptr, fixed bin (21), ptr); 94 dcl mtape_util_$error entry options (variable); 95 dcl mtape_util_$get_statistics entry (ptr, fixed bin (35)); 96 dcl mtape_util_$user_query entry (ptr, fixed bin, fixed bin (35)); 97 dcl mtape_io_$allocate_buffers entry (ptr, fixed bin (21), fixed bin (35)); 98 dcl mtape_io_$order entry (ptr, char (*), fixed bin, ptr, fixed bin (35)); 99 dcl hcs_$assign_channel entry (fixed bin (71), fixed bin (35)); 100 dcl ipc_$block entry (ptr, ptr, fixed bin (35)); 101 dcl ipc_$create_ev_chn entry (fixed bin (71), fixed bin (35)); 102 dcl iox_$propagate entry (ptr); 103 dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 104 dcl release_temp_segment_ entry (char (*), ptr, fixed bin (35)); 105 dcl ioa_ entry () options (variable); 106 dcl timer_manager_$sleep entry (fixed bin (71), bit (2)); 107 dcl rcp_$attach entry (char (*), ptr, fixed bin (71), char (*), bit (36) aligned, fixed bin (35)); 108 dcl rcp_$check_attach entry (bit (36) aligned, ptr, char (*), fixed bin, 109 fixed bin (19), fixed bin (71), fixed bin, fixed bin (35)); 110 dcl rcp_$detach entry (bit (36) aligned, bit (*), fixed bin, char (*), fixed bin (35)); 111 112 /* BASED DATA */ 113 114 dcl 1 save_wks based (tptr) aligned, /* structure to save workspace */ 115 2 smtd like mtape_data, /* for copying mtape_data structure out */ 116 2 n_susp_buffers fixed bin, /* number of suspended buffers to copy out */ 117 2 susp_buffers (mtape_data.nbufs), 118 3 stbs like tbs, /* for the suspended buffers status */ 119 3 buffer char (max_buf_len) unaligned; /* buffer data */ 120 121 dcl based_buffer char (dl) based; 122 123 /* mount - entry to mount a volume from the volume set */ 124 125 mount: entry (arg_mtdp, arg_code); 126 127 mtdp = arg_mtdp; /* copy argument */ 128 maip = mtape_data.attach_info_ptr; 129 arg_code, code = 0; /* Reset return error code */ 130 if mtape_data.tape_infop = null then do; /* if rcp data block not allocated.. */ 131 call INIT_RCP_DATA; /* do it now */ 132 if code ^= 0 then 133 go to mount_return; 134 end; 135 136 tape_info_ptr = mtape_data.tape_infop; /* set tape info pointer */ 137 vs_ptr = mtape_data.vs_current; /* get pointer to this volumes VS structure */ 138 tape_info.device_name = ""; /* set tape info that changes */ 139 tape_info.model = 0; 140 tape_info.write_flag = mtape_attach_info.ring; 141 tape_info.speed = mtape_attach_info.speed; 142 if mtape_attach_info.density = 1600 then /* set density */ 143 tape_info.density = "00010"b; 144 else if mtape_attach_info.density = 6250 then 145 tape_info.density = "00001"b; 146 else if mtape_attach_info.density = 800 then 147 tape_info.density = "00100"b; 148 else if mtape_attach_info.density = 556 then /* MUST CHECK THESE *** */ 149 tape_info.density = "01000"b; 150 else tape_info.density = "10000"b; /* 200 BPI */ 151 152 tape_info.volume_name = mtape_vol_set.volume_name;/* copy volume name */ 153 154 call ioa_ ("Mounting volume ""^a"" with ^[a^;no^] write ring", /* Let user know whats going on */ 155 mtape_vol_set.volume_name, mtape_attach_info.ring); 156 157 /* Now request the volume mount from RCP */ 158 159 call rcp_$attach (DEVICE_TYPE (TAPE_DRIVE_DTYPEX), tape_info_ptr, mtape_data.mount_echan, 160 (mtape_vol_set.mount_comment), mtape_vol_set.rcp_id, code); 161 if code ^= 0 then do; /* some problem */ 162 call mtape_util_$error (mtdp, code, "Error from rcp_$attach"); 163 go to mount_return; 164 end; 165 166 /* Now wait for the mount to complete */ 167 168 event_wait_channel.channel_id (1) = mtape_data.mount_echan; 169 num_waits = 0; /* initialize wait loop counter */ 170 rcp_state = 1; /* set state to go through loop once */ 171 on cleanup call DETACH_ON_CLEANUP; /* in case user does not want to wait.. */ 172 173 do while (rcp_state ^= 0); /* do until mounted, or mount timer running */ 174 rcp_comment = ""; /* initialize comment */ 175 call rcp_$check_attach (mtape_vol_set.rcp_id, tape_info_ptr, rcp_comment, ioi_id, 176 ws_max, to_max, rcp_state, code); 177 if rcp_comment ^= "" then /* if we got something to report from RCP.. */ 178 call mtape_util_$error (mtdp, 0, "RCP comment: ^a", rcp_comment); 179 go to ATTACH_STATE (rcp_state); /* do appropriate processing */ 180 181 ATTACH_STATE (2): /* long wait */ 182 code = error_table_$resource_unavailable; /* set appropriate error code */ 183 ATTACH_STATE (3): /* fatal error */ 184 if mtape_attach_info.wait then /* if we will wait for attachment */ 185 if (code = error_table_$resource_unavailable | /* and one of these */ 186 code = error_table_$resource_reserved) then 187 if num_waits <= mtape_attach_info.wait_time then do; /* wait for 1 minute */ 188 call SLEEP; 189 go to ATTACH_STATE (0); 190 end; 191 else do; /* wait time exceeded */ 192 call mtape_util_$error (mtdp, code, 193 "Mount wait time of ^d minutes exceeded", mtape_attach_info.wait_time); 194 go to mount_return; 195 end; 196 call mtape_util_$error (mtdp, code, "Error from rcp_$check_attach, while waiting for tape mount"); 197 go to mount_return; 198 199 ATTACH_STATE (1): /* short wait, go blocked */ 200 call ipc_$block (addr (event_wait_channel), addr (event_info), code); 201 if code ^= 0 then do; /* error from block */ 202 call mtape_util_$error (mtdp, code, "Error from ipc_$block, while waiting for tape mount"); 203 go to mount_return; 204 end; 205 ATTACH_STATE (0): /* mount complete */ 206 end; 207 208 revert cleanup; 209 mtape_vol_set.mounts = mtape_vol_set.mounts + 1; /* increment number of times mounted */ 210 if (tape_info.volume_type = Volume_blank | 211 tape_info.volume_type = Volume_unreadable) then do; 212 Stape_is_readable = "0"b; 213 mtape_vol_set.volume_density = mtape_attach_info.density; 214 end; 215 else do; 216 Stape_is_readable = "1"b; 217 mtape_vol_set.volume_density = 218 MTAPE_VALID_DENSITIES (tape_info.volume_density); 219 end; 220 221 mtape_vol_set.volume_type = tape_info.volume_type; 222 223 call ioa_ ("Mounted ^a volume ""^a"" ^[(recorded at ^d BPI), ^;^1s^]on device ^a", 224 Tape_volume_types (tape_info.volume_type), 225 tape_info.volume_name, 226 Stape_is_readable, 227 mtape_vol_set.volume_density, 228 tape_info.device_name); 229 230 mtape_vol_set.device_name = tape_info.device_name;/* copy values from the tape_info structure */ 231 if Stape_is_readable then /* only copy if valid name */ 232 mtape_vol_set.volume_id = tape_info.volume_name; 233 mtape_vol_set.mounted, mtape_vol_set.ever_mounted = "1"b; /* set mounted flags */ 234 if mtape_data.vs_mounted_tail ^= null then /* thread in MRM chain, if possible */ 235 mtape_data.vs_mounted_tail -> mtape_vol_set.mrm_vs_ptr = vs_ptr; 236 mtape_vol_set.lrm_vs_ptr = mtape_data.vs_mounted_tail; /* thread the LRM chain */ 237 mtape_data.vs_mounted_tail = vs_ptr; 238 mtape_vol_set.auth_required = tape_info.opr_auth; 239 mtape_data.drives_in_use = mtape_data.drives_in_use + 1; /* one more drive used */ 240 call INIT_TIOI; /* activate tape_ioi_ for this volume */ 241 mount_return: 242 arg_code = code; 243 return; 244 245 /* demount - entry to demount the current volume of the volume set */ 246 247 demount: entry (arg_mtdp, arg_code); 248 249 mtdp = arg_mtdp; /* copy argument */ 250 arg_code = 0; /* reset return error code */ 251 vs_ptr = mtape_data.vs_current; /* set the volume set members ptr */ 252 253 /* Update error stats and deactivate tape_ioi_. Note: suspended buffers/work area have already been copied out */ 254 255 call mtape_util_$get_statistics (mtdp, code); /* update error stats */ 256 tape_ioi_error_counts_ptr = addr (auto_err_count); 257 tec.version = TEC_VERSION_1; /* set version number */ 258 call tape_ioi_$deactivate (mtape_vol_set.tioi_id, tape_ioi_error_counts_ptr, code); 259 err_count = mtape_vol_set.rel_error_stats.read.errors + mtape_vol_set.rel_error_stats.write.errors + 260 mtape_vol_set.rel_error_stats.orders.errors; /* RCP S/B changed to get all stats */ 261 262 /* Now detach the device */ 263 264 call rcp_$detach (mtape_vol_set.rcp_id, DISPOSITION, err_count, (mtape_vol_set.demount_comment), code); 265 mtape_vol_set.mounted = "0"b; /* volume is no longer mounted */ 266 mtape_vol_set.device_name = ""; /* its no longer on a device */ 267 mtape_vol_set.rcp_id, mtape_vol_set.tioi_id = "0"b; /* Not needed now */ 268 mtape_data.drives_in_use = mtape_data.drives_in_use - 1; /* 1 less drive in use */ 269 unspec (mtape_vol_set.rel_error_stats) = "0"b; /* init error stats, this mount */ 270 271 /* Now thread this volume set member out of LRM and MRM chains */ 272 273 if mtape_vol_set.lrm_vs_ptr ^= null then do; 274 if mtape_vol_set.mrm_vs_ptr ^= null then /* if in middle of mounted list.. */ 275 mtape_vol_set.mrm_vs_ptr -> mtape_vol_set.lrm_vs_ptr = mtape_vol_set.lrm_vs_ptr; 276 end; 277 else do; /* lrm_vs_ptr = null => this was first vol mounted */ 278 if mtape_vol_set.mrm_vs_ptr ^= null then /* if there is a next volume */ 279 mtape_vol_set.mrm_vs_ptr -> mtape_vol_set.lrm_vs_ptr = null; /* make it first mounted */ 280 end; 281 if mtape_vol_set.mrm_vs_ptr ^= null then do; 282 if mtape_vol_set.lrm_vs_ptr ^= null then /* if in middle of mounted list.. */ 283 mtape_vol_set.lrm_vs_ptr -> mtape_vol_set.mrm_vs_ptr = mtape_vol_set.mrm_vs_ptr; 284 end; 285 else do; /* mrm_vs_ptr = null => this was last vol mounted */ 286 mtape_data.vs_mounted_tail = mtape_vol_set.lrm_vs_ptr; 287 if mtape_vol_set.lrm_vs_ptr ^= null then /* if there is a previous volume.. */ 288 mtape_vol_set.lrm_vs_ptr -> mtape_vol_set.mrm_vs_ptr = null; /* make it last mounted */ 289 end; 290 mtape_vol_set.lrm_vs_ptr, mtape_vol_set.mrm_vs_ptr = null; 291 292 arg_code = code; 293 294 return; 295 296 /* volume_switch - entry to perform volume switching on demand */ 297 298 volume_switch: entry (vs_arg_mtdp, vs_arg_volp, vs_arg_code); 299 300 mtdp = vs_arg_mtdp; /* copy args */ 301 maip = mtape_data.attach_info_ptr; 302 volp = vs_arg_volp; 303 vs_arg_code = 0; 304 if volp = null then do; /* No vol_set structure */ 305 call mtape_util_$user_query (mtdp, Q_NO_NEXT_VOLUME, vs_code); /* ask user for new volume */ 306 if vs_code ^= 0 then /* user did not want new volume */ 307 go to vs_return; 308 volp = mtape_data.vs_tail; /* this will be the last allocated */ 309 end; 310 if volp -> mtape_vol_set.version ^= mtape_vs_version_1 then do; /* is it a vol_set structure? */ 311 vs_code = error_table_$unimplemented_version;/* no, set error code */ 312 go to vs_return; 313 end; 314 vs_ptr = mtape_data.vs_current; /* set for current volume */ 315 call mtape_io_$order (mtdp, "rwnw", 0, null, vs_code); /* rewind old volume */ 316 if vs_code ^= 0 then /* can't win no_how */ 317 go to vs_return; 318 call SAVE_ACTIVATION (DONT_SAVE_CUR_BUF); /* go save suspended buffers etc. */ 319 if vs_code ^= 0 then go to vs_return; 320 if volp -> mtape_vol_set.mounted then do; /* if required tape volume already mounted */ 321 vs_ptr = volp; /* set vol set for new volume */ 322 call tape_ioi_$allocate_work_area (mtape_vol_set.tioi_id, size (mtape_data), 323 act_work_area_len, wa_ptr, vs_code); 324 wa_ptr -> mtape_data = mtape_data; /* move mtape_data to new work area */ 325 mtdp = wa_ptr; /* and reset pointer to same */ 326 mtape_data.tioi_id = mtape_vol_set.tioi_id; /* copy tape_ioi_ activation ID into work area */ 327 mtape_data.vs_current = vs_ptr; /* set current vs ptr */ 328 call mtape_io_$order (mtdp, "rew", 0, null, vs_code); /* make sure he is rewound */ 329 if vs_code ^= 0 then /* can't win no_how */ 330 go to vs_return; 331 end; 332 else do; /* volume not mounted */ 333 if mtape_data.drives_in_use = mtape_attach_info.ndrives then do; /* must demount one first */ 334 call FIND_DEMOUNT_CANDIDATE; /* go find volume to demount */ 335 call demount (mtdp, vs_code); /* demount it */ 336 if vs_code ^= 0 then go to vs_return; 337 end; 338 mtape_data.vs_current = volp; /* set current volume set ptr */ 339 call mount (mtdp, vs_code); /* go mount the requested volume */ 340 if vs_code ^= 0 then go to vs_return; 341 end; 342 call RESTORE_ACTIVATION; /* copy suspended buffers back in etc */ 343 if vs_code ^= 0 then go to vs_return; 344 call mtape_data.pfm_init (mtdp, vs_code); /* Go read the volume labels */ 345 346 vs_return: 347 vs_arg_code = vs_code; /* copy return code */ 348 vs_arg_mtdp = mtdp; /* reset value of mtdp */ 349 ips_mask = ""b; 350 on any_other call hcs_$reset_ips_mask (ips_mask, ips_mask); 351 call hcs_$set_ips_mask ("0"b, ips_mask); 352 353 mtape_data.iocb_ptr -> iocb.attach_data_ptr = mtdp; /* and reset IOCB */ 354 call iox_$propagate (mtape_data.iocb_ptr); /* propagate the IOCB change */ 355 call hcs_$reset_ips_mask (ips_mask, ips_mask); 356 return; /* and return to caller */ 357 358 /* remount - external entry for remounting same volume after device attention condition */ 359 360 remount: entry (arg_mtdp, vs_arg_code); 361 362 mtdp = arg_mtdp; 363 maip = mtape_data.attach_info_ptr; 364 vs_ptr = mtape_data.vs_current; 365 vs_arg_code = 0; 366 367 call SAVE_ACTIVATION (SAVE_CUR_BUF); /* save suspended buffers etc. */ 368 if vs_code ^= 0 then /* quit on error */ 369 go to remount_return; 370 call demount (mtdp, vs_code); /* demount current volume */ 371 if vs_code = 0 then /* if all ok */ 372 call mount (mtdp, vs_code); /* remount the volume */ 373 if vs_code ^= 0 then 374 go to remount_return; 375 call RESTORE_ACTIVATION; /* copy suspended buffers back in */ 376 377 remount_return: 378 vs_arg_code = vs_code; /* copy return code */ 379 vs_arg_mtdp = mtdp; /* reset value of mtdp */ 380 ips_mask = ""b; 381 on any_other call hcs_$reset_ips_mask (ips_mask, ips_mask); 382 call hcs_$set_ips_mask ("0"b, ips_mask); 383 384 mtape_data.iocb_ptr -> iocb.attach_data_ptr = mtdp; /* and reset IOCB */ 385 call iox_$propagate (mtape_data.iocb_ptr); /* propagate the IOCB change */ 386 call hcs_$reset_ips_mask (ips_mask, ips_mask); 387 388 return; /* and return to caller */ 389 390 /* INIT_RCP_DATA - procedure to set up the tape_info structure */ 391 392 INIT_RCP_DATA: proc; 393 394 call mtape_util_$alloc (mtdp, MTAPE_ALLOC_STR, null, size (tape_info) * 4, mtape_data.tape_infop); 395 tape_info_ptr = mtape_data.tape_infop; 396 tape_info.version_num = tape_info_version_3; /* set version number */ 397 tape_info.tracks = mtape_attach_info.tracks; /* set constant data */ 398 tape_info.system_flag = mtape_attach_info.system; 399 400 /* Create an event channel for mount requests */ 401 402 if mtape_data.mount_echan = 0 then do; /* Only create if we hav'nt already */ 403 call ipc_$create_ev_chn (mtape_data.mount_echan, code); 404 if code ^= 0 then do; /* we loose altogether */ 405 call mtape_util_$error (mtdp, code, "Can't create ipc wait channel for mount requests."); 406 return; 407 end; 408 end; 409 410 end INIT_RCP_DATA; 411 412 /* SLEEP - internal procedure to go to sleep for 1 minute and incrment the sleep loop counter */ 413 414 SLEEP: proc; 415 416 call timer_manager_$sleep (60, "11"b); /* Wait for one minute. */ 417 num_waits = num_waits + 1; /* increment number of loops */ 418 419 end SLEEP; 420 421 /* DETACH_ON_CLEANUP - int procedure to detach tape when cleanup condition is raised */ 422 423 DETACH_ON_CLEANUP: proc; 424 425 dcl clean_code fixed bin (35); 426 427 call rcp_$detach (mtape_vol_set.rcp_id, "0"b, (0), "", clean_code); /* no frills */ 428 if clean_code ^= 0 then ; 429 430 end DETACH_ON_CLEANUP; 431 432 /* INIT_TIOI - internal procedure to activate tape_ioi_ and create a work area */ 433 434 INIT_TIOI: proc; 435 436 /* On first call, create a fast event channel for doing I/O if possible, if not create regular one */ 437 438 if mtape_data.io_echan = 0 then do; /* if not already there create one */ 439 call hcs_$assign_channel (mtape_data.io_echan, code); 440 if code ^= 0 then do; /* if we didn't get fast channel... */ 441 call ipc_$create_ev_chn (mtape_data.io_echan, code); 442 if code ^= 0 then do; /* we loose altogether */ 443 call mtape_util_$error (mtdp, code, "Can't create ipc wait channel for doing I/O."); 444 return; 445 end; 446 end; 447 end; 448 449 tioi_info_ptr = addr (auto_tioi_info); /* initialize the tape_ioi_ info structure */ 450 tioi_info.version = tioi_info_version_1; 451 tioi_info.ioi_index = ioi_id; 452 tioi_info.timeout_max = to_max; 453 tioi_info.event_id = mtape_data.io_echan; 454 tioi_info.workspace_max = ws_max; 455 456 call tape_ioi_$activate (tape_info_ptr, tioi_info_ptr, mtape_vol_set.tioi_id, code); 457 if code ^= 0 then do; 458 call mtape_util_$error (mtdp, code, "Calling tape_ioi_$activate"); 459 return; 460 end; 461 462 /* Get workspace for permanent mtape_data storage. */ 463 464 req_work_area_len = size (mtape_data); 465 466 call tape_ioi_$allocate_work_area (mtape_vol_set.tioi_id, req_work_area_len, act_work_area_len, wa_ptr, code); 467 if code ^= 0 then do; 468 call mtape_util_$error (mtdp, code, "Calling tape_ioi_$allocate_work_area"); 469 return; 470 end; 471 if act_work_area_len ^= req_work_area_len then do; 472 code = error_table_$area_too_small; /* A different code should be used. */ 473 call mtape_util_$error (mtdp, code, 474 "Can't get a big enough work area, need ^d words, tape_ioi_ will give us ^d words.", 475 req_work_area_len, act_work_area_len); 476 return; 477 end; 478 wa_ptr -> mtape_data = mtape_data; /* copy the data into the work area */ 479 mtdp, arg_mtdp = wa_ptr; /* now everyone will look in work area */ 480 mtape_data.tioi_id = mtape_vol_set.tioi_id; /* copy for fast reference */ 481 482 ips_mask = ""b; 483 on any_other call hcs_$reset_ips_mask (ips_mask, ips_mask); 484 call hcs_$set_ips_mask ("0"b, ips_mask); 485 486 mtape_data.iocb_ptr -> iocb.attach_data_ptr = mtdp; /* reset iocb */ 487 call iox_$propagate (mtape_data.iocb_ptr); /* let iox_ know about iocb change */ 488 489 call hcs_$reset_ips_mask (ips_mask, ips_mask); 490 return; 491 492 end INIT_TIOI; 493 494 /* FIND_DEMOUNT_CANDIDATE - subroutine to find a volume to demount on a LRU basis */ 495 496 FIND_DEMOUNT_CANDIDATE: proc; 497 498 if mtape_attach_info.ndrives = 1 then /* if we have only 1 tape drive, must demount */ 499 return; /* current volume. mtape_data.vs_current already set */ 500 fi_ptr = mtape_data.fi_current; /* get current file_info pointer */ 501 502 /* Now thread the LRM chain until we find the head */ 503 504 do vs_ptr = mtape_data.vs_mounted_tail repeat mtape_vol_set.lrm_vs_ptr 505 while (mtape_vol_set.lrm_vs_ptr ^= null); 506 end; 507 if vs_ptr = mtape_file_info.begin_vs_ptr then /* if the selected volume is 1st file section */ 508 if mtape_vol_set.mrm_vs_ptr ^= null then /* and there is a more recent mount */ 509 vs_ptr = mtape_vol_set.mrm_vs_ptr; /* use the next LRU volume */ 510 mtape_data.vs_current = vs_ptr; /* finished, he is the guy to demount */ 511 512 end FIND_DEMOUNT_CANDIDATE; 513 514 /* SAVE_ACTIVATION - internal procedure to save suspended buffers, deallocate buffers and work area */ 515 516 SAVE_ACTIVATION: proc (cur_buf_disp); 517 518 dcl cur_buf_disp bit (1); 519 520 call get_temp_segment_ (myname, tptr, vs_code); /* get temp seg to copy stuff into */ 521 if vs_code ^= 0 then /* can't get it, give up */ 522 return; 523 save_wks.smtd = mtape_data; /* copy the mtape_data structure out */ 524 mtdp = addr (save_wks.smtd); /* and switch pointer */ 525 max_buf_len = mtape_data.block_size; /* set the max buffer size */ 526 atbs.version = TBS_VERSION_1; /* set version */ 527 if cur_buf_disp = SAVE_CUR_BUF & mtape_data.last_io = WRITE_IO then do; 528 call tape_ioi_$list_buffers (mtape_vol_set.tioi_id, READY_STATE, susp_buf_ptrs, n_susp_bufs, vs_code); 529 if vs_code ^= 0 then 530 return; 531 call tape_ioi_$buffer_status (mtape_vol_set.tioi_id, susp_buf_ptrs (n_susp_bufs), addr (atbs), vs_code); 532 if vs_code ^= 0 then return; 533 save_wks.susp_buffers (1).stbs = atbs; /* save buffer status */ 534 dl = atbs.data_len; /* set data length */ 535 save_wks.susp_buffers (1).buffer = susp_buf_ptrs (n_susp_bufs) -> based_buffer; /* and data */ 536 j = 1; /* set offset */ 537 end; 538 else j = 0; 539 call tape_ioi_$list_buffers (mtape_vol_set.tioi_id, SUSPENDED_STATE, susp_buf_ptrs, n_susp_bufs, vs_code); 540 if vs_code ^= 0 then 541 return; 542 save_wks.n_susp_buffers = n_susp_bufs + j; 543 if n_susp_bufs ^= 0 then do; /* if we have suspended buffers, copy them out too */ 544 do i = 1 to n_susp_bufs; 545 j = j + 1; /* increment saved buffer index */ 546 call tape_ioi_$buffer_status (mtape_vol_set.tioi_id, susp_buf_ptrs (i), addr (atbs), vs_code); 547 if vs_code ^= 0 then return; 548 save_wks.susp_buffers (j).stbs = atbs; /* save buffer status */ 549 dl = atbs.data_len; /* set data length */ 550 save_wks.susp_buffers (j).buffer = susp_buf_ptrs (i) -> based_buffer; /* and data */ 551 call tape_ioi_$set_buffer_ready (mtape_vol_set.tioi_id, susp_buf_ptrs (i), vs_code); 552 if vs_code ^= 0 then return; 553 end; 554 end; 555 call mtape_util_$get_statistics (mtdp, vs_code); /* update error stats */ 556 call tape_ioi_$deallocate (mtape_vol_set.tioi_id, vs_code); /* deallocate all buffers and work area */ 557 all_buf_ptrs (*) = null; /* reset buffer pointers */ 558 all_buf_lens (*) = 0; /* and buffer lengths */ 559 mtape_data.lab_bufp = null; /* set label buffer to null too */ 560 mtape_data.phy_file, mtape_data.phy_block = 0; /* reset position counters */ 561 562 end SAVE_ACTIVATION; 563 564 /* RESTORE_ACTIVATION - internal procedure to allocate buffers and copy suspended buffers to new buffers. */ 565 566 RESTORE_ACTIVATION: proc; 567 568 call tape_ioi_$allocate_buffers (mtape_data.tioi_id, /* allocate and reserve a label buffer */ 569 mtape_data.lab_buf_len, 1, act_len, act_num, lbuf_arrayp, vs_code); 570 if vs_code ^= 0 then return; 571 call tape_ioi_$reserve_buffer (mtape_data.tioi_id, lbuf_arrayp (1), vs_code); /* reserve the buffer */ 572 if vs_code ^= 0 then return; 573 mtape_data.lab_bufp = lbuf_arrayp (1); /* copy label buffer ptr */ 574 575 /* Allocate data buffers and copy any suspended buffers back in 1 at a time */ 576 577 if mtape_data.nbufs > 0 then do; /* if we had buffers allocated before, do it now */ 578 call mtape_io_$allocate_buffers (mtdp, mtape_data.block_size, vs_code); 579 if vs_code ^= 0 then return; 580 if save_wks.n_susp_buffers ^= 0 then do; 581 do i = 1 to save_wks.n_susp_buffers; /* do each buffer */ 582 tbs_ptr = addr (susp_buffers (i).stbs); 583 all_buf_lens (i), dl = tbs.data_len; /* copy length */ 584 all_buf_ptrs (i) -> based_buffer = addr (susp_buffers (i).buffer) -> based_buffer; /* copy data */ 585 586 end; 587 mtape_data.cur_buf_idx = save_wks.n_susp_buffers + 1; /* set up the current buffer index */ 588 end; 589 end; 590 call release_temp_segment_ (myname, tptr, (0)); /* release our temp segment */ 591 592 end RESTORE_ACTIVATION; 593 1 1 /* BEGIN INCLUDE FILE mtape_data.incl.pl1. Created by J. A. Bush 10/06/82 */ 1 2 /* format: style4 */ 1 3 1 4 dcl mtdp ptr; 1 5 1 6 dcl mtape_data_version_1 char (8) int static options (constant) init ("mtdv0001"); 1 7 1 8 dcl 1 mtape_data aligned based (mtdp), 1 9 2 version char (8), /* Current structure version */ 1 10 2 areap ptr, /* Pointer to an allocation area */ 1 11 2 iocb_ptr ptr, /* Pointer to our IO control block */ 1 12 2 atdp ptr, /* Pointer to the attach description string */ 1 13 2 opdp ptr, /* Pointer to the open description string */ 1 14 2 cldp ptr, /* Pointer to close description string */ 1 15 2 dtdp ptr, /* Pointer to detach description string */ 1 16 2 cmtdp ptr, /* If non-null, Ptr to allocated copy of mtape_data */ 1 17 2 vs_head ptr, /* Pointer to the first volume_set structure */ 1 18 2 vs_tail ptr, /* Pointer to the last volume_set structure */ 1 19 2 vs_current ptr, /* Pointer to the current volume_set structure */ 1 20 2 vs_mounted_tail ptr, /* Pointer to MRM volume_set member */ 1 21 2 fi_head ptr, /* Pointer to the first file_info structure */ 1 22 2 fi_tail ptr, /* Pointer to the last file_info structure */ 1 23 2 fi_current ptr, /* Pointer to the current file_info structure */ 1 24 2 tape_infop ptr, /* Pointer to rcp tape info structure */ 1 25 2 last_ur_status_ptr ptr, /* If non-null, Ptr to last unrecoverable status */ 1 26 2 io_echan fixed bin (71), /* Fast wait channel for I/O interrupts */ 1 27 2 mount_echan fixed bin (71), /* Regular wait channel for mount requests */ 1 28 2 data_xfer_args, /* Arguments for time critical (read/write) calls */ 1 29 3 arg_buf_ptr ptr, /* Pointer to users buffer */ 1 30 3 arg_buf_len fixed bin (21), /* Length of users buffer in bytes */ 1 31 3 arg_rec_len fixed bin (21), /* Length of record read in bytes */ 1 32 2 error_lock fixed bin (35), /* if ^= 0 = file locked error code */ 1 33 2 abs_ans char (3), /* Query answer (yes or no) for abs user */ 1 34 2 user_type bit (1), /* "1"b => interactive; "0"b => absentee */ 1 35 2 display_errors bit (1), /* "1"b => display verbose error messages */ 1 36 2 force_end_of_volume bit (1), /* "1"b => simulate EOV on next write */ 1 37 2 opd_len fixed bin (21), /* Allocated length of open description */ 1 38 2 drives_in_use fixed bin, /* Number of tape drives currently in use */ 1 39 2 data_buffers, /* Info about data buffers */ 1 40 3 buf_ptrs (8) ptr, /* Pointers to a subset of ioi buffers */ 1 41 3 blind_buf_ptrs (8) ptr, /* Pointers to other subset of buffers */ 1 42 3 buf_len (8) fixed bin (21), /* Length of buffers in 9 bit bytes */ 1 43 3 blind_buf_len (8) fixed bin (21), /* Lengths of other subset of buffers */ 1 44 3 nbufs fixed bin, /* Number of data buffers currently in use */ 1 45 3 buf_size fixed bin (21), /* Allocated size of data buffers in bytes */ 1 46 3 bufs_per_subset fixed bin, /* Number of buffers to write/read per I/O */ 1 47 3 cur_buf_idx fixed bin, /* Index into subset of current buffer */ 1 48 3 run bit (1), /* "1"b => wrt I/O queued thru tape_ioi_; "0"b => ^Queued */ 1 49 2 label_buffer, /* Info about label record buffer */ 1 50 3 lab_bufp ptr, /* Pointer to label I/O buffer */ 1 51 3 lab_buf_len fixed bin (21), /* Length of label buffer in 9 bit bytes */ 1 52 2 tlb ptr, /* Pointer to a temp label record structure */ 1 53 2 position, /* Position on current volume */ 1 54 3 phy_file fixed bin, /* physical file number */ 1 55 3 phy_block fixed bin, /* physical block within physical file */ 1 56 2 current_file, /* instantanious info about current file */ 1 57 3 cur_block, /* info about current block */ 1 58 4 cur_buf_ptr ptr, /* Pointer to the current data buffer */ 1 59 4 log_record_ptr ptr, /* Pointer to current logical record */ 1 60 4 length fixed bin (21), /* Length of current block in bytes */ 1 61 4 processed fixed bin (21), /* Number of chars processed already */ 1 62 4 remain fixed bin (21), /* Number of chars remaining to be processed */ 1 63 4 log_record fixed bin (21), /* Log. record within the current block */ 1 64 3 char_size fixed bin, /* Size in bits of the data chars of this file */ 1 65 3 padding_char char (1), /* To pad blocks to mod 4 on binary writes */ 1 66 3 length_mode fixed bin, /* 0 => W/R mod 4 blocks; 1 => W/R non-mod 4 blocks */ 1 67 3 hdw_mode fixed bin, /* Hardware recording mode: 1 68* 1 = binary; 2 = nine track; 3 = BCD */ 1 69 3 conversion fixed bin, /* File data conversion: 1 70* 0 = no conversion; 1 = ASCII<->EBCDIC; 2 = ASCII<->BCD */ 1 71 3 buffer_offset fixed bin, /* Number of bytes prior to data */ 1 72 3 block_size fixed bin (21), /* Maximum block size for this file */ 1 73 3 record_size fixed bin (21), /* Maximum record size for this file */ 1 74 3 prev_block_no fixed bin (21), /* Number of previous block read */ 1 75 3 ad_file_format fixed bin, /* 1 = U; 2 = F; 3 = D or V; 4 = S or VS */ 1 76 3 file_blocked bit (1), /* "1"b => file is blocked */ 1 77 3 native_file bit (1), /* "1"b => current file written by mtape_ PFM */ 1 78 3 write_after_read bit (1), /* "1"b => truncate file (and file_set) at this record */ 1 79 3 first_file bit (1), /* "1"b => first file has been processed */ 1 80 3 tot_bytes_processed fixed bin (35), /* total bytes in this file section */ 1 81 3 last_io fixed bin, /* Last I/O operation (1 = read; 2 = write) */ 1 82 3 lrec_rrcx fixed bin, /* current index of the lrec round robin counter */ 1 83 3 lrec_rrc, /* history of last n logical records */ 1 84 4 block_no (0:7) fixed bin (35), /* block (within file section) where lrec starts */ 1 85 4 block_len (0:7) fixed bin (35), /* block len of current block */ 1 86 4 lrec_no (0:7) fixed bin (35), /* logical record within currnt block */ 1 87 4 abs_byte (0:7) fixed bin (35), /* byte (within file section) where lrec starts */ 1 88 4 byte_offset (0:7) fixed bin, /* offset of 1st byte of lrec (within block) */ 1 89 3 blk_rrcx fixed bin, /* index into blk_rrrc array of last block */ 1 90 3 blk_rrrc (0:7) fixed bin (35), /* contains Lrec count of last n blocks */ 1 91 3 tot_lrec fixed bin (35), /* Total logical records processed in current file */ 1 92 2 tioi_id bit (36), /* Identifier used for calls to tape_ioi_ */ 1 93 2 attach_info_ptr ptr, /* Pointer to attach option info */ 1 94 2 open_info_ptr ptr, /* Pointer to open option info */ 1 95 2 close_info_ptr ptr, /* Pointer to close option info */ 1 96 2 detach_info_ptr ptr, /* Pointer to detach option info */ 1 97 2 pfm_info_ptr ptr, /* Pointer to PFM info block */ 1 98 2 saved_pfm_info_ptr ptr, /* Pointer to info for "change_module" control OP */ 1 99 2 pfm_name char (32), /* Name of Per-Format module */ 1 100 2 pfm_required_entries like pfm_entries, /* Required entry point declarations in PFM */ 1 101 2 pfm_work_area (32) fixed bin (35); /* PFM work buffer */ 1 102 1 103 dcl 1 pfm_entries based aligned, /* Entry declarations for PFM entries */ 1 104 2 pfm_init entry (ptr, fixed bin (35)), /* PFM initialization entry */ 1 105 2 file_open entry (ptr, fixed bin (35)), /* PFM file_open entry */ 1 106 2 file_close entry (ptr, fixed bin (35)), /* PFM file_close entry */ 1 107 2 read entry (ptr, fixed bin (35)), /* PFM read entry */ 1 108 2 write entry (ptr, fixed bin (35)), /* PFM write entry */ 1 109 2 order entry (ptr, char (*), ptr, ptr, fixed bin (35)), /* PFM control order entry */ 1 110 2 decode_file_labels entry (ptr, ptr, fixed bin, fixed bin, fixed bin (35)), 1 111 2 encode_file_labels entry (ptr, ptr, fixed bin, fixed bin, fixed bin, fixed bin (35)); 1 112 1 113 dcl all_buf_ptrs (16) ptr based (addr (mtape_data.buf_ptrs)); 1 114 dcl all_buf_lens (16) fixed bin (21) based (addr (mtape_data.buf_len)); 1 115 dcl tape_blk (mtape_data.length) char (1) unaligned based (mtape_data.cur_buf_ptr); /* template for a tape block */ 1 116 1 117 /* END INCLUDE FILE mtape_data.incl.pl1 */ 594 595 2 1 /* BEGIN INCLUDE FILE mtape_attach_info.incl.pl1. Created by J. A. Bush 06/13/83 */ 2 2 /* format: style4 */ 2 3 2 4 dcl maip ptr; 2 5 2 6 dcl mtape_attach_info_version_1 char (8) int static options (constant) init ("maiv0001"); 2 7 2 8 dcl 1 mtape_attach_info aligned based (maip), 2 9 2 version char (8), /* Current structure version */ 2 10 2 density fixed bin (35), /* 200, 556, 800, 1600, 6250 BPI */ 2 11 2 tracks fixed bin (35), /* Number of tracks, 7 or 9 */ 2 12 2 speed bit (36), /* "000"b = any speed; "1xx"b = 75 IPS; 2 13* "x1x"b = 125 IPS; "xx1"b = 200 IPS */ 2 14 2 ndrives fixed bin (35), /* 0 = unspecified; 1 - 63 devices to be used */ 2 15 2 wait_time fixed bin (35), /* time to wait in minutes for available device */ 2 16 2 pfm_prefix char (21), /* if "-volume_type" was specified */ 2 17 2 default_pfm_prefix char (21), /* if no "-vt" specified and blank volume */ 2 18 2 display bit (1), /* Display attach description on user_output */ 2 19 2 labeled bit (1), /* "1"b => labeled; "0"b => unlabeled volume set */ 2 20 2 wait bit (1), /* "1"b => wait for available devices; "0"b => don't wait */ 2 21 2 system bit (1), /* "1"b => User wants to be a "system" process */ 2 22 2 ring bit (1); /* "1"b => write ring in; "0"b => no write ring */ 2 23 2 24 /* END INCLUDE FILE mtape_attach_info.incl.pl1 */ 596 597 3 1 /* BEGIN INCLUDE FILE mtape_detach_info.incl.pl1. Created by J. A. Bush 06/13/83 */ 3 2 /* format: style4 */ 3 3 3 4 dcl mdip ptr; 3 5 3 6 dcl mtape_detach_info_version_1 char (8) int static options (constant) init ("mdiv0001"); 3 7 3 8 dcl 1 mtape_detach_info aligned based (mdip), 3 9 2 version char (8), /* Current structure version */ 3 10 2 comment char (64), /* To display on operators console at volume detach time */ 3 11 2 display bit (1), /* Display detach description on user_output */ 3 12 2 unload bit (1); /* "1"b => unload volume on detach; "0"b => rewind on detach */ 3 13 3 14 /* END INCLUDE FILE mtape_detach_info.incl.pl1 */ 598 599 4 1 /* BEGIN INCLUDE FILE mtape_vol_set.incl.pl1. Created by J. A. Bush 10/13/82 */ 4 2 /* The include file mtape_err_stats.incl.pl1 is referenced by this include file */ 4 3 /* format: style4 */ 4 4 4 5 dcl vs_ptr ptr; 4 6 4 7 dcl mtape_vs_version_1 char (8) int static options (constant) init ("mtvsv001"); 4 8 4 9 dcl 1 mtape_vol_set aligned based (vs_ptr), 4 10 2 version char (8), /* Current version */ 4 11 2 prev_vs_ptr ptr, /* Pointer to previous volume set entry */ 4 12 2 next_vs_ptr ptr, /* Pointer to next volume set entry */ 4 13 2 mrm_vs_ptr ptr, /* Pointer to Most Recently Mounted VS member */ 4 14 2 lrm_vs_ptr ptr, /* Pointer to Least Recently Mounted VS member */ 4 15 2 first_vl_ptr ptr, /* Pointer to the first volume label record structure */ 4 16 2 last_vl_ptr ptr, /* Pointer to the last volume label record structure */ 4 17 2 volume_name char (32), /* Name specified in the attach description */ 4 18 2 volume_id char (32), /* Name as recorded in the volume label */ 4 19 2 mount_comment char (64), /* Mount comment from attach description */ 4 20 2 demount_comment char (64), /* Demount comment from detach description */ 4 21 2 device_name char (8), /* Device volume is currently or last mounted on */ 4 22 2 rcp_id bit (36), /* RCP activation for this volume */ 4 23 2 tioi_id bit (36), /* tape_ioi_ activation for this volume */ 4 24 2 volume_index fixed bin, /* Volume sequence number within volume set */ 4 25 2 volume_density fixed bin, /* Actual volume density determined by RCP */ 4 26 2 volume_type fixed bin, /* Use rcp_volume_formats.incl.pl1 for decode */ 4 27 2 volume_check fixed bin, /* Refer to named constants below for values */ 4 28 2 number_of_vol_labels fixed bin, /* # of volume label records on this volume */ 4 29 2 auth_required bit (1), /* "1"b => Operator authentication was required */ 4 30 2 mounted bit (1), /* "1"b => volume currently mounted */ 4 31 2 ever_mounted bit (1), /* "1"b => volume has been mounted */ 4 32 2 volume_end bit (1), /* "1"b => reached end of volume (EOT foil) on write */ 4 33 2 first_file_unexpired bit (1), /* "1"b => first file of volume is unexpired */ 4 34 2 dev_att_retry bit (1), /* "1"b => DEVICE ATTENTION recovery in progress */ 4 35 2 pwr_off_retry bit (1), /* "1"b => POWER OFF recovery in progress */ 4 36 2 mounts fixed bin, /* Number of times volume mounted during attachment */ 4 37 2 tot_error_stats like mtape_err_stats, /* Summation of error statistics for all mounts */ 4 38 2 rel_error_stats like mtape_err_stats; /* Summation of error statistics, this mount */ 4 39 4 40 /* Named constants applied to volume_check variable, when volume label read by PFMs pfm_init entry */ 4 41 4 42 dcl (MTAPE_VOLUME init (1), /* Volume recorded by mtape_ (desired type) */ 4 43 MULT_PRIOR_VOLUME init (2), /* Volume recorded by prior Multics software 4 44* (desired type) */ 4 45 NON_MULT_VOLUME init (3), /* Volume recorded by other vendor (desired type) */ 4 46 BLANK_VOLUME init (4), /* Volume is blank/unreadable */ 4 47 UNLABELED_VOLUME init (5), /* Volume is unlabeled or has unrecognized label */ 4 48 RECOG_FORMAT_VOLUME init (6) /* Volume has label of other recognized format */ 4 49 ) fixed bin int static options (constant); 4 50 4 51 /* END INCLUDE FILE mtape_vol_set.incl.pl1 */ 600 601 5 1 /* BEGIN INCLUDE FILE mtape_file_info.incl.pl1. Created by J. A. Bush 10/13/82 */ 5 2 /* format: style4 */ 5 3 5 4 dcl fi_ptr ptr; 5 5 5 6 dcl mtape_fi_version_1 char (8) int static options (constant) init ("mtfiv001"); 5 7 5 8 dcl 1 mtape_file_info aligned based (fi_ptr), 5 9 2 version char (8), /* Current version */ 5 10 2 prev_fi_ptr ptr, /* Pointer to the previous file info structure */ 5 11 2 next_fi_ptr ptr, /* Pointer to the next file info structure */ 5 12 2 first_file_lab_ptr ptr, /* Pointer to 1st label record struc. */ 5 13 2 last_file_lab_ptr ptr, /* Pointer to last label record struc. */ 5 14 2 first_file_trail_ptr ptr, /* Pointer to 1st trailer record struc. */ 5 15 2 last_file_trail_ptr ptr, /* Pointer to last trailer record struc. */ 5 16 2 first_file_section_ptr ptr, /* Pointer to file_info struct. of 1st file section */ 5 17 2 begin_vs_ptr ptr, /* Pointer to 1st volume set struct. containing this file */ 5 18 2 end_vs_ptr ptr, /* Pointer to last volume set struct. containing this file */ 5 19 2 position_within_file fixed bin, /* 0 = In HDR; 1 = In data file; 2 = In trailer; 5 20* 3 = Not positioned within this file 5 21* 4 = At beginning of data file; 5 = At EOF */ 5 22 2 per_file_info, /* Information pertaining to entire file */ 5 23 3 file_id char (32), /* File identifier or name */ 5 24 3 file_set_id char (32), /* Identifies the file set */ 5 25 3 creation_date char (6), /* File creation date in form " yyddd" */ 5 26 3 expiration_date char (6), /* File expiration date in form " yyddd" */ 5 27 3 file_code char (3), /* Printable file code */ 5 28 3 file_format fixed bin, /* Current file format: 5 29* 0 = unspecified; 1 = U; 2 = F; 3 = D or V; 5 30* 4 = S or VS; 5 = FB; 5 31* 6 = DB or VB; 7 = SB or VBS; */ 5 32 3 seq_number fixed bin, /* File sequence number */ 5 33 3 generation fixed bin, /* File generation number, if supported */ 5 34 3 gen_version fixed bin, /* File generation version number, if supported */ 5 35 3 char_size fixed bin, /* Size in bits of the data chars of this file */ 5 36 3 hdw_mode fixed bin, /* Hardware mode: 1 = binary; 2 = nine; 3 = BCD */ 5 37 3 conversion fixed bin, /* File data conversion: 5 38* 1 = no conversion; 2 = ASCII<->EBCDIC; 3 = ASCII<->BCD */ 5 39 3 buffer_offset fixed bin, /* Number of bytes prior to data */ 5 40 3 length_mode fixed bin, /* 0 => W/R mod 4 blocks; 1 => W/R non-mod 4 blocks */ 5 41 3 block_size fixed bin (21), /* Maximum block size for this file */ 5 42 3 record_size fixed bin (21), /* Maximum record size for this file */ 5 43 3 native_file bit (1), /* "1"b => current file written by mtape_ PFM */ 5 44 3 user_labels_present bit (1), /* "1"b => UHL/UTL are present */ 5 45 3 unlabeled_file bit (1), /* "1"b => this is unlabeled file */ 5 46 3 pfm_opt_sw (5) bit (1), /* PFM dependent */ 5 47 3 pfm_opt_value (5) fixed bin (35), /* PFM dependent */ 5 48 3 pfm_opt_str (5) char (32), /* PFM dependent */ 5 49 2 per_section_info, /* Information pertaining only to this file section */ 5 50 3 section fixed bin, /* File section number for multi-volume files */ 5 51 3 phy_file fixed bin, /* Phy. file of HDR label GRP, on the current volume */ 5 52 3 first_file_on_volume bit (1), /* "1"b => First file or file section on this volume */ 5 53 3 end_of_file_set bit (1), /* "1"b => This is last file of file set */ 5 54 3 block_count fixed bin (35), /* Number of blocks in this file section */ 5 55 3 read_errors fixed bin (35), /* of errors encountered reading this file */ 5 56 3 write_errors fixed bin (35); /* of errors encountered writing this file */ 5 57 5 58 /* END INCLUDE FILE mtape_file_info.incl.pl1 */ 602 603 6 1 /* BEGIN INCLUDE FILE mtape_err_stats.incl.pl1. Created by J. A. Bush 07/22/83. */ 6 2 /* format: style4 */ 6 3 6 4 dcl es_ptr ptr; 6 5 6 6 dcl 1 mtape_err_stats aligned based (es_ptr), /* Error statistics block */ 6 7 2 read like err_entry, /* For read operations */ 6 8 2 write like err_entry, /* For write operations */ 6 9 2 orders like err_entry, /* For non-data xfer operations */ 6 10 2 successful_retry (7) fixed bin (35); /* retrys that succeeded after 1-7 trys */ 6 11 6 12 dcl 1 err_entry aligned based, 6 13 2 errors fixed bin (35), 6 14 2 operations fixed bin (35); 6 15 6 16 /* END INCLUDE FILE mtape_err_stats.incl.pl1 */ 604 605 7 1 /* Begin include file ..... tape_ioi_info.incl.pl1 */ 7 2 7 3 /* This structure defines data necessary as parameters to call tape_ioi_$activate */ 7 4 /* Prepared July 1976 by Larry Johnson */ 7 5 /* Modified the tenth anniversary of the Watergate breakin by Chris Jones */ 7 6 7 7 /* format: style4,delnl,insnl,indattr,ifthen,declareind10,dclind10 */ 7 8 dcl tioi_info_ptr ptr; 7 9 7 10 dcl (tioi_info_version, tioi_info_version_1) 7 11 fixed bin static options (constant) init (1); 7 12 7 13 dcl 1 tioi_info aligned based (tioi_info_ptr), 7 14 2 version fixed bin, 7 15 2 ioi_index fixed bin, 7 16 2 timeout_max fixed bin (71), 7 17 2 event_id fixed bin (71), 7 18 2 workspace_max fixed bin (19); 7 19 7 20 /* End include file ..... tape_ioi_info.incl.pl1 */ 606 607 8 1 /* Begin include file rcp_tape_info.incl.pl1 8 2* * 8 3* * Created on 12/16/74 by Bill Silver. 8 4* * Modified on 11/17/78 by Michael R. Jordan to add speed qualifier. 8 5* * Modified on 09/30/82 by J. A. Bush for version 3 structure info 8 6* * This include file defines the RCP device info structure for tapes. 8 7**/ 8 8 /* format: style4 */ 8 9 8 10 dcl tape_info_ptr ptr; /* Pointer to tape device info structure. */ 8 11 8 12 dcl tape_info_version_2 fixed bin internal static options (constant) init (2); 8 13 dcl tape_info_version_3 fixed bin internal static options (constant) init (3); 8 14 8 15 dcl 1 tape_info based (tape_info_ptr) aligned, /* RCP device info structure for tapes. */ 8 16 2 version_num fixed bin, /* Version number of this structure. */ 8 17 2 usage_time fixed bin, /* Number of minutes drive will/may be used. */ 8 18 2 wait_time fixed bin, /* Number of minutes user will/must wait. */ 8 19 2 system_flag bit (1), /* ON => user wants to be a system process. */ 8 20 2 device_name char (8), /* Tape drive name. */ 8 21 2 model fixed bin, /* Tape drive model number. */ 8 22 2 tracks fixed bin, /* Track type, 7 or 9. */ 8 23 2 density bit (36), /* Density capability: 200, 556, 800, 1600, 6250. */ 8 24 2 speed bit (36), /* Speed: 75, 125, 200. */ 8 25 2 unused_qualifier bit (36), /* Unused qualifier (must be "0"b). */ 8 26 2 volume_name char (32), /* Tape reel name. */ 8 27 2 write_flag bit (1), /* ON => writing on tape reel. */ 8 28 2 position_index fixed bin (35), /* Counter used to determine tape reel position. */ 8 29 8 30 /* Limit of version 2 structure, info below returned if version 3 or greater */ 8 31 8 32 2 volume_type fixed bin, /* Use rcp_volume_formats.incl.pl1 for decodes */ 8 33 2 volume_density fixed bin, /* 1 - 5 = 200, 556, 800, 1600, or 6250 BPI */ 8 34 2 opr_auth bit (1); /* "1"b => Operator Authentication was required */ 8 35 8 36 /* End of include file ... rcp_tape_info.incl.pl1 */ 608 9 1 /* --------------- BEGIN include file rcp_volume_formats.incl.pl1 --------------- */ 9 2 9 3 9 4 9 5 /****^ HISTORY COMMENTS: 9 6* 1) change(86-12-08,GWMay), approve(86-12-08,PBF7552), 9 7* audit(86-12-08,Martinson), install(86-12-17,MR12.0-1250): 9 8* added array entry 0 to the volume format types to indicate that the tape 9 9* volume was not authenticated by rcp. 9 10* END HISTORY COMMENTS */ 9 11 9 12 9 13 /* General volume types */ 9 14 9 15 dcl (Volume_unauthenticated initial (0), 9 16 Volume_blank initial (1), 9 17 Volume_unknown_format initial (6), 9 18 Volume_unreadable initial (7), 9 19 9 20 /* Tape volume types */ 9 21 9 22 Volume_multics_tape initial (2), 9 23 Volume_gcos_tape initial (3), 9 24 Volume_ibm_tape initial (4), 9 25 Volume_ansi_tape initial (5)) fixed bin static options (constant); 9 26 9 27 /* Printable descriptions of volume types */ 9 28 9 29 dcl Tape_volume_types (0:7) char (16) static options (constant) initial 9 30 ("unauthenticated", 9 31 "blank", 9 32 "Multics", 9 33 "GCOS", 9 34 "IBM", 9 35 "ANSI", 9 36 "unrecognizable", 9 37 "unreadable"); 9 38 9 39 /* ---------------- END include file rcp_volume_formats.incl.pl1 ---------------- */ 609 610 10 1 /* BEGIN INCLUDE FILE mtape_constants.incl.pl1. Created by J. A. Bush 10/07/82 */ 10 2 /* format: style4 */ 10 3 10 4 /* This include file defines various named constants used throughout mtape_ 10 5* and its associated Per-Format modules */ 10 6 10 7 /* Storage allocation constants, used to denote what type of storage to allocate */ 10 8 10 9 dcl (MTAPE_ALLOC_VS init (1), /* to allocate a volume_set structure */ 10 10 MTAPE_ALLOC_LR init (2), /* to allocate a label record structure */ 10 11 MTAPE_ALLOC_FI init (3), /* to allocate a file_info structure */ 10 12 MTAPE_ALLOC_STR init (4) /* to allocate a character string, or undefined block */ 10 13 ) fixed bin int static options (constant); 10 14 10 15 /* Volume density constants */ 10 16 10 17 dcl MTAPE_VALID_DENSITIES (5) init (200, 556, 800, 1600, 6250) 10 18 fixed bin int static options (constant); 10 19 10 20 /* Device speed constants */ 10 21 10 22 dcl MTAPE_SPEED_VALUES (4) init (0, 75, 125, 200) /* 0 is any speed device */ 10 23 fixed bin int static options (constant); 10 24 10 25 /* Hardware Mode constants */ 10 26 10 27 dcl (MTAPE_HWM_BIN init (1), /* For binary hardware mode */ 10 28 MTAPE_HWM_NINE init (2), /* For nine hardware mode */ 10 29 MTAPE_HWM_BCD init (3) /* For BCD hardware mode */ 10 30 ) fixed bin int static options (constant); 10 31 10 32 /* Data conversion constants */ 10 33 10 34 dcl (MTAPE_UNSPECIFIED init (0), /* attribute not specified */ 10 35 MTAPE_NO_CONVERSION init (1), /* No conversion on input or output */ 10 36 MTAPE_CV_EBCDIC init (2), /* Convert to/from EBCDIC (from/to ASCII) */ 10 37 MTAPE_CV_BCD init (3), /* Convert to/from BCD (from/to ASCII) */ 10 38 MTAPE_CV_UC_ASCII init (4), /* Convert to Upper case ASCII (from any case ASCII) */ 10 39 MTAPE_CV_UC_EBCDIC init (5) /* Convert to Upper case EBCDIC (from any case ASCII) */ 10 40 ) fixed bin int static options (constant); 10 41 10 42 /* File positioning constants */ 10 43 10 44 dcl (NOT_POSITIONED_IN_FILE init (0), /* Not currently positioned within this file */ 10 45 AT_BOFH init (1), /* Positioned at beginning of file hdr */ 10 46 AT_EOFH init (2), /* Positioned at end of file hdr */ 10 47 AT_BOFD init (3), /* Positioned at beginning of file data */ 10 48 AT_IFD init (4), /* Positioned in file data, not beginning */ 10 49 AT_EOFD init (5), /* Positioned prior to end of data file */ 10 50 AT_BOFT init (6), /* Positioned at beginning of trailer label file */ 10 51 AT_EOFT init (7), /* Positioned at end of trailer label file */ 10 52 AT_EOF init (8), /* Positioned after trailer labels at EOF */ 10 53 FILES_PER_FILE_GRP init (3) /* # of physical files per file (section) group */ 10 54 ) fixed bin int static options (constant); 10 55 10 56 dcl (BOF_LABEL init (1), /* indicates beginning of file label */ 10 57 EOV_LABEL init (2), /* indicates end of volume label */ 10 58 EOF_LABEL init (3) /* indicates end of file label */ 10 59 ) fixed bin int static options (constant); 10 60 10 61 /* user query constant codes */ 10 62 10 63 dcl (Q_NO_NEXT_VOLUME init (1), 10 64 Q_LABELED_VOLUME init (2), 10 65 Q_UNEXPIRED_VOLUME init (3), 10 66 Q_INCORRECT_VOLUME init (4), 10 67 Q_UNEXPIRED_FILE init (5), 10 68 Q_ABORT_FILE init (6) 10 69 ) fixed bin int static options (constant); 10 70 10 71 /* END INCLUDE FILE mtape_constants.incl.pl1 */ 611 11 1 /* Begin include file ... rcp_resource_types.incl.pl1 11 2* * 11 3* * Created 3/79 by Michael R. Jordan for MR7.0R 11 4* * 11 5* * This include file defines the official RCP resource types. 11 6* * The array of names is indexed by the corresponding device type. 11 7* * MOD by RAF for MCA 11 8**/ 11 9 11 10 11 11 11 12 /****^ HISTORY COMMENTS: 11 13* 1) change(85-09-09,Fawcett), approve(85-09-09,MCR6979), 11 14* audit(85-12-09,CLJones), install(86-03-21,MR12.0-1033): 11 15* Support of MCA. 11 16* END HISTORY COMMENTS */ 11 17 11 18 dcl DEVICE_TYPE (8) char (32) 11 19 internal static options (constant) 11 20 init ("tape_drive", "disk_drive", "console", "printer", "punch", "reader", "special", "mca"); 11 21 11 22 dcl NUM_QUALIFIERS (8) fixed bin /* Number of qualifiers for each device type. */ 11 23 internal static init (3, 0, 0, 2, 0, 0, 0, 0); 11 24 11 25 dcl VOLUME_TYPE (8) char (32) 11 26 internal static options (constant) 11 27 init ("tape_vol", "disk_vol", "", "", "", "", "", ""); 11 28 11 29 dcl TAPE_DRIVE_DTYPEX fixed bin static internal options (constant) init (1); 11 30 dcl DISK_DRIVE_DTYPEX fixed bin static internal options (constant) init (2); 11 31 dcl CONSOLE_DTYPEX fixed bin static internal options (constant) init (3); 11 32 dcl PRINTER_DTYPEX fixed bin static internal options (constant) init (4); 11 33 dcl PUNCH_DTYPEX fixed bin static internal options (constant) init (5); 11 34 dcl READER_DTYPEX fixed bin static internal options (constant) init (6); 11 35 dcl SPECIAL_DTYPEX fixed bin static internal options (constant) init (7); 11 36 dcl MCA_DTYPEX fixed bin static internal options (constant) init (8); 11 37 dcl TAPE_VOL_VTYPEX fixed bin static internal options (constant) init (1); 11 38 dcl DISK_VOL_VTYPEX fixed bin static internal options (constant) init (2); 11 39 11 40 11 41 /* End include file ... rcp_resource_types.incl.pl1 */ 612 613 12 1 /* BEGIN INCLUDE FILE ... event_wait_channel.incl.pl1 */ 12 2 12 3 /* ipc_$block wait list with one channel 12 4* 12 5* Written 9-May-79 by M. N. Davidoff. 12 6**/ 12 7 12 8 declare 1 event_wait_channel aligned, 12 9 2 n_channels fixed bin initial (1), /* number of channels */ 12 10 2 pad bit (36), 12 11 2 channel_id (1) fixed bin (71); /* event channel to wait on */ 12 12 12 13 /* END INCLUDE FILE ... event_wait_channel.incl.pl1 */ 614 13 1 /* BEGIN INCLUDE FILE event_wait_info.incl.pl1 */ 13 2 13 3 /* T. Casey, May 1978 */ 13 4 13 5 dcl event_wait_info_ptr ptr; 13 6 13 7 dcl 1 event_wait_info aligned based (event_wait_info_ptr), /* argument structure filled in on return from ipc_$block */ 13 8 2 channel_id fixed bin (71), /* event channel on which wakeup occurred */ 13 9 2 message fixed bin (71), /* 72 bits of information passed by sender of wakeup */ 13 10 2 sender bit (36), /* process id of sender */ 13 11 2 origin, 13 12 3 dev_signal bit (18) unaligned, /* "1"b if device signal */ 13 13 3 ring fixed bin (17) unaligned, /* ring from which sent */ 13 14 2 channel_index fixed bin; /* index of this channel in the event wait list */ 13 15 13 16 /* END INCLUDE FILE event_wait_info.incl.pl1 */ 615 616 14 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 14 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 14 3* version number to IOX2. */ 14 4 /* format: style2 */ 14 5 14 6 dcl 1 iocb aligned based, /* I/O control block. */ 14 7 2 version character (4) aligned, /* IOX2 */ 14 8 2 name char (32), /* I/O name of this block. */ 14 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 14 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 14 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 14 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 14 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 14 14 2 reserved bit (72), /* Reserved for future use. */ 14 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 14 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 14 17 /* open(p,mode,not_used,s) */ 14 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 14 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 14 20 /* get_line(p,bufptr,buflen,actlen,s) */ 14 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 14 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 14 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 14 24 /* put_chars(p,bufptr,buflen,s) */ 14 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 14 26 /* modes(p,newmode,oldmode,s) */ 14 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 14 28 /* position(p,u1,u2,s) */ 14 29 2 control entry (ptr, char (*), ptr, fixed (35)), 14 30 /* control(p,order,infptr,s) */ 14 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 14 32 /* read_record(p,bufptr,buflen,actlen,s) */ 14 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 14 34 /* write_record(p,bufptr,buflen,s) */ 14 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 14 36 /* rewrite_record(p,bufptr,buflen,s) */ 14 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 14 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 14 39 /* seek_key(p,key,len,s) */ 14 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 14 41 /* read_key(p,key,len,s) */ 14 42 2 read_length entry (ptr, fixed (21), fixed (35)), 14 43 /* read_length(p,len,s) */ 14 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 14 45 /* open_file(p,mode,desc,not_used,s) */ 14 46 2 close_file entry (ptr, char (*), fixed bin (35)), 14 47 /* close_file(p,desc,s) */ 14 48 2 detach entry (ptr, char (*), fixed bin (35)); 14 49 /* detach(p,desc,s) */ 14 50 14 51 declare iox_$iocb_version_sentinel 14 52 character (4) aligned external static; 14 53 14 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 617 618 15 1 /* START OF: tape_ioi_dcls.incl.pl1 * * * * * * * * * * * * * * * * */ 15 2 15 3 /* Written 22 April 1982 by Chris Jones */ 15 4 /* Modified September 1983 by Chris Jones for reserve_buffer and release_buffer */ 15 5 /* format: style4,delnl,insnl,indattr,ifthen,declareind10,dclind10 */ 15 6 15 7 /* call tape_ioi_$activate (rsc_ptr, tioi_info_ptr, tioi_id, code); */ 15 8 dcl tape_ioi_$activate entry (ptr, ptr, bit (36) aligned, fixed bin (35)); 15 9 15 10 /* call tape_ioi_$allocate_buffers (tioi_id, req_length, req_number, act_length, act_number, buffer_ptrs, code); */ 15 11 dcl tape_ioi_$allocate_buffers 15 12 entry (bit (36) aligned, fixed bin (21), fixed bin, fixed bin (21), fixed bin, 15 13 dim (*) ptr, fixed bin (35)); 15 14 15 15 /* call tape_ioi_$allocate_work_area (tioi_id, req_size, act_size, work_area_ptr, code); */ 15 16 dcl tape_ioi_$allocate_work_area 15 17 entry (bit (36) aligned, fixed bin (19), fixed bin (19), ptr, fixed bin (35)); 15 18 15 19 /* call tape_ioi_$buffer_status (tioi_id, buffer_ptr, tbs_ptr, code); */ 15 20 dcl tape_ioi_$buffer_status 15 21 entry (bit (36) aligned, ptr, ptr, fixed bin (35)); 15 22 15 23 /* call tape_ioi_$check_order (tioi_id, ocount, rx, code); */ 15 24 dcl tape_ioi_$check_order entry (bit (36) aligned, fixed bin, fixed bin, fixed bin (35)); 15 25 15 26 /* call tape_ioi_$check_read (tioi_id, buffer_ptr, data_len, rx, code); */ 15 27 dcl tape_ioi_$check_read entry (bit (36) aligned, ptr, fixed bin (21), fixed bin, fixed bin (35)); 15 28 15 29 /* call tape_ioi_$check_write (tioi_id, buffer_ptr, rx, code); */ 15 30 dcl tape_ioi_$check_write entry (bit (36) aligned, ptr, fixed bin, fixed bin (35)); 15 31 15 32 /* call tape_ioi_$deactivate (tioi_id, error_ptr, code); */ 15 33 dcl tape_ioi_$deactivate entry (bit (36) aligned, ptr, fixed bin (35)); 15 34 15 35 /* call tape_ioi_$deallocate (tioi_id, code); */ 15 36 dcl tape_ioi_$deallocate entry (bit (36) aligned, fixed bin (35)); 15 37 15 38 /* call tape_ioi_$deallocate_buffers (tioi_id, code); */ 15 39 dcl tape_ioi_$deallocate_buffers 15 40 entry (bit (36) aligned, fixed bin (35)); 15 41 15 42 /* call tape_ioi_$get_mode (tioi_id, mode, data_ptr, code); */ 15 43 dcl tape_ioi_$get_mode entry (bit (36) aligned, char (*), ptr, fixed bin (35)); 15 44 15 45 /* call tape_ioi_$get_statistics (tioi_id, tec_ptr, code); */ 15 46 dcl tape_ioi_$get_statistics 15 47 entry (bit (36) aligned, ptr, fixed bin (35)); 15 48 15 49 /* call tape_ioi_$hardware_status (tioi_id, ths_ptr, code); */ 15 50 dcl tape_ioi_$hardware_status 15 51 entry (bit (36) aligned, ptr, fixed bin (35)); 15 52 15 53 /* call tape_ioi_$list_buffers (tioi_id, state, buffer_ptrs, num_buffers, code); */ 15 54 dcl tape_ioi_$list_buffers entry (bit (36) aligned, fixed bin, dim (*) ptr, fixed bin, fixed bin (35)); 15 55 15 56 /* call tape_ioi_$order (tioi_id, order, count, data_ptr, ocount, rx, code); */ 15 57 dcl tape_ioi_$order entry (bit (36) aligned, char (4), fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); 15 58 15 59 /* call tape_ioi_$queue_order (tioi_id, order, count, data_ptr, code); */ 15 60 dcl tape_ioi_$queue_order entry (bit (36) aligned, char (4), fixed bin, ptr, fixed bin (35)); 15 61 15 62 /* call tape_ioi_$queue_read (tioi_id, buffer_ptr, code); */ 15 63 dcl tape_ioi_$queue_read entry (bit (36) aligned, ptr, fixed bin (35)); 15 64 15 65 /* call tape_ioi_$queue_write (tioi_id, buffer_ptr, data_len, code); */ 15 66 dcl tape_ioi_$queue_write entry (bit (36) aligned, ptr, fixed bin (21), fixed bin (35)); 15 67 15 68 /* call tape_ioi_$read (tioi_id, buffer_ptr, data_len, rx, code); */ 15 69 dcl tape_ioi_$read entry (bit (36) aligned, ptr, fixed bin (21), fixed bin, fixed bin (35)); 15 70 15 71 /* call tape_ioi_$release_buffer (tioi_id, buffer_ptr, code); */ 15 72 dcl tape_ioi_$release_buffer 15 73 entry (bit (36) aligned, ptr, fixed bin (35)); 15 74 15 75 /* call tape_ioi_$reserve_buffer (tioi_id, buffer_ptr, code); */ 15 76 dcl tape_ioi_$reserve_buffer 15 77 entry (bit (36) aligned, ptr, fixed bin (35)); 15 78 15 79 /* call tape_ioi_$reset_statistics (tioi_id, code); */ 15 80 dcl tape_ioi_$reset_statistics 15 81 entry (bit (36) aligned, fixed bin (35)); 15 82 15 83 /* call tape_ioi_$set_buffer_ready (tioi_id, buffer_ptr, code); */ 15 84 dcl tape_ioi_$set_buffer_ready 15 85 entry (bit (36) aligned, ptr, fixed bin (35)); 15 86 15 87 /* call tape_ioi_$set_mode (tioi_id, mode, data_ptr, code); */ 15 88 dcl tape_ioi_$set_mode entry (bit (36) aligned, char (*), ptr, fixed bin (35)); 15 89 15 90 /* call tape_ioi_$stop_tape (tioi_id, count, rx, code); */ 15 91 dcl tape_ioi_$stop_tape entry (bit (36) aligned, fixed bin, fixed bin, fixed bin (35)); 15 92 15 93 /* call tape_ioi_$write (tioi_id, write_buffer_ptrs, data_len, buffer_ptr, rx, code); */ 15 94 dcl tape_ioi_$write entry (bit (36) aligned, (*) ptr, fixed bin (21), ptr, fixed bin, fixed bin (35)); 15 95 15 96 /* END OF: tape_ioi_dcls.incl.pl1 * * * * * * * * * * * * * * * * */ 619 16 1 /* START OF: tape_ioi_error_counts.incl.pl1 * * * * * * * * * * * * * * * * */ 16 2 /* Written 22 April 1982 by Chris Jones */ 16 3 16 4 /* format: style4,delnl,insnl,indattr,ifthen,declareind10,dclind10 */ 16 5 dcl tape_ioi_error_counts_ptr 16 6 ptr; 16 7 16 8 dcl 1 tec based (tape_ioi_error_counts_ptr) aligned, 16 9 2 version char (8), 16 10 2 reads like tec_entry, 16 11 2 successful_retry_strategy 16 12 (7) fixed bin (35), 16 13 2 writes like tec_entry, 16 14 2 orders like tec_entry; 16 15 16 16 dcl 1 tec_entry based aligned, 16 17 2 total fixed bin (35), 16 18 2 errors fixed bin (35); 16 19 16 20 dcl TEC_VERSION_1 char (8) aligned internal static options (constant) init ("TECV001"); 16 21 16 22 dcl TEC_VERSION char (8) aligned internal static options (constant) init ("TECV001"); 16 23 16 24 /* END OF: tape_ioi_error_counts.incl.pl1 * * * * * * * * * * * * * * * * */ 620 621 17 1 /* Begin include file ..... tape_ioi_buffer_status.incl.pl1 */ 17 2 17 3 /* This structure defines the data returned by tape_ioi_$buffer_status */ 17 4 /* Modified April 1982 by Chris Jones */ 17 5 /* Modified 2 February 1983 by Chris Jones to add support for reserved buffers. */ 17 6 /* format: style4,delnl,insnl,indattr,ifthen,declareind10,dclind10 */ 17 7 dcl tbs_ptr ptr; 17 8 17 9 dcl 1 tbs aligned based (tbs_ptr), 17 10 2 version fixed bin, 17 11 2 state fixed bin, 17 12 2 buffer_len fixed bin (21), 17 13 2 data_len fixed bin (21), 17 14 2 bit_count fixed bin (24), 17 15 2 channel_inst bit (6), 17 16 2 data_mode char (4), 17 17 ( 17 18 2 align_mode bit (1), 17 19 2 length_mode bit (1), 17 20 2 recovery_mode bit (1), 17 21 2 reserved bit (1), 17 22 2 pad bit (32) 17 23 ) unal; 17 24 17 25 dcl TBS_VERSION_1 fixed bin internal static init (1) options (constant); 17 26 17 27 dcl TBS_VERSION fixed bin internal static init (1) options (constant); 17 28 17 29 dcl READY_STATE fixed bin internal static options (constant) init (1); 17 30 dcl QUEUED_STATE fixed bin internal static options (constant) init (2); 17 31 dcl SUSPENDED_STATE fixed bin internal static options (constant) init (3); 17 32 dcl READY_AND_RESERVED_STATE fixed bin internal static options (constant) init (4); 17 33 17 34 /* End include file ..... tape_ioi_buffer_status.incl.pl1 */ 622 623 624 end mtape_mount_cntl_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/30/87 1323.7 mtape_mount_cntl_.pl1 >spec>install>1006>mtape_mount_cntl_.pl1 594 1 02/16/84 1452.3 mtape_data.incl.pl1 >ldd>include>mtape_data.incl.pl1 596 2 02/16/84 1452.3 mtape_attach_info.incl.pl1 >ldd>include>mtape_attach_info.incl.pl1 598 3 02/16/84 1452.3 mtape_detach_info.incl.pl1 >ldd>include>mtape_detach_info.incl.pl1 600 4 02/16/84 1452.4 mtape_vol_set.incl.pl1 >ldd>include>mtape_vol_set.incl.pl1 602 5 02/16/84 1452.3 mtape_file_info.incl.pl1 >ldd>include>mtape_file_info.incl.pl1 604 6 02/16/84 1452.3 mtape_err_stats.incl.pl1 >ldd>include>mtape_err_stats.incl.pl1 606 7 12/01/82 1039.8 tape_ioi_info.incl.pl1 >ldd>include>tape_ioi_info.incl.pl1 608 8 04/05/83 0853.0 rcp_tape_info.incl.pl1 >ldd>include>rcp_tape_info.incl.pl1 609 9 12/17/86 1550.5 rcp_volume_formats.incl.pl1 >ldd>include>rcp_volume_formats.incl.pl1 611 10 02/16/84 1452.3 mtape_constants.incl.pl1 >ldd>include>mtape_constants.incl.pl1 612 11 03/27/86 1120.0 rcp_resource_types.incl.pl1 >ldd>include>rcp_resource_types.incl.pl1 614 12 06/29/79 1728.0 event_wait_channel.incl.pl1 >ldd>include>event_wait_channel.incl.pl1 615 13 06/29/79 1727.8 event_wait_info.incl.pl1 >ldd>include>event_wait_info.incl.pl1 617 14 05/20/83 1846.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 619 15 09/16/83 1110.4 tape_ioi_dcls.incl.pl1 >ldd>include>tape_ioi_dcls.incl.pl1 620 16 12/01/82 1039.8 tape_ioi_error_counts.incl.pl1 >ldd>include>tape_ioi_error_counts.incl.pl1 622 17 09/16/83 1110.4 tape_ioi_buffer_status.incl.pl1 >ldd>include>tape_ioi_buffer_status.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. DEVICE_TYPE 000006 constant char(32) initial array unaligned dcl 11-18 set ref 159* DISPOSITION 000222 constant bit(1) initial unaligned dcl 73 set ref 264* DONT_SAVE_CUR_BUF constant bit(1) initial unaligned dcl 75 set ref 318* MTAPE_ALLOC_STR 000223 constant fixed bin(17,0) initial dcl 10-9 set ref 394* MTAPE_VALID_DENSITIES 000106 constant fixed bin(17,0) initial array dcl 10-17 ref 217 Q_NO_NEXT_VOLUME 000225 constant fixed bin(17,0) initial dcl 10-63 set ref 305* READY_STATE 000225 constant fixed bin(17,0) initial dcl 17-29 set ref 528* SAVE_CUR_BUF 000221 constant bit(1) initial unaligned dcl 74 set ref 367* 527 SUSPENDED_STATE 000174 constant fixed bin(17,0) initial dcl 17-31 set ref 539* Stape_is_readable 000274 automatic bit(1) dcl 64 set ref 212* 216* 223* 231 TAPE_DRIVE_DTYPEX constant fixed bin(17,0) initial dcl 11-29 ref 159 TBS_VERSION_1 constant fixed bin(17,0) initial dcl 17-25 ref 526 TEC_VERSION_1 000004 constant char(8) initial dcl 16-20 ref 257 Tape_volume_types 000113 constant char(16) initial array unaligned dcl 9-29 set ref 223* Volume_blank constant fixed bin(17,0) initial dcl 9-15 ref 210 Volume_unreadable constant fixed bin(17,0) initial dcl 9-15 ref 210 WRITE_IO constant fixed bin(17,0) initial dcl 76 ref 527 act_len 000116 automatic fixed bin(21,0) dcl 58 set ref 568* act_num 000165 automatic fixed bin(17,0) dcl 61 set ref 568* act_work_area_len 000101 automatic fixed bin(19,0) dcl 53 set ref 322* 466* 471 473* addr builtin function dcl 87 ref 199 199 199 199 256 449 524 531 531 546 546 557 558 582 583 584 584 all_buf_lens based fixed bin(21,0) array dcl 1-114 set ref 558* 583* all_buf_ptrs based pointer array dcl 1-113 set ref 557* 584 any_other 000344 stack reference condition dcl 88 ref 350 381 483 arg_code parameter fixed bin(35,0) dcl 46 set ref 125 129* 241* 247 250* 292* arg_mtdp parameter pointer dcl 45 set ref 125 127 247 249 360 362 479* atbs 000324 automatic structure level 1 dcl 67 set ref 531 531 533 546 546 548 attach_data_ptr 16 based pointer level 2 dcl 14-6 set ref 353* 384* 486* attach_info_ptr 274 based pointer level 2 dcl 1-8 set ref 128 301 363 auth_required 107 based bit(1) level 2 dcl 4-9 set ref 238* auto_err_count 000305 automatic structure level 1 dcl 66 set ref 256 auto_tioi_info 000276 automatic structure level 1 dcl 65 set ref 449 based_buffer based char unaligned dcl 121 set ref 535 550 584* 584 begin_vs_ptr 20 based pointer level 2 dcl 5-8 ref 507 block_size 176 based fixed bin(21,0) level 3 dcl 1-8 set ref 525 578* buf_len 122 based fixed bin(21,0) array level 3 dcl 1-8 set ref 558 583 buf_ptrs 62 based pointer array level 3 dcl 1-8 set ref 557 584 buffer 431 based char array level 3 packed unaligned dcl 114 set ref 535* 550* 584 channel_id 2 000374 automatic fixed bin(71,0) array level 2 dcl 12-8 set ref 168* clean_code 000106 automatic fixed bin(35,0) dcl 425 set ref 427* 428 cleanup 000352 stack reference condition dcl 88 ref 171 208 code 000112 automatic fixed bin(35,0) dcl 57 set ref 129* 132 159* 161 162* 175* 181* 183 183 192* 196* 199* 201 202* 241 255* 258* 264* 292 403* 404 405* 439* 440 441* 442 443* 456* 457 458* 466* 467 468* 472* 473* cur_buf_disp parameter bit(1) unaligned dcl 518 ref 516 527 cur_buf_idx 145 based fixed bin(17,0) level 3 dcl 1-8 set ref 587* current_file 160 based structure level 2 dcl 1-8 data_buffers 62 based structure level 2 dcl 1-8 data_len 3 000324 automatic fixed bin(21,0) level 2 in structure "atbs" dcl 67 in procedure "mtape_mount_cntl_" set ref 534 549 data_len 3 based fixed bin(21,0) level 2 in structure "tbs" dcl 17-9 in procedure "mtape_mount_cntl_" ref 583 demount_comment 56 based char(64) level 2 dcl 4-9 ref 264 density 2 based fixed bin(35,0) level 2 in structure "mtape_attach_info" dcl 2-8 in procedure "mtape_mount_cntl_" ref 142 144 146 148 213 density 10 based bit(36) level 2 in structure "tape_info" dcl 8-15 in procedure "mtape_mount_cntl_" set ref 142* 144* 146* 148* 150* device_name 4 based char(8) level 2 in structure "tape_info" dcl 8-15 in procedure "mtape_mount_cntl_" set ref 138* 223* 230 device_name 76 based char(8) level 2 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 230* 266* dl 000115 automatic fixed bin(21,0) dcl 58 set ref 534* 535 549* 550 583* 584 584 drives_in_use 60 based fixed bin(17,0) level 2 dcl 1-8 set ref 239* 239 268* 268 333 err_count 000105 automatic fixed bin(17,0) dcl 54 set ref 259* 264* err_entry based structure level 1 dcl 6-12 error_table_$area_too_small 000014 external static fixed bin(35,0) dcl 82 ref 472 error_table_$resource_reserved 000012 external static fixed bin(35,0) dcl 81 ref 183 error_table_$resource_unavailable 000010 external static fixed bin(35,0) dcl 80 ref 181 183 error_table_$unimplemented_version 000016 external static fixed bin(35,0) dcl 83 ref 311 errors 140 based fixed bin(35,0) level 4 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 259 errors 136 based fixed bin(35,0) level 4 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 259 errors 134 based fixed bin(35,0) level 4 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 259 event_id 4 based fixed bin(71,0) level 2 dcl 7-13 set ref 453* event_info 000334 automatic structure level 1 dcl 68 set ref 199 199 event_wait_channel 000374 automatic structure level 1 dcl 12-8 set ref 199 199 event_wait_info based structure level 1 dcl 13-7 ever_mounted 111 based bit(1) level 2 dcl 4-9 set ref 233* fi_current 34 based pointer level 2 dcl 1-8 set ref 500 fi_ptr 000366 automatic pointer dcl 5-4 set ref 500* 507 get_temp_segment_ 000050 constant entry external dcl 103 ref 520 hcs_$assign_channel 000040 constant entry external dcl 99 ref 439 hcs_$reset_ips_mask 000020 constant entry external dcl 91 ref 350 355 381 386 483 489 hcs_$set_ips_mask 000022 constant entry external dcl 92 ref 351 382 484 i 000162 automatic fixed bin(17,0) dcl 61 set ref 544* 546 550 551* 581* 582 583 584 584* io_echan 42 based fixed bin(71,0) level 2 dcl 1-8 set ref 438 439* 441* 453 ioa_ 000054 constant entry external dcl 105 ref 154 223 iocb based structure level 1 dcl 14-6 iocb_ptr 4 based pointer level 2 dcl 1-8 set ref 353 354* 384 385* 486 487* ioi_id 000104 automatic fixed bin(17,0) dcl 54 set ref 175* 451 ioi_index 1 based fixed bin(17,0) level 2 dcl 7-13 set ref 451* iox_$propagate 000046 constant entry external dcl 102 ref 354 385 487 ipc_$block 000042 constant entry external dcl 100 ref 199 ipc_$create_ev_chn 000044 constant entry external dcl 101 ref 403 441 ips_mask 000107 automatic bit(36) dcl 55 set ref 349* 350* 350* 351* 355* 355* 380* 381* 381* 382* 386* 386* 482* 483* 483* 484* 489* 489* j 000163 automatic fixed bin(17,0) dcl 61 set ref 536* 538* 542 545* 545 548 550 lab_buf_len 152 based fixed bin(21,0) level 3 dcl 1-8 set ref 568* lab_bufp 150 based pointer level 3 dcl 1-8 set ref 559* 573* label_buffer 150 based structure level 2 dcl 1-8 last_io 207 based fixed bin(17,0) level 3 dcl 1-8 set ref 527 lbuf_arrayp 000160 automatic pointer array dcl 60 set ref 568* 571* 573 lrm_vs_ptr 10 based pointer level 2 dcl 4-9 set ref 236* 273 274* 274 278* 282 282 286 287 287 290* 504 506 maip 000362 automatic pointer dcl 2-4 set ref 128* 140 141 142 144 146 148 154 183 183 192 213 301* 333 363* 397 398 498 max_buf_len 000114 automatic fixed bin(35,0) dcl 57 set ref 525* 533 533 535 535 535 548 548 550 550 550 582 582 584 584 584 model 6 based fixed bin(17,0) level 2 dcl 8-15 set ref 139* mount_comment 36 based char(64) level 2 dcl 4-9 ref 159 mount_echan 44 based fixed bin(71,0) level 2 dcl 1-8 set ref 159* 168 402 403* mounted 110 based bit(1) level 2 dcl 4-9 set ref 233* 265* 320 mounts 116 based fixed bin(17,0) level 2 dcl 4-9 set ref 209* 209 mrm_vs_ptr 6 based pointer level 2 dcl 4-9 set ref 234* 274 274 278 278 281 282* 282 287* 290* 507 507 mtape_attach_info based structure level 1 dcl 2-8 mtape_data based structure level 1 dcl 1-8 set ref 322 322 324* 324 464 478* 478 523 mtape_err_stats based structure level 1 dcl 6-6 mtape_file_info based structure level 1 dcl 5-8 mtape_io_$allocate_buffers 000034 constant entry external dcl 97 ref 578 mtape_io_$order 000036 constant entry external dcl 98 ref 315 328 mtape_util_$alloc 000024 constant entry external dcl 93 ref 394 mtape_util_$error 000026 constant entry external dcl 94 ref 162 177 192 196 202 405 443 458 468 473 mtape_util_$get_statistics 000030 constant entry external dcl 95 ref 255 555 mtape_util_$user_query 000032 constant entry external dcl 96 ref 305 mtape_vol_set based structure level 1 dcl 4-9 mtape_vs_version_1 000154 constant char(8) initial unaligned dcl 4-7 ref 310 mtdp 000360 automatic pointer dcl 1-4 set ref 127* 128 130 136 137 159 162* 168 177* 192* 196* 202* 234 234 236 237 239 239 249* 251 255* 268 268 286 300* 301 305* 308 314 315* 322 322 324 325* 326 327 328* 333 335* 338 339* 344 344* 348 353 353 354 362* 363 364 370* 371* 379 384 384 385 394* 394 395 402 403 405* 438 439 441 443* 453 458* 464 468* 473* 478 479* 480 486 486 487 500 504 510 523 524* 525 527 555* 557 558 559 560 560 568 568 571 573 577 578* 578 583 584 587 myname 000156 constant char(6) initial unaligned dcl 72 set ref 520* 590* n_channels 000374 automatic fixed bin(17,0) initial level 2 dcl 12-8 set ref 12-8* n_susp_buffers 420 based fixed bin(17,0) level 2 dcl 114 set ref 542* 580 581 587 n_susp_bufs 000164 automatic fixed bin(17,0) dcl 61 set ref 528* 531 535 539* 542 543 544 nbufs 142 based fixed bin(17,0) level 3 dcl 1-8 set ref 577 ndrives 5 based fixed bin(35,0) level 2 dcl 2-8 ref 333 498 null builtin function dcl 87 ref 130 234 273 274 278 278 281 282 287 287 290 304 315 315 328 328 394 394 504 507 557 559 num_waits 000106 automatic fixed bin(17,0) dcl 54 set ref 169* 183 417* 417 opr_auth 27 based bit(1) level 2 dcl 8-15 ref 238 orders 140 based structure level 3 dcl 4-9 pfm_entries based structure level 1 dcl 1-103 pfm_init 320 based entry variable level 3 dcl 1-8 set ref 344 pfm_required_entries 320 based structure level 2 dcl 1-8 phy_block 157 based fixed bin(17,0) level 3 dcl 1-8 set ref 560* phy_file 156 based fixed bin(17,0) level 3 dcl 1-8 set ref 560* position 156 based structure level 2 dcl 1-8 rcp_$attach 000060 constant entry external dcl 107 ref 159 rcp_$check_attach 000062 constant entry external dcl 108 ref 175 rcp_$detach 000064 constant entry external dcl 110 ref 264 427 rcp_comment 000174 automatic char(256) unaligned dcl 63 set ref 174* 175* 177 177* rcp_id 100 based bit(36) level 2 dcl 4-9 set ref 159* 175* 264* 267* 427* rcp_state 000103 automatic fixed bin(17,0) dcl 54 set ref 170* 173 175* 179 read 134 based structure level 3 dcl 4-9 rel_error_stats 134 based structure level 2 dcl 4-9 set ref 269* release_temp_segment_ 000052 constant entry external dcl 104 ref 590 req_work_area_len 000100 automatic fixed bin(19,0) dcl 53 set ref 464* 466* 471 473* ring 27 based bit(1) level 2 dcl 2-8 set ref 140 154* save_wks based structure level 1 dcl 114 size builtin function dcl 87 ref 322 322 394 464 smtd based structure level 2 dcl 114 set ref 523* 524 speed 4 based bit(36) level 2 in structure "mtape_attach_info" dcl 2-8 in procedure "mtape_mount_cntl_" ref 141 speed 11 based bit(36) level 2 in structure "tape_info" dcl 8-15 in procedure "mtape_mount_cntl_" set ref 141* stbs 421 based structure array level 3 dcl 114 set ref 533* 548* 582 susp_buf_ptrs 000120 automatic pointer array dcl 59 set ref 528* 531* 535 539* 546* 550 551* susp_buffers 421 based structure array level 2 dcl 114 system 26 based bit(1) level 2 dcl 2-8 ref 398 system_flag 3 based bit(1) level 2 dcl 8-15 set ref 398* tape_info based structure level 1 dcl 8-15 set ref 394 tape_info_ptr 000372 automatic pointer dcl 8-10 set ref 136* 138 139 140 141 142 144 146 148 150 152 159* 175* 210 210 217 221 223 223 223 230 231 238 394 395* 396 397 398 456* tape_info_version_3 constant fixed bin(17,0) initial dcl 8-13 ref 396 tape_infop 36 based pointer level 2 dcl 1-8 set ref 130 136 394* 395 tape_ioi_$activate 000066 constant entry external dcl 15-8 ref 456 tape_ioi_$allocate_buffers 000070 constant entry external dcl 15-11 ref 568 tape_ioi_$allocate_work_area 000072 constant entry external dcl 15-16 ref 322 466 tape_ioi_$buffer_status 000074 constant entry external dcl 15-20 ref 531 546 tape_ioi_$deactivate 000076 constant entry external dcl 15-33 ref 258 tape_ioi_$deallocate 000100 constant entry external dcl 15-36 ref 556 tape_ioi_$list_buffers 000102 constant entry external dcl 15-54 ref 528 539 tape_ioi_$reserve_buffer 000104 constant entry external dcl 15-76 ref 571 tape_ioi_$set_buffer_ready 000106 constant entry external dcl 15-84 ref 551 tape_ioi_error_counts_ptr 000400 automatic pointer dcl 16-5 set ref 256* 257 258* tbs based structure level 1 dcl 17-9 tbs_ptr 000402 automatic pointer dcl 17-7 set ref 582* 583 tec based structure level 1 dcl 16-8 tec_entry based structure level 1 dcl 16-16 timeout_max 2 based fixed bin(71,0) level 2 dcl 7-13 set ref 452* timer_manager_$sleep 000056 constant entry external dcl 106 ref 416 tioi_id 101 based bit(36) level 2 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 258* 267* 322* 326 456* 466* 480 528* 531* 539* 546* 551* 556* tioi_id 273 based bit(36) level 2 in structure "mtape_data" dcl 1-8 in procedure "mtape_mount_cntl_" set ref 326* 480* 568* 571* tioi_info based structure level 1 dcl 7-13 tioi_info_ptr 000370 automatic pointer dcl 7-8 set ref 449* 450 451 452 453 454 456* tioi_info_version_1 constant fixed bin(17,0) initial dcl 7-10 ref 450 to_max 000110 automatic fixed bin(71,0) dcl 56 set ref 175* 452 tptr 000170 automatic pointer dcl 62 set ref 520* 523 524 533 535 542 548 550 580 581 582 584 587 590* tracks 3 based fixed bin(35,0) level 2 in structure "mtape_attach_info" dcl 2-8 in procedure "mtape_mount_cntl_" ref 397 tracks 7 based fixed bin(17,0) level 2 in structure "tape_info" dcl 8-15 in procedure "mtape_mount_cntl_" set ref 397* unspec builtin function dcl 87 set ref 269* version based fixed bin(17,0) level 2 in structure "tioi_info" dcl 7-13 in procedure "mtape_mount_cntl_" set ref 450* version based char(8) level 2 in structure "tec" dcl 16-8 in procedure "mtape_mount_cntl_" set ref 257* version based char(8) level 2 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" ref 310 version 000324 automatic fixed bin(17,0) level 2 in structure "atbs" dcl 67 in procedure "mtape_mount_cntl_" set ref 526* version_num based fixed bin(17,0) level 2 dcl 8-15 set ref 396* volp 000172 automatic pointer dcl 62 set ref 302* 304 308* 310 320 321 338 volume_density 26 based fixed bin(17,0) level 2 in structure "tape_info" dcl 8-15 in procedure "mtape_mount_cntl_" ref 217 volume_density 103 based fixed bin(17,0) level 2 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 213* 217* 223* volume_id 26 based char(32) level 2 dcl 4-9 set ref 231* volume_name 13 based char(32) level 2 in structure "tape_info" dcl 8-15 in procedure "mtape_mount_cntl_" set ref 152* 223* 231 volume_name 16 based char(32) level 2 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 152 154* volume_type 25 based fixed bin(17,0) level 2 in structure "tape_info" dcl 8-15 in procedure "mtape_mount_cntl_" ref 210 210 221 223 volume_type 104 based fixed bin(17,0) level 2 in structure "mtape_vol_set" dcl 4-9 in procedure "mtape_mount_cntl_" set ref 221* vs_arg_code parameter fixed bin(35,0) dcl 48 set ref 298 303* 346* 360 365* 377* vs_arg_mtdp parameter pointer dcl 47 set ref 298 300 348* 379* vs_arg_volp parameter pointer dcl 49 ref 298 302 vs_code 000113 automatic fixed bin(35,0) dcl 57 set ref 305* 306 311* 315* 316 319 322* 328* 329 335* 336 339* 340 343 344* 346 368 370* 371 371* 373 377 520* 521 528* 529 531* 532 539* 540 546* 547 551* 552 555* 556* 568* 570 571* 572 578* 579 vs_current 24 based pointer level 2 dcl 1-8 set ref 137 251 314 327* 338* 364 510* vs_mounted_tail 26 based pointer level 2 dcl 1-8 set ref 234 234 236 237* 286* 504 vs_ptr 000364 automatic pointer dcl 4-5 set ref 137* 152 154 159 159 175 209 209 213 217 221 223 230 231 233 233 234 236 237 238 251* 258 259 259 259 264 264 265 266 267 267 269 273 274 274 274 278 278 281 282 282 282 286 287 287 290 290 314* 321* 322 326 327 364* 427 456 466 480 504* 504* 506 507 507 507* 507 510 528 531 539 546 551 556 vs_tail 22 based pointer level 2 dcl 1-8 set ref 308 wa_ptr 000166 automatic pointer dcl 62 set ref 322* 324 325 466* 478 479 wait 25 based bit(1) level 2 dcl 2-8 ref 183 wait_time 6 based fixed bin(35,0) level 2 dcl 2-8 set ref 183 192* workspace_max 6 based fixed bin(19,0) level 2 dcl 7-13 set ref 454* write 136 based structure level 3 dcl 4-9 write_flag 23 based bit(1) level 2 dcl 8-15 set ref 140* ws_max 000102 automatic fixed bin(19,0) dcl 53 set ref 175* 454 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. AT_BOFD internal static fixed bin(17,0) initial dcl 10-44 AT_BOFH internal static fixed bin(17,0) initial dcl 10-44 AT_BOFT internal static fixed bin(17,0) initial dcl 10-44 AT_EOF internal static fixed bin(17,0) initial dcl 10-44 AT_EOFD internal static fixed bin(17,0) initial dcl 10-44 AT_EOFH internal static fixed bin(17,0) initial dcl 10-44 AT_EOFT internal static fixed bin(17,0) initial dcl 10-44 AT_IFD internal static fixed bin(17,0) initial dcl 10-44 BLANK_VOLUME internal static fixed bin(17,0) initial dcl 4-42 BOF_LABEL internal static fixed bin(17,0) initial dcl 10-56 CONSOLE_DTYPEX internal static fixed bin(17,0) initial dcl 11-31 DISK_DRIVE_DTYPEX internal static fixed bin(17,0) initial dcl 11-30 DISK_VOL_VTYPEX internal static fixed bin(17,0) initial dcl 11-38 EOF_LABEL internal static fixed bin(17,0) initial dcl 10-56 EOV_LABEL internal static fixed bin(17,0) initial dcl 10-56 FILES_PER_FILE_GRP internal static fixed bin(17,0) initial dcl 10-44 MCA_DTYPEX internal static fixed bin(17,0) initial dcl 11-36 MTAPE_ALLOC_FI internal static fixed bin(17,0) initial dcl 10-9 MTAPE_ALLOC_LR internal static fixed bin(17,0) initial dcl 10-9 MTAPE_ALLOC_VS internal static fixed bin(17,0) initial dcl 10-9 MTAPE_CV_BCD internal static fixed bin(17,0) initial dcl 10-34 MTAPE_CV_EBCDIC internal static fixed bin(17,0) initial dcl 10-34 MTAPE_CV_UC_ASCII internal static fixed bin(17,0) initial dcl 10-34 MTAPE_CV_UC_EBCDIC internal static fixed bin(17,0) initial dcl 10-34 MTAPE_HWM_BCD internal static fixed bin(17,0) initial dcl 10-27 MTAPE_HWM_BIN internal static fixed bin(17,0) initial dcl 10-27 MTAPE_HWM_NINE internal static fixed bin(17,0) initial dcl 10-27 MTAPE_NO_CONVERSION internal static fixed bin(17,0) initial dcl 10-34 MTAPE_SPEED_VALUES internal static fixed bin(17,0) initial array dcl 10-22 MTAPE_UNSPECIFIED internal static fixed bin(17,0) initial dcl 10-34 MTAPE_VOLUME internal static fixed bin(17,0) initial dcl 4-42 MULT_PRIOR_VOLUME internal static fixed bin(17,0) initial dcl 4-42 NON_MULT_VOLUME internal static fixed bin(17,0) initial dcl 4-42 NOT_POSITIONED_IN_FILE internal static fixed bin(17,0) initial dcl 10-44 NUM_QUALIFIERS internal static fixed bin(17,0) initial array dcl 11-22 PRINTER_DTYPEX internal static fixed bin(17,0) initial dcl 11-32 PUNCH_DTYPEX internal static fixed bin(17,0) initial dcl 11-33 QUEUED_STATE internal static fixed bin(17,0) initial dcl 17-30 Q_ABORT_FILE internal static fixed bin(17,0) initial dcl 10-63 Q_INCORRECT_VOLUME internal static fixed bin(17,0) initial dcl 10-63 Q_LABELED_VOLUME internal static fixed bin(17,0) initial dcl 10-63 Q_UNEXPIRED_FILE internal static fixed bin(17,0) initial dcl 10-63 Q_UNEXPIRED_VOLUME internal static fixed bin(17,0) initial dcl 10-63 READER_DTYPEX internal static fixed bin(17,0) initial dcl 11-34 READY_AND_RESERVED_STATE internal static fixed bin(17,0) initial dcl 17-32 RECOG_FORMAT_VOLUME internal static fixed bin(17,0) initial dcl 4-42 SPECIAL_DTYPEX internal static fixed bin(17,0) initial dcl 11-35 TAPE_VOL_VTYPEX internal static fixed bin(17,0) initial dcl 11-37 TBS_VERSION internal static fixed bin(17,0) initial dcl 17-27 TEC_VERSION internal static char(8) initial dcl 16-22 UNLABELED_VOLUME internal static fixed bin(17,0) initial dcl 4-42 VOLUME_TYPE internal static char(32) initial array unaligned dcl 11-25 Volume_ansi_tape internal static fixed bin(17,0) initial dcl 9-15 Volume_gcos_tape internal static fixed bin(17,0) initial dcl 9-15 Volume_ibm_tape internal static fixed bin(17,0) initial dcl 9-15 Volume_multics_tape internal static fixed bin(17,0) initial dcl 9-15 Volume_unauthenticated internal static fixed bin(17,0) initial dcl 9-15 Volume_unknown_format internal static fixed bin(17,0) initial dcl 9-15 es_ptr automatic pointer dcl 6-4 event_wait_info_ptr automatic pointer dcl 13-5 iox_$iocb_version_sentinel external static char(4) dcl 14-51 mdip automatic pointer dcl 3-4 mtape_attach_info_version_1 internal static char(8) initial unaligned dcl 2-6 mtape_data_version_1 internal static char(8) initial unaligned dcl 1-6 mtape_detach_info based structure level 1 dcl 3-8 mtape_detach_info_version_1 internal static char(8) initial unaligned dcl 3-6 mtape_fi_version_1 internal static char(8) initial unaligned dcl 5-6 tape_blk based char(1) array unaligned dcl 1-115 tape_info_version_2 internal static fixed bin(17,0) initial dcl 8-12 tape_ioi_$check_order 000000 constant entry external dcl 15-24 tape_ioi_$check_read 000000 constant entry external dcl 15-27 tape_ioi_$check_write 000000 constant entry external dcl 15-30 tape_ioi_$deallocate_buffers 000000 constant entry external dcl 15-39 tape_ioi_$get_mode 000000 constant entry external dcl 15-43 tape_ioi_$get_statistics 000000 constant entry external dcl 15-46 tape_ioi_$hardware_status 000000 constant entry external dcl 15-50 tape_ioi_$order 000000 constant entry external dcl 15-57 tape_ioi_$queue_order 000000 constant entry external dcl 15-60 tape_ioi_$queue_read 000000 constant entry external dcl 15-63 tape_ioi_$queue_write 000000 constant entry external dcl 15-66 tape_ioi_$read 000000 constant entry external dcl 15-69 tape_ioi_$release_buffer 000000 constant entry external dcl 15-72 tape_ioi_$reset_statistics 000000 constant entry external dcl 15-80 tape_ioi_$set_mode 000000 constant entry external dcl 15-88 tape_ioi_$stop_tape 000000 constant entry external dcl 15-91 tape_ioi_$write 000000 constant entry external dcl 15-94 tioi_info_version internal static fixed bin(17,0) initial dcl 7-10 NAMES DECLARED BY EXPLICIT CONTEXT. ATTACH_STATE 000000 constant label array(0:3) dcl 181 ref 179 189 DETACH_ON_CLEANUP 002460 constant entry internal dcl 423 ref 171 FIND_DEMOUNT_CANDIDATE 003116 constant entry internal dcl 496 ref 334 INIT_RCP_DATA 002335 constant entry internal dcl 392 ref 131 INIT_TIOI 002523 constant entry internal dcl 434 ref 240 RESTORE_ACTIVATION 003567 constant entry internal dcl 566 ref 342 375 SAVE_ACTIVATION 003161 constant entry internal dcl 516 ref 318 367 SLEEP 002440 constant entry internal dcl 414 ref 188 demount 001365 constant entry external dcl 247 ref 335 370 mount 000506 constant entry external dcl 125 ref 339 371 mount_return 001357 constant label dcl 241 ref 132 163 194 197 203 mtape_mount_cntl_ 000473 constant entry external dcl 32 remount 002171 constant entry external dcl 360 remount_return 002244 constant label dcl 377 ref 368 373 volume_switch 001576 constant entry external dcl 298 vs_return 002076 constant label dcl 346 ref 306 312 316 319 329 336 340 343 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4474 4604 4006 4504 Length 5440 4006 110 620 465 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mtape_mount_cntl_ 529 external procedure is an external procedure. on unit on line 171 96 on unit on unit on line 350 70 on unit on unit on line 381 70 on unit INIT_RCP_DATA internal procedure shares stack frame of external procedure mtape_mount_cntl_. SLEEP internal procedure shares stack frame of external procedure mtape_mount_cntl_. DETACH_ON_CLEANUP internal procedure shares stack frame of on unit on line 171. INIT_TIOI 148 internal procedure enables or reverts conditions. on unit on line 483 70 on unit FIND_DEMOUNT_CANDIDATE internal procedure shares stack frame of external procedure mtape_mount_cntl_. SAVE_ACTIVATION internal procedure shares stack frame of external procedure mtape_mount_cntl_. RESTORE_ACTIVATION internal procedure shares stack frame of external procedure mtape_mount_cntl_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mtape_mount_cntl_ 000100 req_work_area_len mtape_mount_cntl_ 000101 act_work_area_len mtape_mount_cntl_ 000102 ws_max mtape_mount_cntl_ 000103 rcp_state mtape_mount_cntl_ 000104 ioi_id mtape_mount_cntl_ 000105 err_count mtape_mount_cntl_ 000106 num_waits mtape_mount_cntl_ 000107 ips_mask mtape_mount_cntl_ 000110 to_max mtape_mount_cntl_ 000112 code mtape_mount_cntl_ 000113 vs_code mtape_mount_cntl_ 000114 max_buf_len mtape_mount_cntl_ 000115 dl mtape_mount_cntl_ 000116 act_len mtape_mount_cntl_ 000120 susp_buf_ptrs mtape_mount_cntl_ 000160 lbuf_arrayp mtape_mount_cntl_ 000162 i mtape_mount_cntl_ 000163 j mtape_mount_cntl_ 000164 n_susp_bufs mtape_mount_cntl_ 000165 act_num mtape_mount_cntl_ 000166 wa_ptr mtape_mount_cntl_ 000170 tptr mtape_mount_cntl_ 000172 volp mtape_mount_cntl_ 000174 rcp_comment mtape_mount_cntl_ 000274 Stape_is_readable mtape_mount_cntl_ 000276 auto_tioi_info mtape_mount_cntl_ 000305 auto_err_count mtape_mount_cntl_ 000324 atbs mtape_mount_cntl_ 000334 event_info mtape_mount_cntl_ 000360 mtdp mtape_mount_cntl_ 000362 maip mtape_mount_cntl_ 000364 vs_ptr mtape_mount_cntl_ 000366 fi_ptr mtape_mount_cntl_ 000370 tioi_info_ptr mtape_mount_cntl_ 000372 tape_info_ptr mtape_mount_cntl_ 000374 event_wait_channel mtape_mount_cntl_ 000400 tape_ioi_error_counts_ptr mtape_mount_cntl_ 000402 tbs_ptr mtape_mount_cntl_ on unit on line 171 000106 clean_code DETACH_ON_CLEANUP THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ent_var call_ext_in call_ext_out_desc call_ext_out call_int_this return_mac enable_op ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_temp_segment_ hcs_$assign_channel hcs_$reset_ips_mask hcs_$set_ips_mask ioa_ iox_$propagate ipc_$block ipc_$create_ev_chn mtape_io_$allocate_buffers mtape_io_$order mtape_util_$alloc mtape_util_$error mtape_util_$get_statistics mtape_util_$user_query rcp_$attach rcp_$check_attach rcp_$detach release_temp_segment_ tape_ioi_$activate tape_ioi_$allocate_buffers tape_ioi_$allocate_work_area tape_ioi_$buffer_status tape_ioi_$deactivate tape_ioi_$deallocate tape_ioi_$list_buffers tape_ioi_$reserve_buffer tape_ioi_$set_buffer_ready timer_manager_$sleep THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$area_too_small error_table_$resource_reserved error_table_$resource_unavailable error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 8 000466 32 000472 125 000501 127 000514 128 000520 129 000522 130 000524 131 000530 132 000531 136 000533 137 000536 138 000541 139 000544 140 000545 141 000551 142 000553 144 000561 146 000566 148 000573 150 000600 152 000602 154 000605 159 000631 161 000674 162 000676 163 000722 168 000723 169 000726 170 000727 171 000731 173 000747 174 000752 175 000755 177 001022 179 001062 181 001064 183 001067 188 001103 189 001104 192 001105 194 001133 196 001134 197 001160 199 001161 201 001200 202 001202 203 001226 205 001227 208 001230 209 001231 210 001233 212 001241 213 001242 214 001245 216 001246 217 001250 221 001253 223 001255 230 001317 231 001325 233 001333 234 001336 236 001345 237 001347 238 001350 239 001352 240 001353 241 001357 243 001362 247 001363 249 001373 250 001377 251 001400 255 001402 256 001413 257 001415 258 001420 259 001434 264 001442 265 001476 266 001500 267 001503 268 001505 269 001510 273 001513 274 001517 276 001526 278 001527 281 001536 282 001542 284 001551 286 001552 287 001554 290 001563 292 001566 294 001571 298 001572 300 001607 301 001613 302 001615 303 001620 304 001621 305 001625 306 001640 308 001642 310 001645 311 001652 312 001655 314 001656 315 001661 316 001716 318 001720 319 001722 320 001724 321 001727 322 001730 324 001752 325 001757 326 001760 327 001764 328 001765 329 002022 331 002024 333 002025 334 002032 335 002033 336 002043 338 002045 339 002050 340 002060 342 002062 343 002063 344 002065 346 002076 348 002100 349 002103 350 002104 351 002131 353 002144 354 002147 355 002156 356 002166 360 002167 362 002202 363 002206 364 002210 365 002212 367 002213 368 002215 370 002217 371 002227 373 002241 375 002243 377 002244 379 002246 380 002251 381 002252 382 002277 384 002312 385 002315 386 002324 388 002334 392 002335 394 002336 395 002362 396 002365 397 002367 398 002372 402 002374 403 002377 404 002410 405 002412 406 002436 410 002437 414 002440 416 002441 417 002456 419 002457 423 002460 427 002461 428 002517 430 002521 434 002522 438 002530 439 002534 440 002544 441 002547 442 002561 443 002564 444 002610 449 002611 450 002613 451 002615 452 002617 453 002621 454 002624 456 002626 457 002644 458 002647 459 002673 464 002674 466 002676 467 002716 468 002721 469 002745 471 002746 472 002751 473 002754 476 003006 478 003007 479 003014 480 003020 482 003024 483 003025 484 003053 486 003067 487 003073 489 003104 490 003115 496 003116 498 003117 500 003124 504 003127 506 003137 507 003142 510 003155 512 003160 516 003161 520 003163 521 003204 523 003207 524 003214 525 003216 526 003220 527 003222 528 003233 529 003264 531 003267 532 003311 533 003314 534 003320 535 003322 536 003332 537 003334 538 003335 539 003336 540 003367 542 003372 543 003376 544 003400 545 003407 546 003410 547 003431 548 003434 549 003452 550 003455 551 003470 552 003504 553 003507 555 003511 556 003522 557 003534 558 003550 559 003561 560 003563 562 003566 566 003567 568 003570 570 003632 571 003635 572 003651 573 003654 577 003657 578 003662 579 003675 580 003700 581 003703 582 003711 583 003725 584 003733 586 003744 587 003746 590 003753 592 003775 ----------------------------------------------------------- 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