ASSEMBLY LISTING OF SEGMENT >spec>install>1111>thread.alm ASSEMBLED ON: 11/11/89 0923.8 mst Sat OPTIONS USED: -target l68 list symbols ASSEMBLED BY: ALM Version 8.14 March 1989 ASSEMBLER CREATED: 06/09/89 1002.3 mst Fri 1 " *********************************************************** 2 " * * 3 " * Copyright, (C) Honeywell Bull Inc., 1987 * 4 " * * 5 " * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6 " * * 7 " * Copyright (c) 1972 by Massachusetts Institute of * 8 " * Technology and Honeywell Information Systems, Inc. * 9 " * * 10 " *********************************************************** 11 12 " 13 " THREAD 14 " 15 " This procedure is used by the supervisor to manage threaded lists of 16 " objects. Every such object should have a declaration which begins: 17 " 18 " dcl 1 thing aligned based, 19 " 2 forward_ptr bit (18) unaligned, 20 " 2 back_ptr bit (18) unaligned, 21 " 22 " The first word of each object must contain two eighteen bit pointers 23 " (segment-base relative) to the next and previous objects in the list. 24 " 25 " This procedure also maintains a pointer into the list. It must be an 26 " 18 bit relative offset, and appear in the upper halfword of a word. 27 " The caller of thread may therefore declare it aligned. 28 " 29 " No checking is done to insure that these requirements for alignment 30 " and location are being followed. 31 " 32 " 10/03/73, R. E. Mullen, in v2pl1 33 " 04/17/75, A. Bensoussan, to zero the fp and bp when threading out. 34 " 03/26/81, W. Olin Sibert, to re-code in ALM 35 " 36 000000 37 name thread 000000 38 segdef lin " Thread in, to linear list 000017 39 segdef cin " Thread in, to circular list 000040 40 segdef out " Thread out, of either type 41 000001 42 equ thread,1 " PR1 points to thread word throughout 000002 43 equ object,2 " PR2 points to object 000003 44 equ base,3 " PR3 points to base of segment containing 45 " the object (though perhaps not the thread) 46 000000 47 equ .object,0 " X0 is offset of object 000001 48 equ .next,1 " X1 is offset of next object 000002 49 equ .prev,2 " X2 is offset of previous object 000003 50 equ .thread,3 " X3 is the value of the thread word (on entry) 51 52 53 " 54 " 55 " THREAD$LIN -- Thread object into linear list 56 " 57 " dcl thread$lin entry (pointer, bit (18) unaligned); 58 " 59 " call thread$lin (astep, sst.ausedp (0)); 60 " 61 62 000000 aa 0 00002 3521 20 63 lin: epp object,ap|2,* 000001 aa 0 00004 3515 20 64 epp thread,ap|4,* " Pointer to thread word 000002 aa 2 00000 3521 20 65 epp object,object|0,* " Pointer to object 66 000003 aa 2 00000 6201 00 67 eax .object,object|0 " Offset of object 000004 aa 1 00000 2231 00 68 ldx .thread,thread|0 " Current value of thread (next_object) 69 70 " Is list empty now? 000005 0a 000011 6010 00 71 tnz lin.non_empty " No -- go thread into nonempty list 72 73 " It was empty, so the thing we're threading in will be the only thing in the list. 74 000006 aa 1 00000 7401 00 75 stx .object,thread|0 " object.bp = null, object.fp = null 000007 aa 2 00000 4501 00 76 stz object|0 " thread = object_ptr 77 000010 aa 7 00044 7101 20 78 short_return " 79 80 81 " Since it was nonempty, we thread this object in at the end of the list. The 82 " thread ends up pointing at the object we are threading in, and the object 83 " it used to point to is adjusted to point (back) at the new one. 84 000011 85 lin.non_empty: 000011 aa 2 00000 3531 00 86 epbp base,object|0 " Get a pointer to the base of the segment 000012 aa 2 00000 4501 00 87 stz object|0 " object.bp = null 000013 aa 2 00000 7431 00 88 stx .thread,object|0 " object.fp = thread (prev_object_ptr) 000014 aa 1 00000 7401 00 89 stx .object,thread|0 " thread = object_ptr 000015 aa 3 00000 4401 13 90 sxl .object,base|0,.thread " prev_object.bp = object_ptr 91 000016 aa 7 00044 7101 20 92 short_return 93 94 95 " 96 " 97 " THREAD$CIN -- Thread object into circular list 98 " 99 " dcl thread$cin entry (pointer, bit (18) unaligned); 100 " 101 " call thread$cin (astep, sst.ausedp (0)); 102 " 103 104 000017 aa 0 00002 3521 20 105 cin: epp object,ap|2,* " (pointer argument) 000020 aa 0 00004 3515 20 106 epp thread,ap|4,* " Pointer to thread word 000021 aa 2 00000 3521 20 107 epp object,object|0,* " Pointer to object 108 000022 aa 2 00000 6201 00 109 eax .object,object|0 " Offset of object 000023 aa 1 00000 2231 00 110 ldx .thread,thread|0 " Current value of thread (next_object) 111 112 " Is list empty now? 000024 0a 000031 6010 00 113 tnz cin.non_empty " No -- go thread into nonempty list 114 115 " It was empty, so all threads point to it 000025 aa 2 00000 7401 00 116 stx .object,object|0 " object.fp = object_ptr 000026 aa 2 00000 4401 00 117 sxl .object,object|0 " object.bp = object_ptr 000027 aa 1 00000 7401 00 118 stx .object,thread|0 " thread = object_ptr 119 000030 aa 7 00044 7101 20 120 short_return 121 122 123 " Since it was not empty, we will now thread in the new object between the "previous" 124 " and "next" objects -- the thread is always considered to point to the "next" 125 " object. After our object has been threaded in, it will be at the very end of 126 " the list. 127 000031 128 cin.non_empty: 000031 aa 2 00000 3531 00 129 epbp base,object|0 " Get a pointer to the base of the segment 000032 aa 2 00000 7431 00 130 stx .thread,object|0 " object.fp = thread (next_object_ptr) 000033 aa 3 00000 7221 13 131 lxl .prev,base|0,.thread " prev_object_ptr 000034 aa 2 00000 4421 00 132 sxl .prev,object|0 " object.bp = prev_object.bp 000035 aa 3 00000 7401 12 133 stx .object,base|0,.prev " prev_object.fp = object_ptr 000036 aa 3 00000 4401 13 134 sxl .object,base|0,.thread " next_object.bp = object_ptr 135 000037 aa 7 00044 7101 20 136 short_return 137 138 139 " 140 " 141 " THREAD$OUT -- Thread object out of the list 142 " 143 " dcl thread$out entry (pointer, bit (18) unaligned); 144 " 145 " call thread$out (astep, sst.ausedp (0)); 146 " 147 148 000040 aa 0 00002 3521 20 149 out: epp object,ap|2,* " (pointer argument) 000041 aa 0 00004 3515 20 150 epp thread,ap|4,* " Pointer to thread word 000042 aa 2 00000 3521 20 151 epp object,object|0,* " Pointer to object 152 000043 aa 2 00000 6201 00 153 eax .object,object|0 " Offset of object 000044 aa 1 00000 2231 00 154 ldx .thread,thread|0 " Current value of thread (next_object) 155 000045 aa 2 00000 3531 00 156 epbp base,object|0 " Get a pointer to the base of the segment 000046 aa 2 00000 2211 00 157 ldx .next,object|0 " and pointers to the previous and next object 000047 aa 2 00000 7221 00 158 lxl .prev,object|0 000050 0a 000052 6000 00 159 tze out.no_previous " if prev pointer is non-null, 160 " rethread forward pointer for prev object 000051 aa 3 00000 7411 12 161 stx .next,base|0,.prev " prev_object.fp = next_object_ptr 162 " (fall through) 000052 163 out.no_previous: 000052 aa 777777 3010 03 164 canx .next,=o777777,du " if next pointer is non-null, rethread 000053 0a 000055 6000 00 165 tze out.no_next " backward pointer for next object 166 000054 aa 3 00000 4421 11 167 sxl .prev,base|0,.next " next_object.bp = prev_object_ptr 168 " (fall through) 000055 169 out.no_next: 000055 aa 1 00000 1001 00 170 cmpx .object,thread|0 " If thread pointed to object we are threading 000056 0a 000060 6010 00 171 tnz out.not_this_one " out, adjust it to point to the next, instead 172 000057 aa 1 00000 7411 00 173 stx .next,thread|0 " thread = next_object_ptr 174 000060 175 out.not_this_one: " If this object points to itself, we are 000060 aa 2 00000 1001 00 176 cmpx .object,object|0 " removing the only object on a circular 000061 0a 000064 6000 00 177 tze out.last_in_list " list, so we should zero the thread word 178 000062 aa 2 00000 4501 00 179 stz object|0 " Finally, zero the threads in the object 180 " being removed. 000063 aa 7 00044 7101 20 181 short_return 182 183 000064 184 out.last_in_list: " Can't use an STZ here, because there may 000064 aa 000000 2230 03 185 ldx .thread,0,du " be something else in the lower halfword 000065 aa 1 00000 7431 00 186 stx .thread,thread|0 " thread = null 000066 aa 2 00000 4501 00 187 stz object|0 " Finally, zero the threads in the object 188 " being removed. 000067 aa 7 00044 7101 20 189 short_return 190 191 end NO LITERALS NAME DEFINITIONS FOR ENTRY POINTS AND SEGDEFS 000070 5a 000003 000000 000071 5a 000033 600000 000072 aa 000000 000000 000073 55 000010 000002 000074 5a 000002 400003 000075 55 000006 000010 000076 aa 006 164 150 162 000077 aa 145 141 144 000 000100 55 000014 000003 000101 0a 000040 400000 000102 55 000013 000003 000103 aa 003 157 165 164 out 000104 55 000020 000010 000105 0a 000017 400000 000106 55 000017 000003 000107 aa 003 143 151 156 cin 000110 55 000024 000014 000111 0a 000000 400000 000112 55 000023 000003 000113 aa 003 154 151 156 lin 000114 55 000002 000020 000115 6a 000000 400002 000116 55 000027 000003 000117 aa 014 163 171 155 symbol_table 000120 aa 142 157 154 137 000121 aa 164 141 142 154 000122 aa 145 000 000 000 DEFINITIONS HASH TABLE 000123 aa 000000 000015 000124 aa 000000 000000 000125 5a 000014 000000 000126 aa 000000 000000 000127 5a 000010 000000 000130 aa 000000 000000 000131 5a 000020 000000 000132 5a 000024 000000 000133 aa 000000 000000 000134 aa 000000 000000 000135 aa 000000 000000 000136 aa 000000 000000 000137 aa 000000 000000 000140 aa 000000 000000 NO EXTERNAL NAMES NO TRAP POINTER WORDS TYPE PAIR BLOCKS 000141 aa 000001 000000 000142 aa 000000 000000 INTERNAL EXPRESSION WORDS 000143 aa 000000 000000 LINKAGE INFORMATION 000000 aa 000000 000000 000001 0a 000070 000000 000002 aa 000000 000000 000003 aa 000000 000000 000004 aa 000000 000000 000005 aa 000000 000000 000006 22 000010 000010 000007 a2 000000 000000 SYMBOL INFORMATION SYMBOL TABLE HEADER 000000 aa 000000 000001 000001 aa 163171 155142 000002 aa 164162 145145 000003 aa 000000 000010 000004 aa 000000 117244 000005 aa 361023 525721 000006 aa 000000 117547 000007 aa 242002 435363 000010 aa 141154 155040 000011 aa 040040 040040 000012 aa 000024 000040 000013 aa 000034 000040 000014 aa 000044 000100 000015 aa 000002 000002 000016 aa 000064 000000 000017 aa 000000 000131 000020 aa 000000 000102 000021 aa 000113 000110 000022 aa 000123 000102 000023 aa 000064 000000 000024 aa 101114 115040 000025 aa 126145 162163 000026 aa 151157 156040 000027 aa 070056 061064 000030 aa 040115 141162 000031 aa 143150 040061 000032 aa 071070 071040 000033 aa 040040 040040 000034 aa 110151 162156 000035 aa 145151 163145 000036 aa 156056 123171 000037 aa 163115 141151 000040 aa 156164 056141 000041 aa 040040 040040 000042 aa 040040 040040 000043 aa 040040 040040 000044 aa 055164 141162 000045 aa 147145 164040 000046 aa 154066 070040 000047 aa 040040 040040 000050 aa 040040 040040 000051 aa 040040 040040 000052 aa 040040 040040 000053 aa 040040 040040 000054 aa 040040 040040 000055 aa 040040 040040 000056 aa 040154 151163 000057 aa 164040 163171 000060 aa 155142 157154 000061 aa 163040 040040 000062 aa 040040 040040 000063 aa 040040 040040 000064 aa 000000 000001 000065 aa 000000 000001 000066 aa 000072 000035 000067 aa 175453 017617 000070 aa 000000 117547 000071 aa 176204 400000 000072 aa 076163 160145 >spec>install>1111>thread.alm 000073 aa 143076 151156 000074 aa 163164 141154 000075 aa 154076 061061 000076 aa 061061 076164 000077 aa 150162 145141 000100 aa 144056 141154 000101 aa 155040 040040 MULTICS ASSEMBLY CROSS REFERENCE LISTING Value Symbol Source file Line number 1 .next thread: 48, 157, 161, 164, 167, 173. 0 .object thread: 47, 67, 75, 89, 90, 109, 116, 117, 118, 133, 134, 153, 170, 176. 2 .prev thread: 49, 131, 132, 133, 158, 161, 167. 3 .thread thread: 50, 68, 88, 90, 110, 130, 131, 134, 154, 185, 186. 3 base thread: 44, 86, 90, 129, 131, 133, 134, 156, 161, 167. 17 cin thread: 39, 105. 31 cin.non_empty thread: 113, 128. 0 lin thread: 38, 63. 11 lin.non_empty thread: 71, 85. 2 object thread: 43, 63, 65, 67, 76, 86, 87, 88, 105, 107, 109, 116, 117, 129, 130, 132, 149, 151, 153, 156, 157, 158, 176, 179, 187. 40 out thread: 40, 149. 64 out.last_in_list thread: 177, 184. 60 out.not_this_one thread: 171, 175. 55 out.no_next thread: 165, 169. 52 out.no_previous thread: 159, 163. 1 thread thread: 42, 64, 68, 75, 89, 106, 110, 118, 150, 154, 170, 173, 186. NO FATAL ERRORS ----------------------------------------------------------- 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