COMPILATION LISTING OF SEGMENT task_ctl_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/05/86 1104.4 mst Wed Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* format: style4,delnl,insnl,tree,ifthenstmt,indnoniterend */ 12 task_ctl_: 13 procedure; 14 15 /* Task control primitives */ 16 /* written by C. Hornig, Decmeber 1978 */ 17 18 dcl ( 19 Task bit (36) aligned, 20 Create_data pointer, 21 Condition character (*), 22 Info_ptr pointer, 23 Code fixed (35) 24 ) parameter; 25 26 dcl based_ptr pointer based; 27 dcl based_fb fixed bin based; 28 29 dcl ( 30 C32_DESC init ("524000000040"b3), 31 PTR_DESC init ("464000000000"b3), 32 MASK_ALL init ("000000000000"b3), 33 UNMASK_ALL init ("777777777776"b3) 34 ) bit (36) aligned static options (constant); 35 36 dcl ( 37 iox_$user_input, 38 iox_$user_output, 39 iox_$error_output 40 ) external ptr; 41 dcl sys_info$max_seg_size fixed bin (19) external; 42 43 dcl error_table_$bad_arg fixed (35) external; 44 45 dcl cu_$get_cl_intermediary entry (entry); 46 dcl cu_$set_cl_intermediary entry (entry); 47 dcl get_ring_ entry returns (fixed bin (3)); 48 dcl get_temp_segment_ entry (char (*), pointer, fixed (35)); 49 dcl hcs_$get_process_usage entry (pointer, fixed bin (35)); 50 dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); 51 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 52 dcl ioa_$rsnnl entry () options (variable); 53 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 54 dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); 55 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 56 dcl iox_$find_iocb entry (char (*), ptr, fixed bin (35)); 57 dcl iox_$move_attach entry (ptr, ptr, fixed bin (35)); 58 dcl ipc_$run entry; 59 dcl release_area_ entry (ptr); 60 dcl release_temp_segment_ entry (char (*), pointer, fixed (35)); 61 dcl signal_ entry options (variable); 62 dcl task_alm_$task_signal_caller_tv entry; 63 dcl task_alm_$switch_stacks entry (pointer); 64 dcl task_create_ entry (ptr, ptr, fixed bin (35)); 65 dcl task_init_ entry; 66 dcl unique_chars_ entry (bit (*)) returns (char (15)); 67 dcl xhcs_$set_stack_ptr entry (pointer); 68 69 dcl 1 task_signal_frame aligned based (sp), 70 2 f aligned like stack_frame, 71 2 arg_list_header, 72 3 arg_count uns fixed bin (17) unal, 73 3 code uns fixed bin (19) unal, 74 3 desc_count uns fixed bin (17) unal, 75 3 pad bit (19) unal, 76 2 ap (3) ptr, /* argument pointers */ 77 2 dp (3) ptr, /* descriptor pointers */ 78 2 infop ptr, /* ptr to info */ 79 2 cname char (32), /* condition name */ 80 2 info (info_length) bit (36) aligned; 81 82 dcl based_info (info_length) bit (36) aligned based; 83 84 dcl 1 my_task_data aligned like task_data based (my_task_ptr); 85 86 dcl info_length fixed bin; 87 dcl my_task_ptr pointer; 88 dcl saved_mask bit (36) aligned; 89 dcl scheduledp bit (1) aligned; 90 dcl code fixed bin (35); 91 92 dcl (addr, addrel, baseno, baseptr, binary, bit, clock, codeptr, length, mod, null, pointer, rel, size, stackbaseptr, 93 stackframeptr, string, substr, unspec) builtin; 94 95 dcl any_other condition; 96 97 /* * * * * * * * * * CREATE * * * * * * * * * */ 98 99 create: 100 entry (Create_data, Task, Code); 101 102 Code = 0; 103 Task = ""b; 104 if tasking_data_ptr_ = null () then call task_init_; 105 106 call task_create_ (Create_data, task_data_ptr, Code); 107 if Code ^= 0 then return; 108 109 call hcs_$set_ips_mask (MASK_ALL, saved_mask); /* mask down for rethreading */ 110 111 task_data.elder_sister = task_data.mother -> task_data.youngest_daughter; 112 113 if task_data.mother -> task_data.youngest_daughter ^= null () 114 then task_data.mother -> task_data.youngest_daughter -> task_data.younger_sister = task_data_ptr; 115 task_data.mother -> task_data.youngest_daughter = task_data_ptr; 116 117 tasking_data.valid_tasks (binary (baseno (task_data.sb))) = "1"b; 118 119 call hcs_$reset_ips_mask (saved_mask, saved_mask); 120 121 Task = task_data.task_id; 122 123 return_to_caller: 124 return; 125 126 /* * * * * * * * * * DESTROY * * * * * * * * * */ 127 128 destroy: 129 entry (Task, Code); 130 131 Code = 0; 132 call find_task; 133 call find_my_task; 134 goto mark_as_dead; 135 136 /* * * * * * * * * * DIE * * * * * * * * * */ 137 138 die: 139 entry; 140 141 if tasking_data_ptr_ = null () then call task_init_; 142 call find_my_task; 143 goto my_task_data.abort; 144 145 death: 146 entry; 147 148 call find_my_task; 149 task_data_ptr = my_task_ptr; 150 151 mark_as_dead: 152 call hcs_$set_ips_mask (MASK_ALL, saved_mask); 153 call update_state (DEAD); 154 tasking_data.valid_tasks (binary (baseno (task_data.sb))) = "0"b; 155 tasking_data.dead_tasks = "1"b; 156 157 if my_task_data.state = DEAD 158 then 159 find_something_to_do: 160 if ^sked () then do; 161 call hcs_$set_ips_mask (UNMASK_ALL, (""b)); 162 call ipc_$run; 163 end; 164 165 call hcs_$reset_ips_mask (saved_mask, saved_mask); 166 return; 167 168 /* * * * * * * * * * CURRENT_TASK * * * * * * * * * */ 169 170 current_task: 171 entry returns (bit (36) aligned); 172 173 if tasking_data_ptr_ = null () then call task_init_; 174 call find_my_task; 175 return (my_task_data.task_id); 176 177 /* * * * * * * * * * GET_TASK_USAGE * * * * * * * * * */ 178 179 get_task_usage: 180 entry (Task, Info_ptr, Code); 181 182 if tasking_data_ptr_ = null () 183 then call hcs_$get_process_usage (Info_ptr, Code); 184 else do; 185 Code = 0; 186 call find_task; 187 call find_my_task; 188 if task_data_ptr = my_task_ptr then call meter (task_data.meters); 189 process_usage_pointer = Info_ptr; 190 process_usage.number_can_return = 5; 191 if process_usage.number_wanted > 0 then process_usage.cpu_time = task_data.tcpu; 192 if process_usage.number_wanted > 1 then process_usage.paging_measure = task_data.mem; 193 if process_usage.number_wanted > 2 then process_usage.page_faults = task_data.pf; 194 if process_usage.number_wanted > 4 then process_usage.virtual_cpu_time = task_data.vcpu; 195 call hcs_$reset_ips_mask (saved_mask, saved_mask); 196 end; 197 return; 198 199 /* * * * * * * * * * START * * * * * * * * * */ 200 201 start: 202 entry (Task, Code); 203 204 Code = 0; 205 call find_task; 206 call update_state (READY); 207 call hcs_$reset_ips_mask (saved_mask, saved_mask); 208 return; 209 210 /* * * * * * * * * * STOP * * * * * * * * * */ 211 212 stop: 213 entry (Task, Code); 214 215 Code = 0; 216 call find_task; 217 call update_state (STOPPED); 218 call hcs_$reset_ips_mask (saved_mask, saved_mask); 219 return; 220 221 /* * * * * * * * * * SIGNAL * * * * * * * * * */ 222 223 signal: 224 entry (Task, Condition, Info_ptr, Code); 225 226 Code = 0; 227 call find_task; 228 call find_my_task; 229 if task_data_ptr = my_task_ptr then do; /* easy way */ 230 call signal_ (Condition, null (), Info_ptr, null ()); 231 return; 232 end; 233 234 sb = task_data.sb; 235 sp = stack_header.stack_end_ptr; 236 237 if Info_ptr = null () 238 then info_length = 0; 239 else info_length = Info_ptr -> based_fb; 240 241 stack_frame.next_sp, /* push a stack frame */ 242 stack_header.stack_end_ptr = addrel16 (sp, size (task_signal_frame)); 243 stack_frame.prev_sp = stack_header.bar_mode_sp; 244 stack_frame.return_ptr = codeptr (task_alm_$task_signal_caller_tv); 245 stack_frame.arg_ptr = addr (task_signal_frame.arg_list_header); 246 stack_frame.translator_id = "000001"b3; 247 248 task_signal_frame.arg_count, task_signal_frame.desc_count = 3; 249 task_signal_frame.code = 4; 250 task_signal_frame.ap (1) = addr (task_signal_frame.cname); 251 task_signal_frame.ap (2) = addr (stack_header.null_ptr); 252 task_signal_frame.ap (3) = addr (task_signal_frame.infop); 253 task_signal_frame.dp (1) = addr (C32_DESC); 254 task_signal_frame.dp (2), task_signal_frame.dp (3) = addr (PTR_DESC); 255 task_signal_frame.infop = addr (task_signal_frame.info); 256 task_signal_frame.cname = Condition; 257 if Info_ptr ^= null () then task_signal_frame.info = Info_ptr -> based_info; 258 259 stack_header.bar_mode_sp = sp; 260 goto wake; 261 262 /* * * * * * * * BLOCK * * * * * * * * * */ 263 264 block: 265 entry; 266 267 if tasking_data_ptr_ = null () then call task_init_; 268 call find_my_task; 269 task_data_ptr = my_task_ptr; 270 call hcs_$set_ips_mask (MASK_ALL, saved_mask); 271 if task_data.state = READY then do; 272 call update_state (BLOCKED); 273 end; /* 274* call hcs_$reset_ips_mask (saved_mask, saved_mask); 275* return; 276* */ 277 goto find_something_to_do; 278 279 /* * * * * * * * * * WAKEUP * * * * * * * * * */ 280 281 wakeup: 282 entry (Task, Code); 283 284 Code = 0; 285 call find_task; 286 wake: 287 if task_data.state = BLOCKED then do; 288 call update_state (READY); 289 end; 290 call hcs_$reset_ips_mask (saved_mask, saved_mask); 291 return; 292 293 /* * * * * * * * * * SCHEDULE * * * * * * * * * */ 294 295 schedule: 296 entry returns (bit (1) aligned); 297 298 if tasking_data_ptr_ = null () then call task_init_; 299 call find_my_task; 300 call hcs_$set_ips_mask (MASK_ALL, saved_mask); 301 scheduledp = sked (); 302 call hcs_$reset_ips_mask (saved_mask, saved_mask); 303 return (scheduledp); 304 305 sked: 306 procedure returns (bit (1) aligned); 307 dcl best_task pointer; 308 dcl best_value fixed bin (35); 309 310 call meter (my_task_data.meters); 311 if (my_task_data.vcpu_limit > 0) & (my_task_data.meters.vcpu > my_task_data.vcpu_limit) 312 & (my_task_data.state ^= DEAD) 313 then goto my_task_data.abort; /* over CPU limit */ 314 315 best_task = null (); 316 best_value = -34359738367; 317 do task_data_ptr = tasking_data.ready_head repeat (task_data.ready_next) while (task_data_ptr ^= null ()); 318 319 if task_data.priority > best_value then do; 320 best_value = task_data.priority; 321 best_task = task_data_ptr; 322 end; 323 end; 324 325 if best_task = null () then return ("0"b); 326 327 task_data_ptr = best_task; 328 if task_data.ready_next ^= null () then do; /* rethread at end */ 329 call thread_out; 330 call thread_in; 331 end; 332 333 if my_task_ptr ^= task_data_ptr 334 then begin; 335 336 /* ***** SWITCH TASKS ***** */ 337 338 my_task_data.ips_mask = saved_mask; 339 call iox_$move_attach (iox_$user_input, my_task_data.ui_iocb, code); 340 call iox_$move_attach (iox_$user_output, my_task_data.uo_iocb, code); 341 call iox_$move_attach (iox_$error_output, my_task_data.eo_iocb, code); 342 call cu_$get_cl_intermediary (my_task_data.cl_intermediary); 343 call xhcs_$set_stack_ptr (task_data.sb); 344 call task_alm_$switch_stacks (task_data.sb); 345 call cu_$set_cl_intermediary (my_task_data.cl_intermediary); 346 call iox_$move_attach (my_task_data.ui_iocb, iox_$user_input, code); 347 call iox_$move_attach (my_task_data.uo_iocb, iox_$user_output, code); 348 call iox_$move_attach (my_task_data.eo_iocb, iox_$error_output, code); 349 saved_mask = my_task_data.ips_mask; 350 351 /* ***** DONE STACK SWITCHING * ****/ 352 353 end; 354 355 if tasking_data.dead_tasks then do; 356 tasking_data.dead_tasks = "0"b; 357 call gc_dead_tasks (addr (tasking_data.root_task_data)); 358 end; 359 call meter (overhead_meters); 360 return ("1"b); 361 end sked; 362 363 /* * * * * * * * * * * * * * * * * * * */ 364 365 find_task: 366 procedure; 367 dcl segno unsigned fixed bin (18); 368 dcl task bit (36) aligned; 369 370 task = Task; /* copy arguments */ 371 call hcs_$set_ips_mask (MASK_ALL, saved_mask); 372 373 task_data_ptr = get_tdp (task); 374 if task_data_ptr ^= null () then return; 375 376 call hcs_$reset_ips_mask (saved_mask, saved_mask); 377 Code = error_table_$bad_arg; 378 goto return_to_caller; 379 380 end find_task; 381 382 /* * * * * * * * * */ 383 384 get_tdp: 385 procedure (Task) returns (ptr); 386 dcl Task bit (36) aligned parameter; 387 dcl tdp ptr; 388 dcl segno fixed bin (15); 389 390 segno = binary (substr (Task, 1, 18), 15); 391 if tasking_data.valid_tasks (segno) then do; 392 tdp = pointer (baseptr (segno), TASK_DP) -> based_ptr; 393 if tdp -> task_data.task_id = Task then return (tdp); 394 end; 395 return (null ()); 396 end get_tdp; 397 398 /* * * * * * * * * */ 399 400 find_my_task: 401 procedure; 402 my_task_ptr = pointer (stackbaseptr (), TASK_DP) -> based_ptr; 403 end find_my_task; 404 405 /* * * * * * * * * */ 406 407 gc_dead_tasks: 408 procedure (Tdp) recursive; 409 dcl Tdp ptr parameter; 410 dcl (tdp, next_tdp) ptr; 411 412 do tdp = Tdp -> task_data.youngest_daughter repeat (next_tdp) while (tdp ^= null ()); 413 next_tdp = tdp -> task_data.elder_sister; 414 call gc_dead_tasks (tdp); 415 end; 416 if (Tdp -> task_data.state = DEAD) & (Tdp -> task_data.youngest_daughter = null ()) then call kill (Tdp); 417 return; 418 419 end gc_dead_tasks; 420 421 /* * * * * * * * * */ 422 423 kill: 424 procedure (Tdp); 425 dcl Tdp pointer parameter; 426 dcl code fixed bin (35); 427 428 call iox_$detach_iocb (Tdp -> task_data.ui_iocb, code); 429 call iox_$detach_iocb (Tdp -> task_data.uo_iocb, code); 430 call iox_$detach_iocb (Tdp -> task_data.eo_iocb, code); 431 call iox_$destroy_iocb (Tdp -> task_data.ui_iocb, code); 432 call iox_$destroy_iocb (Tdp -> task_data.uo_iocb, code); 433 call iox_$destroy_iocb (Tdp -> task_data.eo_iocb, code); 434 435 if Tdp -> task_data.task_area_ptr ^= null () then call release_area_ (Tdp -> task_data.task_area_ptr); 436 437 if Tdp -> task_data.younger_sister = null () 438 then Tdp -> task_data.mother -> task_data.youngest_daughter = Tdp -> task_data.elder_sister; 439 else Tdp -> task_data.younger_sister -> task_data.elder_sister = Tdp -> task_data.elder_sister; 440 if Tdp -> task_data.elder_sister ^= null () 441 then Tdp -> task_data.elder_sister -> task_data.younger_sister = Tdp -> task_data.younger_sister; 442 call release_temp_segment_ ("task_ctl_", Tdp -> task_data.sb, (0)); 443 return; 444 445 end kill; 446 447 /* * * * * * * * * */ 448 449 meter: 450 procedure (Meters); 451 dcl 1 Meters aligned like task_data.meters parameter; 452 dcl 1 pu aligned like process_usage; 453 454 pu.number_wanted = 5; 455 call hcs_$get_process_usage (addr (pu), (0)); 456 Meters.tcpu = Meters.tcpu + pu.cpu_time - old_pu.tcpu; 457 old_pu.tcpu = pu.cpu_time; 458 Meters.vcpu = Meters.vcpu + pu.virtual_cpu_time - old_pu.vcpu; 459 old_pu.vcpu = pu.virtual_cpu_time; 460 Meters.mem = Meters.mem + pu.paging_measure - old_pu.mem; 461 old_pu.mem = pu.paging_measure; 462 Meters.pf = Meters.pf + pu.page_faults - old_pu.pf; 463 old_pu.pf = pu.page_faults; 464 end meter; 465 466 /* * * * * * * * * * UPDATE_STATE * * * * * * * * * */ 467 468 update_state: 469 procedure (State); 470 dcl State fixed bin; 471 472 if task_data.state = State then return; 473 if task_data.state = READY then do; /* must unthread the task */ 474 call thread_out; 475 end; 476 if State = READY then do; /* must thread the task */ 477 call thread_in; 478 end; 479 task_data.state = State; 480 end update_state; 481 482 /* * * * * * * * * */ 483 484 addrel16: 485 procedure (Ptr, Offset) returns (ptr); 486 dcl Ptr ptr parameter; 487 dcl Offset fixed bin parameter; 488 dcl offset uns fixed bin (18); 489 490 offset = binary (rel (Ptr), 18) + Offset + 15; 491 return (pointer (Ptr, offset - mod (offset, 16))); 492 end addrel16; 493 494 /* * * * * * * * * */ 495 496 thread_in: 497 procedure; 498 499 task_data.ready_last = tasking_data.ready_tail; 500 task_data.ready_next = null (); 501 if tasking_data.ready_tail ^= null () 502 then tasking_data.ready_tail -> task_data.ready_next = task_data_ptr; 503 else tasking_data.ready_head = task_data_ptr; 504 tasking_data.ready_tail = task_data_ptr; 505 return; 506 507 end thread_in; 508 509 /* * * * * * * * * */ 510 511 thread_out: 512 procedure; 513 514 if task_data.ready_last = null () 515 then tasking_data.ready_head = task_data.ready_next; 516 else task_data.ready_last -> task_data.ready_next = task_data.ready_next; 517 if task_data.ready_next = null () 518 then tasking_data.ready_tail = task_data.ready_last; 519 else task_data.ready_next -> task_data.ready_last = task_data.ready_last; 520 task_data.ready_next, task_data.ready_last = null (); 521 return; 522 523 end thread_out; 524 1 1 /* *********************************************************** 1 2* * * 1 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 1 4* * * 1 5* *********************************************************** */ 1 6 /* Begin include file tasking_data.incl.pl1 */ 1 7 1 8 dcl tasking_data_ptr_ ptr external init (null ()); 1 9 dcl 1 tasking_data aligned based (tasking_data_ptr_), 1 10 2 (ready_head, ready_tail) ptr init (null ()), 1 11 2 root_task_data like task_data, 1 12 2 overhead_meters like task_data.meters, 1 13 2 old_pu like task_data.meters, 1 14 2 flags, 1 15 3 dead_tasks bit (1) unaligned, 1 16 2 valid_tasks (0:4092) bit (1) unaligned init ((4093) (1)"0"b); 1 17 2 1 /* *********************************************************** 2 2* * * 2 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 2 4* * * 2 5* *********************************************************** */ 2 6 /* Begin include file task_data.incl.pl1 */ 2 7 2 8 declare task_data_ptr pointer automatic; 2 9 declare 1 task_data aligned based (task_data_ptr), /* information defining a task */ 2 10 2 sb pointer, /* stack base pointer */ 2 11 2 abort variable label, /* to abort task */ 2 12 2 (elder_sister, younger_sister) pointer, /* threaded list of all tasks */ 2 13 2 (youngest_daughter, mother) pointer, /* our inferiors */ 2 14 2 (ready_next, ready_last) pointer, /* list of ready tasks */ 2 15 2 task_id bit (36) aligned, 2 16 2 state fixed bin, 2 17 2 create_data like task_create_data, 2 18 2 meters, 2 19 3 (tcpu, vcpu) fixed bin (71), 2 20 3 mem fixed bin (71), 2 21 3 pf fixed bin (35), 2 22 2 (ui_iocb, uo_iocb, eo_iocb) ptr, 2 23 2 task_area_ptr ptr, 2 24 2 cl_intermediary entry, 2 25 2 ips_mask bit (36); 2 26 2 27 declare ( 2 28 TASK_DP init (56), 2 29 STOPPED init (1), 2 30 BLOCKED init (2), 2 31 READY init (3), 2 32 DEAD init (4) 2 33 ) static options (constant); 2 34 2 35 /* End include file task_data.incl.pl1 */ 1 18 3 1 /* *********************************************************** 3 2* * * 3 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 3 4* * * 3 5* *********************************************************** */ 3 6 /* Begin include file task_create_data.incl.pl1 */ 3 7 3 8 declare task_create_data_version_3 fixed bin static init (3) options (constant); 3 9 declare task_create_data_ptr pointer automatic; 3 10 declare 1 task_create_data aligned based (task_create_data_ptr), 3 11 2 version fixed bin, /* this is version 3 */ 3 12 2 overseer variable entry (pointer), 3 13 2 data_ptr pointer, /* pointer to be passed to overseer */ 3 14 2 vcpu_limit fixed bin (71), /* CPU limit if any */ 3 15 2 priority fixed bin, /* for task scheduler */ 3 16 2 comment char (64), /* for humans */ 3 17 /* end of version 2 structure */ 3 18 2 flags, 3 19 3 top_level bit (1) unaligned, /* this is an independent task */ 3 20 3 shared_static bit (1) unaligned; /* shares static with creator */ 3 21 3 22 /* End include file task_create_data.incl.pl1 */ 1 19 1 20 1 21 /* End include file tasking_data */ 525 4 1 /* BEGIN INCLUDE FILE ... stack_header.incl.pl1 .. 3/72 Bill Silver */ 4 2 /* modified 7/76 by M. Weaver for *system links and more system use of areas */ 4 3 /* modified 3/77 by M. Weaver to add rnt_ptr */ 4 4 /* Modified April 1983 by C. Hornig for tasking */ 4 5 4 6 /****^ HISTORY COMMENTS: 4 7* 1) change(86-06-24,DGHowe), approve(86-06-24,MCR7396), 4 8* audit(86-08-05,Schroth), install(86-11-03,MR12.0-1206): 4 9* added the heap_header_ptr definition. 4 10* 2) change(86-08-12,Kissel), approve(86-08-12,MCR7473), 4 11* audit(86-10-10,Fawcett), install(86-11-03,MR12.0-1206): 4 12* Modified to support control point management. These changes were actually 4 13* made in February 1985 by G. Palter. 4 14* 3) change(86-10-22,Fawcett), approve(86-10-22,MCR7473), 4 15* audit(86-10-22,Farley), install(86-11-03,MR12.0-1206): 4 16* Remove the old_lot pointer and replace it with cpm_data_ptr. Use the 18 4 17* bit pad after cur_lot_size for the cpm_enabled. This was done to save some 4 18* space int the stack header and change the cpd_ptr unal to cpm_data_ptr 4 19* (ITS pair). 4 20* END HISTORY COMMENTS */ 4 21 4 22 /* format: style2 */ 4 23 4 24 dcl sb ptr; /* the main pointer to the stack header */ 4 25 4 26 dcl 1 stack_header based (sb) aligned, 4 27 2 pad1 (4) fixed bin, /* (0) also used as arg list by outward_call_handler */ 4 28 2 cpm_data_ptr ptr, /* (4) pointer to control point which owns this stack */ 4 29 2 combined_stat_ptr ptr, /* (6) pointer to area containing separate static */ 4 30 2 clr_ptr ptr, /* (8) pointer to area containing linkage sections */ 4 31 2 max_lot_size fixed bin (17) unal, /* (10) DU number of words allowed in lot */ 4 32 2 main_proc_invoked fixed bin (11) unal, /* (10) DL nonzero if main procedure invoked in run unit */ 4 33 2 have_static_vlas bit (1) unal, /* (10) DL "1"b if (very) large arrays are being used in static */ 4 34 2 pad4 bit (2) unal, 4 35 2 run_unit_depth fixed bin (2) unal, /* (10) DL number of active run units stacked */ 4 36 2 cur_lot_size fixed bin (17) unal, /* (11) DU number of words (entries) in lot */ 4 37 2 cpm_enabled bit (18) unal, /* (11) DL non-zero if control point management is enabled */ 4 38 2 system_free_ptr ptr, /* (12) pointer to system storage area */ 4 39 2 user_free_ptr ptr, /* (14) pointer to user storage area */ 4 40 2 null_ptr ptr, /* (16) */ 4 41 2 stack_begin_ptr ptr, /* (18) pointer to first stack frame on the stack */ 4 42 2 stack_end_ptr ptr, /* (20) pointer to next useable stack frame */ 4 43 2 lot_ptr ptr, /* (22) pointer to the lot for the current ring */ 4 44 2 signal_ptr ptr, /* (24) pointer to signal procedure for current ring */ 4 45 2 bar_mode_sp ptr, /* (26) value of sp before entering bar mode */ 4 46 2 pl1_operators_ptr ptr, /* (28) pointer to pl1_operators_$operator_table */ 4 47 2 call_op_ptr ptr, /* (30) pointer to standard call operator */ 4 48 2 push_op_ptr ptr, /* (32) pointer to standard push operator */ 4 49 2 return_op_ptr ptr, /* (34) pointer to standard return operator */ 4 50 2 return_no_pop_op_ptr 4 51 ptr, /* (36) pointer to standard return / no pop operator */ 4 52 2 entry_op_ptr ptr, /* (38) pointer to standard entry operator */ 4 53 2 trans_op_tv_ptr ptr, /* (40) pointer to translator operator ptrs */ 4 54 2 isot_ptr ptr, /* (42) pointer to ISOT */ 4 55 2 sct_ptr ptr, /* (44) pointer to System Condition Table */ 4 56 2 unwinder_ptr ptr, /* (46) pointer to unwinder for current ring */ 4 57 2 sys_link_info_ptr ptr, /* (48) pointer to *system link name table */ 4 58 2 rnt_ptr ptr, /* (50) pointer to Reference Name Table */ 4 59 2 ect_ptr ptr, /* (52) pointer to event channel table */ 4 60 2 assign_linkage_ptr ptr, /* (54) pointer to storage for (obsolete) hcs_$assign_linkage */ 4 61 2 heap_header_ptr ptr, /* (56) pointer to the heap header for this ring */ 4 62 2 trace, 4 63 3 frames, 4 64 4 count fixed bin, /* (58) number of trace frames */ 4 65 4 top_ptr ptr unal, /* (59) pointer to last trace frame */ 4 66 3 in_trace bit (36) aligned, /* (60) trace antirecursion flag */ 4 67 2 pad2 bit (36), /* (61) */ 4 68 2 pad5 pointer; /* (62) pointer to future stuff */ 4 69 4 70 /* The following offset refers to a table within the pl1 operator table. */ 4 71 4 72 dcl tv_offset fixed bin init (361) internal static; 4 73 /* (551) octal */ 4 74 4 75 4 76 /* The following constants are offsets within this transfer vector table. */ 4 77 4 78 dcl ( 4 79 call_offset fixed bin init (271), 4 80 push_offset fixed bin init (272), 4 81 return_offset fixed bin init (273), 4 82 return_no_pop_offset fixed bin init (274), 4 83 entry_offset fixed bin init (275) 4 84 ) internal static; 4 85 4 86 4 87 4 88 4 89 4 90 /* The following declaration is an overlay of the whole stack header. Procedures which 4 91* move the whole stack header should use this overlay. 4 92**/ 4 93 4 94 dcl stack_header_overlay (size (stack_header)) fixed bin based (sb); 4 95 4 96 4 97 4 98 /* END INCLUDE FILE ... stack_header.incl.pl1 */ 526 5 1 /* BEGIN INCLUDE FILE ... stack_frame.incl.pl1 ... */ 5 2 5 3 /* format: off */ 5 4 5 5 /* Modified: 16 Dec 1977, D. Levin - to add fio_ps_ptr and pl1_ps_ptr */ 5 6 /* Modified: 3 Feb 1978, P. Krupp - to add run_unit_manager bit & main_proc bit */ 5 7 /* Modified: 21 March 1978, D. Levin - change fio_ps_ptr to support_ptr */ 5 8 /* Modified: 03/01/84, S. Herbst - Added RETURN_PTR_MASK */ 5 9 5 10 5 11 /****^ HISTORY COMMENTS: 5 12* 1) change(86-09-15,Kissel), approve(86-09-15,MCR7473), 5 13* audit(86-10-01,Fawcett), install(86-11-03,MR12.0-1206): 5 14* Modified to add constants for the translator_id field in the stack_frame 5 15* structure. 5 16* END HISTORY COMMENTS */ 5 17 5 18 5 19 dcl RETURN_PTR_MASK bit (72) int static options (constant) /* mask to be AND'd with stack_frame.return_ptr */ 5 20 init ("777777777777777777000000"b3); /* when copying, to ignore bits that a call fills */ 5 21 /* with indicators (nonzero for Fortran hexfp caller) */ 5 22 /* say: unspec(ptr) = unspec(stack_frame.return_ptr) & RETURN_PTR_MASK; */ 5 23 5 24 dcl TRANSLATOR_ID_PL1V2 bit (18) internal static options (constant) init ("000000"b3); 5 25 dcl TRANSLATOR_ID_ALM bit (18) internal static options (constant) init ("000001"b3); 5 26 dcl TRANSLATOR_ID_PL1V1 bit (18) internal static options (constant) init ("000002"b3); 5 27 dcl TRANSLATOR_ID_SIGNAL_CALLER bit (18) internal static options (constant) init ("000003"b3); 5 28 dcl TRANSLATOR_ID_SIGNALLER bit (18) internal static options (constant) init ("000004"b3); 5 29 5 30 5 31 dcl sp pointer; /* pointer to beginning of stack frame */ 5 32 5 33 dcl stack_frame_min_length fixed bin static init(48); 5 34 5 35 5 36 dcl 1 stack_frame based(sp) aligned, 5 37 2 pointer_registers(0 : 7) ptr, 5 38 2 prev_sp pointer, 5 39 2 next_sp pointer, 5 40 2 return_ptr pointer, 5 41 2 entry_ptr pointer, 5 42 2 operator_and_lp_ptr ptr, /* serves as both */ 5 43 2 arg_ptr pointer, 5 44 2 static_ptr ptr unaligned, 5 45 2 support_ptr ptr unal, /* only used by fortran I/O */ 5 46 2 on_unit_relp1 bit(18) unaligned, 5 47 2 on_unit_relp2 bit(18) unaligned, 5 48 2 translator_id bit(18) unaligned, /* Translator ID (see constants above) 5 49* 0 => PL/I version II 5 50* 1 => ALM 5 51* 2 => PL/I version I 5 52* 3 => signal caller frame 5 53* 4 => signaller frame */ 5 54 2 operator_return_offset bit(18) unaligned, 5 55 2 x(0: 7) bit(18) unaligned, /* index registers */ 5 56 2 a bit(36), /* accumulator */ 5 57 2 q bit(36), /* q-register */ 5 58 2 e bit(36), /* exponent */ 5 59 2 timer bit(27) unaligned, /* timer */ 5 60 2 pad bit(6) unaligned, 5 61 2 ring_alarm_reg bit(3) unaligned; 5 62 5 63 5 64 dcl 1 stack_frame_flags based(sp) aligned, 5 65 2 pad(0 : 7) bit(72), /* skip over prs */ 5 66 2 xx0 bit(22) unal, 5 67 2 main_proc bit(1) unal, /* on if frame belongs to a main procedure */ 5 68 2 run_unit_manager bit(1) unal, /* on if frame belongs to run unit manager */ 5 69 2 signal bit(1) unal, /* on if frame belongs to logical signal_ */ 5 70 2 crawl_out bit(1) unal, /* on if this is a signal caller frame */ 5 71 2 signaller bit(1) unal, /* on if next frame is signaller's */ 5 72 2 link_trap bit(1) unal, /* on if this frame was made by the linker */ 5 73 2 support bit(1) unal, /* on if frame belongs to a support proc */ 5 74 2 condition bit(1) unal, /* on if condition established in this frame */ 5 75 2 xx0a bit(6) unal, 5 76 2 xx1 fixed bin, 5 77 2 xx2 fixed bin, 5 78 2 xx3 bit(25) unal, 5 79 2 old_crawl_out bit (1) unal, /* on if this is a signal caller frame */ 5 80 2 old_signaller bit(1) unal, /* on if next frame is signaller's */ 5 81 2 xx3a bit(9) unaligned, 5 82 2 xx4(9) bit(72) aligned, 5 83 2 v2_pl1_op_ret_base ptr, /* When a V2 PL/I program calls an operator the 5 84* * operator puts a pointer to the base of 5 85* * the calling procedure here. (text base ptr) */ 5 86 2 xx5 bit(72) aligned, 5 87 2 pl1_ps_ptr ptr; /* ptr to ps for this frame; also used by fio. */ 5 88 5 89 /* format: on */ 5 90 5 91 /* END INCLUDE FILE ... stack_frame.incl.pl1 */ 527 6 1 /* BEGIN INCLUDE FILE process_usage.incl.pl1 WRITTEN 09/17/76 BY Richard Bratt */ 6 2 6 3 declare 6 4 process_usage_pointer pointer, 6 5 1 process_usage based (process_usage_pointer), 6 6 2 number_wanted fixed bin, /* max number of entries to be returned */ 6 7 2 number_can_return fixed bin, /* the number of entries currently returnable */ 6 8 2 cpu_time fixed bin (71), 6 9 2 paging_measure fixed bin (71), 6 10 2 page_faults fixed bin (34), 6 11 2 pd_faults fixed bin (34), 6 12 2 virtual_cpu_time fixed bin (71), 6 13 2 segment_faults fixed bin (34), 6 14 2 bounds_faults fixed bin (34), 6 15 2 vtoc_reads fixed bin (34), 6 16 2 vtoc_writes fixed bin (34); 6 17 6 18 /* END INCLUDE FILE process_usage.incl.pl1 */ 528 529 530 end task_ctl_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/86 1034.1 task_ctl_.pl1 >special_ldd>install>MR12.0-1206>task_ctl_.pl1 525 1 06/16/82 1317.6 tasking_data.incl.pl1 >ldd>include>tasking_data.incl.pl1 1-18 2 06/16/82 1317.7 task_data.incl.pl1 >ldd>include>task_data.incl.pl1 1-19 3 06/16/82 1317.8 task_create_data.incl.pl1 >ldd>include>task_create_data.incl.pl1 526 4 11/04/86 1324.3 stack_header.incl.pl1 >special_ldd>install>MR12.0-1206>stack_header.incl.pl1 527 5 11/03/86 1114.7 stack_frame.incl.pl1 >special_ldd>install>MR12.0-1206>stack_frame.incl.pl1 528 6 10/26/76 1333.6 process_usage.incl.pl1 >ldd>include>process_usage.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. BLOCKED constant fixed bin(17,0) initial dcl 2-27 set ref 272* 286 C32_DESC 000001 constant bit(36) initial dcl 29 set ref 253 Code parameter fixed bin(35,0) dcl 18 set ref 99 102* 106* 107 128 131* 179 182* 185* 201 204* 212 215* 223 226* 281 284* 377* Condition parameter char unaligned dcl 18 set ref 223 230* 256 Create_data parameter pointer dcl 18 set ref 99 106* DEAD constant fixed bin(17,0) initial dcl 2-27 set ref 153* 157 311 416 Info_ptr parameter pointer dcl 18 set ref 179 182* 189 223 230* 237 239 257 257 MASK_ALL 000006 constant bit(36) initial dcl 29 set ref 109* 151* 270* 300* 371* Meters parameter structure level 1 dcl 451 set ref 449 Offset parameter fixed bin(17,0) dcl 487 ref 484 490 PTR_DESC 000016 constant bit(36) initial dcl 29 set ref 254 Ptr parameter pointer dcl 486 ref 484 490 491 READY constant fixed bin(17,0) initial dcl 2-27 set ref 206* 271 288* 473 476 STOPPED constant fixed bin(17,0) initial dcl 2-27 set ref 217* State parameter fixed bin(17,0) dcl 470 ref 468 472 476 479 TASK_DP constant fixed bin(17,0) initial dcl 2-27 ref 392 402 Task parameter bit(36) dcl 386 in procedure "get_tdp" ref 384 390 393 Task parameter bit(36) dcl 18 in procedure "task_ctl_" set ref 99 103* 121* 128 179 201 212 223 281 370 Tdp parameter pointer dcl 425 in procedure "kill" ref 423 428 429 430 431 432 433 435 435 437 437 437 439 439 440 440 440 442 Tdp parameter pointer dcl 409 in procedure "gc_dead_tasks" set ref 407 412 416 416 416* UNMASK_ALL 000000 constant bit(36) initial dcl 29 set ref 161* abort 2 based label variable level 2 dcl 84 ref 143 311 addr builtin function dcl 92 ref 245 250 251 252 253 254 255 357 357 455 455 ap 52 based pointer array level 2 dcl 69 set ref 250* 251* 252* arg_count 50 based fixed bin(17,0) level 3 packed unsigned unaligned dcl 69 set ref 248* arg_list_header 50 based structure level 2 dcl 69 set ref 245 arg_ptr 32 based pointer level 2 dcl 5-36 set ref 245* bar_mode_sp 32 based pointer level 2 dcl 4-26 set ref 243 259* based_fb based fixed bin(17,0) dcl 27 ref 239 based_info based bit(36) array dcl 82 ref 257 based_ptr based pointer dcl 26 ref 392 402 baseno builtin function dcl 92 ref 117 154 baseptr builtin function dcl 92 ref 392 best_task 000136 automatic pointer dcl 307 set ref 315* 321* 325 327 best_value 000140 automatic fixed bin(35,0) dcl 308 set ref 316* 319 320* binary builtin function dcl 92 ref 117 154 390 490 cl_intermediary 100 based entry variable level 2 dcl 84 set ref 342* 345* cname 70 based char(32) level 2 dcl 69 set ref 250 256* code 50(17) based fixed bin(19,0) level 3 in structure "task_signal_frame" packed unsigned unaligned dcl 69 in procedure "task_ctl_" set ref 249* code 000112 automatic fixed bin(35,0) dcl 426 in procedure "kill" set ref 428* 429* 430* 431* 432* 433* code 000106 automatic fixed bin(35,0) dcl 90 in procedure "task_ctl_" set ref 339* 340* 341* 346* 347* 348* codeptr builtin function dcl 92 ref 244 cpu_time 2 000200 automatic fixed bin(71,0) level 2 in structure "pu" dcl 452 in procedure "meter" set ref 456 457 cpu_time 2 based fixed bin(71,0) level 2 in structure "process_usage" dcl 6-3 in procedure "task_ctl_" set ref 191* create_data 24 based structure level 2 in structure "my_task_data" dcl 84 in procedure "task_ctl_" create_data 24 based structure level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" cu_$get_cl_intermediary 000020 constant entry external dcl 45 ref 342 cu_$set_cl_intermediary 000022 constant entry external dcl 46 ref 345 dead_tasks 131 based bit(1) level 3 packed unaligned dcl 1-9 set ref 155* 355 356* desc_count 51 based fixed bin(17,0) level 3 packed unsigned unaligned dcl 69 set ref 248* dp 60 based pointer array level 2 dcl 69 set ref 253* 254* 254* elder_sister 6 based pointer level 2 dcl 2-9 set ref 111* 413 437 439* 439 440 440 eo_iocb 74 based pointer level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 430* 433* eo_iocb 74 based pointer level 2 in structure "my_task_data" dcl 84 in procedure "task_ctl_" set ref 341* 348* error_table_$bad_arg 000016 external static fixed bin(35,0) dcl 43 ref 377 flags 131 based structure level 2 dcl 1-9 hcs_$get_process_usage 000024 constant entry external dcl 49 ref 182 455 hcs_$reset_ips_mask 000030 constant entry external dcl 51 ref 119 165 195 207 218 290 302 376 hcs_$set_ips_mask 000026 constant entry external dcl 50 ref 109 151 161 270 300 371 info 100 based bit(36) array level 2 dcl 69 set ref 255 257* info_length 000100 automatic fixed bin(17,0) dcl 86 set ref 237* 239* 241 241 257 infop 66 based pointer level 2 dcl 69 set ref 252 255* iox_$destroy_iocb 000032 constant entry external dcl 54 ref 431 432 433 iox_$detach_iocb 000034 constant entry external dcl 55 ref 428 429 430 iox_$error_output 000014 external static pointer dcl 36 set ref 341* 348* iox_$move_attach 000036 constant entry external dcl 57 ref 339 340 341 346 347 348 iox_$user_input 000010 external static pointer dcl 36 set ref 339* 346* iox_$user_output 000012 external static pointer dcl 36 set ref 340* 347* ipc_$run 000040 constant entry external dcl 58 ref 162 ips_mask 104 based bit(36) level 2 dcl 84 set ref 338* 349 mem 126 based fixed bin(71,0) level 3 in structure "tasking_data" dcl 1-9 in procedure "task_ctl_" set ref 460 461* mem 4 parameter fixed bin(71,0) level 2 in structure "Meters" dcl 451 in procedure "meter" set ref 460* 460 mem 64 based fixed bin(71,0) level 3 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 192 meters 60 based structure level 2 in structure "my_task_data" dcl 84 in procedure "task_ctl_" set ref 310* meters 64 based structure level 3 in structure "tasking_data" dcl 1-9 in procedure "task_ctl_" meters 60 based structure level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 188* mod builtin function dcl 92 ref 491 mother 14 based pointer level 2 dcl 2-9 ref 111 113 113 115 437 my_task_data based structure level 1 dcl 84 my_task_ptr 000102 automatic pointer dcl 87 set ref 143 149 157 175 188 229 269 310 311 311 311 311 311 333 338 339 340 341 342 345 346 347 348 349 402* next_sp 22 based pointer level 2 dcl 5-36 set ref 241* next_tdp 000102 automatic pointer dcl 410 set ref 413* 415 null builtin function dcl 92 ref 104 113 141 173 182 230 230 230 230 237 257 267 298 315 317 325 328 374 395 412 416 435 437 440 500 501 514 517 520 null_ptr 20 based pointer level 2 dcl 4-26 set ref 251 number_can_return 1 based fixed bin(17,0) level 2 dcl 6-3 set ref 190* number_wanted based fixed bin(17,0) level 2 in structure "process_usage" dcl 6-3 in procedure "task_ctl_" ref 191 192 193 194 number_wanted 000200 automatic fixed bin(17,0) level 2 in structure "pu" dcl 452 in procedure "meter" set ref 454* offset 000232 automatic fixed bin(18,0) unsigned dcl 488 set ref 490* 491 491 old_pu 122 based structure level 2 dcl 1-9 overhead_meters 112 based structure level 2 dcl 1-9 set ref 359* page_faults 6 000200 automatic fixed bin(34,0) level 2 in structure "pu" dcl 452 in procedure "meter" set ref 462 463 page_faults 6 based fixed bin(34,0) level 2 in structure "process_usage" dcl 6-3 in procedure "task_ctl_" set ref 193* paging_measure 4 based fixed bin(71,0) level 2 in structure "process_usage" dcl 6-3 in procedure "task_ctl_" set ref 192* paging_measure 4 000200 automatic fixed bin(71,0) level 2 in structure "pu" dcl 452 in procedure "meter" set ref 460 461 pf 6 parameter fixed bin(35,0) level 2 in structure "Meters" dcl 451 in procedure "meter" set ref 462* 462 pf 66 based fixed bin(35,0) level 3 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 193 pf 130 based fixed bin(35,0) level 3 in structure "tasking_data" dcl 1-9 in procedure "task_ctl_" set ref 462 463* pointer builtin function dcl 92 ref 392 402 491 prev_sp 20 based pointer level 2 dcl 5-36 set ref 243* priority 36 based fixed bin(17,0) level 3 dcl 2-9 ref 319 320 process_usage based structure level 1 unaligned dcl 6-3 process_usage_pointer 000116 automatic pointer dcl 6-3 set ref 189* 190 191 191 192 192 193 193 194 194 pu 000200 automatic structure level 1 dcl 452 set ref 455 455 ready_head based pointer initial level 2 dcl 1-9 set ref 317 503* 514* ready_last 20 based pointer level 2 dcl 2-9 set ref 499* 514 516 517 519* 519 520* ready_next 16 based pointer level 2 dcl 2-9 set ref 323 328 500* 501* 514 516* 516 517 519 520* ready_tail 2 based pointer initial level 2 dcl 1-9 set ref 499 501 501 504* 517* rel builtin function dcl 92 ref 490 release_area_ 000042 constant entry external dcl 59 ref 435 release_temp_segment_ 000044 constant entry external dcl 60 ref 442 return_ptr 24 based pointer level 2 dcl 5-36 set ref 244* root_task_data 4 based structure level 2 dcl 1-9 set ref 357 357 saved_mask 000104 automatic bit(36) dcl 88 set ref 109* 119* 119* 151* 165* 165* 195* 195* 207* 207* 218* 218* 270* 290* 290* 300* 302* 302* 338 349* 371* 376* 376* sb based pointer level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 117 154 234 343* 344* 442* sb 000112 automatic pointer dcl 4-24 in procedure "task_ctl_" set ref 234* 235 241 243 251 259 scheduledp 000105 automatic bit(1) dcl 89 set ref 301* 303 segno 000162 automatic fixed bin(15,0) dcl 388 set ref 390* 391 392 signal_ 000046 constant entry external dcl 61 ref 230 size builtin function dcl 92 ref 241 241 sp 000114 automatic pointer dcl 5-31 set ref 235* 241* 241 241 241 243 244 245 245 246 248 248 249 250 250 251 252 252 253 254 254 255 255 256 257 259 stack_end_ptr 24 based pointer level 2 dcl 4-26 set ref 235 241* stack_frame based structure level 1 dcl 5-36 stack_header based structure level 1 dcl 4-26 stackbaseptr builtin function dcl 92 ref 402 state 23 based fixed bin(17,0) level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 271 286 416 472 473 479* state 23 based fixed bin(17,0) level 2 in structure "my_task_data" dcl 84 in procedure "task_ctl_" ref 157 311 substr builtin function dcl 92 ref 390 task 000150 automatic bit(36) dcl 368 set ref 370* 373* task_alm_$switch_stacks 000052 constant entry external dcl 63 ref 344 task_alm_$task_signal_caller_tv 000050 constant entry external dcl 62 ref 244 task_area_ptr 76 based pointer level 2 dcl 2-9 set ref 435 435* task_create_ 000054 constant entry external dcl 64 ref 106 task_create_data based structure level 1 dcl 3-10 task_data based structure level 1 dcl 2-9 task_data_ptr 000110 automatic pointer dcl 2-8 set ref 106* 111 111 113 113 113 115 115 117 121 149* 154 188 188 191 192 193 194 229 234 269* 271 286 317* 317* 319 320 321* 323 327* 328 333 343 344 373* 374 472 473 479 499 500 501 503 504 514 514 516 516 517 517 519 519 520 520 task_id 22 based bit(36) level 2 in structure "my_task_data" dcl 84 in procedure "task_ctl_" ref 175 task_id 22 based bit(36) level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" ref 121 393 task_init_ 000056 constant entry external dcl 65 ref 104 141 173 267 298 task_signal_frame based structure level 1 dcl 69 set ref 241 241 tasking_data based structure level 1 dcl 1-9 tasking_data_ptr_ 000062 external static pointer initial dcl 1-8 ref 104 117 141 154 155 173 182 267 298 317 355 356 357 357 359 391 456 457 458 459 460 461 462 463 499 501 501 503 504 514 517 tcpu parameter fixed bin(71,0) level 2 in structure "Meters" dcl 451 in procedure "meter" set ref 456* 456 tcpu 60 based fixed bin(71,0) level 3 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 191 tcpu 122 based fixed bin(71,0) level 3 in structure "tasking_data" dcl 1-9 in procedure "task_ctl_" set ref 456 457* tdp 000100 automatic pointer dcl 410 in procedure "gc_dead_tasks" set ref 412* 412* 413 414* tdp 000160 automatic pointer dcl 387 in procedure "get_tdp" set ref 392* 393 393 translator_id 37 based bit(18) level 2 packed unaligned dcl 5-36 set ref 246* ui_iocb 70 based pointer level 2 in structure "my_task_data" dcl 84 in procedure "task_ctl_" set ref 339* 346* ui_iocb 70 based pointer level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 428* 431* uo_iocb 72 based pointer level 2 in structure "my_task_data" dcl 84 in procedure "task_ctl_" set ref 340* 347* uo_iocb 72 based pointer level 2 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 429* 432* valid_tasks 132 based bit(1) initial array level 2 packed unaligned dcl 1-9 set ref 117* 154* 391 vcpu 124 based fixed bin(71,0) level 3 in structure "tasking_data" dcl 1-9 in procedure "task_ctl_" set ref 458 459* vcpu 62 based fixed bin(71,0) level 3 in structure "task_data" dcl 2-9 in procedure "task_ctl_" set ref 194 vcpu 2 parameter fixed bin(71,0) level 2 in structure "Meters" dcl 451 in procedure "meter" set ref 458* 458 vcpu 62 based fixed bin(71,0) level 3 in structure "my_task_data" dcl 84 in procedure "task_ctl_" set ref 311 vcpu_limit 34 based fixed bin(71,0) level 3 dcl 84 ref 311 311 virtual_cpu_time 10 based fixed bin(71,0) level 2 in structure "process_usage" dcl 6-3 in procedure "task_ctl_" set ref 194* virtual_cpu_time 10 000200 automatic fixed bin(71,0) level 2 in structure "pu" dcl 452 in procedure "meter" set ref 458 459 xhcs_$set_stack_ptr 000060 constant entry external dcl 67 ref 343 younger_sister 10 based pointer level 2 dcl 2-9 set ref 113* 437 439 440* 440 youngest_daughter 12 based pointer level 2 dcl 2-9 set ref 111 113 113 115* 412 416 437* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. RETURN_PTR_MASK internal static bit(72) initial unaligned dcl 5-19 TRANSLATOR_ID_ALM internal static bit(18) initial unaligned dcl 5-25 TRANSLATOR_ID_PL1V1 internal static bit(18) initial unaligned dcl 5-26 TRANSLATOR_ID_PL1V2 internal static bit(18) initial unaligned dcl 5-24 TRANSLATOR_ID_SIGNALLER internal static bit(18) initial unaligned dcl 5-28 TRANSLATOR_ID_SIGNAL_CALLER internal static bit(18) initial unaligned dcl 5-27 addrel builtin function dcl 92 any_other 000000 stack reference condition dcl 95 bit builtin function dcl 92 call_offset internal static fixed bin(17,0) initial dcl 4-78 clock builtin function dcl 92 entry_offset internal static fixed bin(17,0) initial dcl 4-78 get_ring_ 000000 constant entry external dcl 47 get_temp_segment_ 000000 constant entry external dcl 48 ioa_$rsnnl 000000 constant entry external dcl 52 iox_$attach_name 000000 constant entry external dcl 53 iox_$find_iocb 000000 constant entry external dcl 56 length builtin function dcl 92 push_offset internal static fixed bin(17,0) initial dcl 4-78 return_no_pop_offset internal static fixed bin(17,0) initial dcl 4-78 return_offset internal static fixed bin(17,0) initial dcl 4-78 segno automatic fixed bin(18,0) unsigned dcl 367 stack_frame_flags based structure level 1 dcl 5-64 stack_frame_min_length internal static fixed bin(17,0) initial dcl 5-33 stack_header_overlay based fixed bin(17,0) array dcl 4-94 stackframeptr builtin function dcl 92 string builtin function dcl 92 sys_info$max_seg_size external static fixed bin(19,0) dcl 41 task_create_data_ptr automatic pointer dcl 3-9 task_create_data_version_3 internal static fixed bin(17,0) initial dcl 3-8 tv_offset internal static fixed bin(17,0) initial dcl 4-72 unique_chars_ 000000 constant entry external dcl 66 unspec builtin function dcl 92 NAMES DECLARED BY EXPLICIT CONTEXT. addrel16 002353 constant entry internal dcl 484 ref 241 block 001150 constant entry external dcl 264 create 000062 constant entry external dcl 99 current_task 000416 constant entry external dcl 170 death 000276 constant entry external dcl 145 destroy 000230 constant entry external dcl 128 die 000251 constant entry external dcl 138 find_my_task 001753 constant entry internal dcl 400 ref 133 142 148 174 187 228 268 299 find_something_to_do 000344 constant label dcl 157 ref 277 find_task 001661 constant entry internal dcl 365 ref 132 186 205 216 227 285 gc_dead_tasks 001763 constant entry internal dcl 407 ref 357 414 get_task_usage 000466 constant entry external dcl 179 get_tdp 001720 constant entry internal dcl 384 ref 373 kill 002040 constant entry internal dcl 423 ref 416 mark_as_dead 000310 constant label dcl 151 ref 134 meter 002246 constant entry internal dcl 449 ref 188 310 359 return_to_caller 000212 constant label dcl 123 ref 378 schedule 001266 constant entry external dcl 295 signal 000733 constant entry external dcl 223 sked 001353 constant entry internal dcl 305 ref 157 301 start 000620 constant entry external dcl 201 stop 000664 constant entry external dcl 212 task_ctl_ 000046 constant entry external dcl 12 thread_in 002375 constant entry internal dcl 496 ref 330 477 thread_out 002427 constant entry internal dcl 511 ref 329 474 update_state 002327 constant entry internal dcl 468 ref 153 206 217 272 288 wake 001233 constant label dcl 286 ref 260 wakeup 001215 constant entry external dcl 281 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3152 3236 2545 3162 Length 3652 2545 64 400 405 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME task_ctl_ 236 external procedure is an external procedure. sked internal procedure shares stack frame of external procedure task_ctl_. begin block on line 333 begin block shares stack frame of external procedure task_ctl_. find_task internal procedure shares stack frame of external procedure task_ctl_. get_tdp internal procedure shares stack frame of external procedure task_ctl_. find_my_task internal procedure shares stack frame of external procedure task_ctl_. gc_dead_tasks 104 internal procedure calls itself recursively. kill internal procedure shares stack frame of internal procedure gc_dead_tasks. meter internal procedure shares stack frame of external procedure task_ctl_. update_state internal procedure shares stack frame of external procedure task_ctl_. addrel16 internal procedure shares stack frame of external procedure task_ctl_. thread_in internal procedure shares stack frame of external procedure task_ctl_. thread_out internal procedure shares stack frame of external procedure task_ctl_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME gc_dead_tasks 000100 tdp gc_dead_tasks 000102 next_tdp gc_dead_tasks 000112 code kill task_ctl_ 000100 info_length task_ctl_ 000102 my_task_ptr task_ctl_ 000104 saved_mask task_ctl_ 000105 scheduledp task_ctl_ 000106 code task_ctl_ 000110 task_data_ptr task_ctl_ 000112 sb task_ctl_ 000114 sp task_ctl_ 000116 process_usage_pointer task_ctl_ 000136 best_task sked 000140 best_value sked 000150 task find_task 000160 tdp get_tdp 000162 segno get_tdp 000200 pu meter 000232 offset addrel16 THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return_mac tra_ext_2 mdfx1 signal_op ext_entry ext_entry_desc int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$get_cl_intermediary cu_$set_cl_intermediary hcs_$get_process_usage hcs_$reset_ips_mask hcs_$set_ips_mask iox_$destroy_iocb iox_$detach_iocb iox_$move_attach ipc_$run release_area_ release_temp_segment_ signal_ task_alm_$switch_stacks task_alm_$task_signal_caller_tv task_create_ task_init_ xhcs_$set_stack_ptr THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg iox_$error_output iox_$user_input iox_$user_output tasking_data_ptr_ LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000045 99 000055 102 000076 103 000077 104 000100 106 000110 107 000124 109 000140 111 000151 113 000156 115 000165 117 000167 119 000200 121 000207 123 000212 128 000224 131 000244 132 000245 133 000246 134 000247 138 000250 141 000260 142 000271 143 000272 145 000275 148 000305 149 000306 151 000310 153 000321 154 000323 155 000336 157 000340 161 000351 162 000364 165 000371 166 000401 170 000413 173 000425 174 000436 175 000437 179 000462 182 000504 185 000522 186 000523 187 000524 188 000525 189 000540 190 000543 191 000545 192 000552 193 000560 194 000566 195 000574 197 000604 201 000616 204 000634 205 000635 206 000636 207 000640 208 000650 212 000662 215 000700 216 000701 217 000702 218 000704 219 000714 223 000726 226 000757 227 000760 228 000761 229 000762 230 000766 231 001016 234 001030 235 001033 237 001035 239 001043 241 001046 243 001060 244 001062 245 001065 246 001067 248 001071 249 001101 250 001105 251 001107 252 001111 253 001113 254 001115 255 001121 256 001123 257 001131 259 001144 260 001146 264 001147 267 001157 268 001170 269 001171 270 001173 271 001204 272 001210 277 001212 281 001213 284 001231 285 001232 286 001233 288 001237 290 001241 291 001251 295 001263 298 001274 299 001305 300 001306 301 001317 302 001321 303 001331 305 001353 310 001355 311 001364 315 001376 316 001400 317 001402 319 001414 320 001420 321 001421 323 001422 325 001425 327 001434 328 001436 329 001443 330 001444 333 001445 338 001451 339 001454 340 001467 341 001503 342 001517 343 001527 344 001536 345 001545 346 001555 347 001571 348 001605 349 001621 355 001624 356 001632 357 001634 359 001644 360 001655 365 001661 370 001662 371 001664 373 001675 374 001677 376 001704 377 001714 378 001717 384 001720 390 001722 391 001725 392 001734 393 001742 395 001750 400 001753 402 001754 403 001761 407 001762 412 001770 413 002002 414 002005 415 002014 416 002017 417 002037 423 002040 428 002042 429 002055 430 002071 431 002105 432 002121 433 002135 435 002151 437 002167 439 002202 440 002205 442 002216 443 002245 449 002246 454 002250 455 002252 456 002266 457 002276 458 002300 459 002305 460 002307 461 002313 462 002315 463 002324 464 002326 468 002327 472 002331 473 002336 474 002340 476 002341 477 002345 479 002346 480 002352 484 002353 490 002355 491 002364 496 002375 499 002376 500 002404 501 002407 503 002420 504 002422 505 002426 511 002427 514 002430 516 002442 517 002445 519 002460 520 002463 521 002470 ----------------------------------------------------------- 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