COMPILATION LISTING OF SEGMENT upd_add_task_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1722.3 mst Mon 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 upd_add_task_: procedure (name, argp) 12 options ( rename (( alloc_, smart_alloc_)) ); 13 14 15 /* 16* 17* This procedure is used within the Multics Online Updater to construct 18* the task list (which is a list of procedure calls including arguments). 19* The "thread_task_" condition is signalled (supplying a pointer to the 20* generated task) to add the task to the current task list. 21* 22* The following are entries: 23* 24* upd_add_task_ allocates a task element and inserts 25* it into the current task list by signalling 26* the "thread_task_" condition. 27* 28* upd_add_task_$init specifies the area and linkage table 29* to be used for all generated tasks 30* 31* upd_add_task_$reset reinitializes all procedure entry 32* pointers in the task linkage table 33* (used to resurrect the updater in 34* a new process) 35* 36* The pointers specified on the initialization call are not copied; 37* rather, internal static pointers to them are maintained, thereby 38* allowing the caller to modify the actual pointers. This is primarily 39* useful to allow area switching to be done when the "area" condition 40* is signalled. 41* 42* Within the Updater, this procedure is restartable, i.e. system or 43* process failures are "programmed around". 44* 45* P. Bos, May 1972 46* 47**/ 48 49 /* */ 50 51 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 52 53 54 dcl name char(*), /* name of entry point to be called, e.g. a$b */ 55 argp ptr; /* argument list pointer */ 56 57 dcl decode_entryname_ entry (char(*), char(32), char(32)), 58 signal_ entry (char(*), ptr, ptr, ptr); 59 60 dcl (addr, fixed, null) builtin; 61 62 dcl ename char(32), /* entryname portion of "name" */ 63 rname char(32); /* refname portion of "name" */ 64 65 dcl based_p ptr based, /* the obvious */ 66 (p, q, r) ptr; /* random */ 67 68 dcl (ap, lp) ptr int static init (null); /* pointers to areap, linkp */ 69 70 dcl size fixed bin, /* computed arglist size */ 71 space (size) fixed bin based; /* overlay for arglist copy */ 72 73 dcl area area based (ap -> based_p); /* user area to allocate tasks in */ 74 75 dcl 1 arglist aligned based (argp), /* argument list */ 76 (2 an bit(18), /* argument count */ 77 2 sn bit(18), /* sp flag (for internal calls) */ 78 2 dn bit(18), /* descriptor count */ 79 2 pad bit(18)) unal, /* unused */ 80 2 p (100) ptr; /* arg pointers for standard updater task args */ 81 82 dcl 1 l aligned based (p), /* linkage table (list) entry */ 83 2 nextp ptr, /* pointer to next link in list */ 84 2 procp ptr, /* procedure entry pointer */ 85 (2 rname char(32), /* procedure refname and entryname */ 86 2 ename char(32)) unal; /* (fudge alignment for stupid pl1) */ 87 88 dcl 1 task aligned based (q), /* task element */ 89 2 nextp ptr, /* pointer to following task */ 90 2 backp ptr, /* pointer to previous task */ 91 2 procp ptr, /* task procedure pointer */ 92 2 arglist (size) fixed bin; /* argument list for this task */ 93 94 /* */ 95 96 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 97 98 99 call decode_entryname_(name, rname, ename); /* get refname, entry point name separately */ 100 q = lp; /* get linkage list root pointer */ 101 p = q -> based_p; /* and pointer to first link */ 102 do while (p ^= null); /* search linkage table (list) for this entry point */ 103 if rname = l.rname then if ename = l.ename then /* does it match? */ 104 go to found; /* yes, go allocate task */ 105 q = p; /* no, remember him in case we fall off end */ 106 p = l.nextp; /* get next linkage entry */ 107 end; 108 allocate l in (area); /* allocate new linkage block */ 109 l.nextp = null; /* will be on end of list */ 110 l.procp = null; /* null procedure pointer */ 111 l.rname = rname; /* and procedure name */ 112 l.ename = ename; /* and entry point name */ 113 q -> l.nextp = p; /* add it to list */ 114 115 found: q = arglist.p(6) -> based_p; /* 6th arg to all updater tasks is task pointer */ 116 if q = null then do; /* if no task there yet, */ 117 size = fixed (arglist.an) + fixed (arglist.dn) + 2; /* compute arglist size */ 118 if fixed (arglist.sn) = 2 then /* what dummy added values "4" and "8" here? */ 119 size = size + 2; /* .. once upon a time, we could just add */ 120 else if fixed (arglist.sn) = 8 then /* .. all three halfwords to get arglist size */ 121 size = size + 2; /* .. and save all this diddling */ 122 allocate task in (area); /* allocate task element */ 123 task.nextp, task.backp = null; /* not connected to anybody */ 124 task.procp = addr (l.procp); /* task procedure pointer points to linkage table entry */ 125 r = addr (task.arglist); /* get pointer to arglist substructure */ 126 r -> space = argp -> space; /* copy arglist into task block */ 127 arglist.p(6) -> based_p = q; /* give caller pointer to task in his taskp argument */ 128 end; 129 call signal_("thread_task_", null, q, null); /* throw task in the air, see who catches it */ 130 131 return; /* done, exit */ 132 133 /* */ 134 135 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 136 137 138 dcl areap ptr, /* pointer to caller's area */ 139 linkp ptr; /* pointer to linkage table */ 140 141 142 init: entry (areap, linkp); /* initialization entry point */ 143 144 145 ap = addr (areap); /* save pointer to user's areap */ 146 lp = addr (linkp); /* and to his linkp */ 147 return; /* not much of a cough... */ 148 149 150 reset: entry (linkp); /* entry to reinitialize linkage table */ 151 152 153 p = linkp; /* get pointer to first entry in table */ 154 do while (p ^= null); /* linkage table is threaded list */ 155 l.procp = null; /* make entry pointer null */ 156 p = l.nextp; /* get pointer to next linkage entry */ 157 end; 158 return; /* done, exit */ 159 160 161 end upd_add_task_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1513.3 upd_add_task_.pl1 >dumps>old>recomp>upd_add_task_.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. addr builtin function dcl 60 ref 124 125 145 146 an based bit(18) level 2 packed unaligned dcl 75 ref 117 ap 000010 internal static pointer initial dcl 68 set ref 108 122 145* area based area(1024) dcl 73 ref 108 122 areap parameter pointer dcl 138 set ref 142 145 arglist 6 based fixed bin(17,0) array level 2 in structure "task" dcl 88 in procedure "upd_add_task_" set ref 125 arglist based structure level 1 dcl 75 in procedure "upd_add_task_" argp parameter pointer dcl 54 ref 11 115 117 117 118 120 126 127 backp 2 based pointer level 2 dcl 88 set ref 123* based_p based pointer dcl 65 set ref 101 108 115 122 127* decode_entryname_ 000016 constant entry external dcl 57 ref 99 dn 1 based bit(18) level 2 packed unaligned dcl 75 ref 117 ename 14 based char(32) level 2 in structure "l" packed unaligned dcl 82 in procedure "upd_add_task_" set ref 103 112* ename 000100 automatic char(32) unaligned dcl 62 in procedure "upd_add_task_" set ref 99* 103 112 fixed builtin function dcl 60 ref 117 117 118 120 l based structure level 1 dcl 82 set ref 108 linkp parameter pointer dcl 138 set ref 142 146 150 153 lp 000012 internal static pointer initial dcl 68 set ref 100 146* name parameter char unaligned dcl 54 set ref 11 99* nextp based pointer level 2 in structure "l" dcl 82 in procedure "upd_add_task_" set ref 106 109* 113* 156 nextp based pointer level 2 in structure "task" dcl 88 in procedure "upd_add_task_" set ref 123* null builtin function dcl 60 ref 102 109 110 116 123 129 129 129 129 154 155 p 2 based pointer array level 2 in structure "arglist" dcl 75 in procedure "upd_add_task_" ref 115 127 p 000120 automatic pointer dcl 65 in procedure "upd_add_task_" set ref 101* 102 103 103 105 106* 106 108* 109 110 111 112 113 124 153* 154 155 156* 156 procp 2 based pointer level 2 in structure "l" dcl 82 in procedure "upd_add_task_" set ref 110* 124 155* procp 4 based pointer level 2 in structure "task" dcl 88 in procedure "upd_add_task_" set ref 124* q 000122 automatic pointer dcl 65 set ref 100* 101 105* 113 115* 116 122* 123 123 124 125 127 129* r 000124 automatic pointer dcl 65 set ref 125* 126 rname 000110 automatic char(32) unaligned dcl 62 in procedure "upd_add_task_" set ref 99* 103 111 rname 4 based char(32) level 2 in structure "l" packed unaligned dcl 82 in procedure "upd_add_task_" set ref 103 111* signal_ 000020 constant entry external dcl 57 ref 129 size 000126 automatic fixed bin(17,0) dcl 70 set ref 117* 118* 118 120* 120 122 126 sn 0(18) based bit(18) level 2 packed unaligned dcl 75 ref 118 120 space based fixed bin(17,0) array dcl 70 set ref 126* 126 task based structure level 1 dcl 88 set ref 122 NAMES DECLARED BY EXPLICIT CONTEXT. found 000130 constant label dcl 115 ref 103 init 000274 constant entry external dcl 142 reset 000316 constant entry external dcl 150 upd_add_task_ 000015 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 430 452 345 440 Length 626 345 22 137 63 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME upd_add_task_ 128 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 ap upd_add_task_ 000012 lp upd_add_task_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME upd_add_task_ 000100 ename upd_add_task_ 000110 rname upd_add_task_ 000120 p upd_add_task_ 000122 q upd_add_task_ 000124 r upd_add_task_ 000126 size upd_add_task_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. decode_entryname_ signal_ smart_alloc_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000011 99 000030 100 000050 101 000053 102 000056 103 000062 105 000073 106 000074 107 000076 108 000077 109 000115 110 000117 111 000121 112 000124 113 000127 115 000130 116 000136 117 000142 118 000152 120 000164 122 000172 123 000213 124 000217 125 000222 126 000224 127 000234 129 000235 131 000267 142 000270 145 000304 146 000310 147 000312 150 000313 153 000326 154 000331 155 000335 156 000340 157 000342 158 000343 ----------------------------------------------------------- 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