COMPILATION LISTING OF SEGMENT send_ips Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 08/27/84 1438.8 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 /* format: style5 */ 11 12 /* DESCRIPTION: 13* Command to send IPS signals or ipc_ wakeups, to help fix system problems. 14**/ 15 16 /* HISTORY: 17*Written by T. Casey, May 1978. 18*Modified: 19*09/01/78 by T. Casey: Fix bugs and improve the error messages. 20*05/01/80 by T. Casey: Make it match MCR 4051 and fix a bug. 21*07/15/84 by R. Michael Tague: IPS signal names have been lengthened, so 22* signal_arg was changed to a char (32) varying instead of char(8). 23**/ 24 25 26 send_ips: proc; 27 28 dcl (ppid, pips, pmsg) ptr; 29 dcl (lpid, lips, lmsg) fixed bin; 30 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 31 dcl proc_id char (lpid) based (ppid); 32 dcl ips_name char (lips) based (pips); 33 dcl msg_arg char (lmsg) based (pmsg); 34 dcl hphcs_$ips_wakeup entry (bit (36) aligned, char (*)); 35 dcl hcs_$wakeup entry (bit (36) aligned, fixed bin (71), fixed bin (71), fixed bin (35)); 36 dcl event fixed bin (71) init (0); 37 dcl ev_msg char (8) based (addr (event)); 38 dcl rqargs fixed bin; 39 dcl evaci bit (1) aligned; 40 dcl evchn fixed bin (71); 41 dcl code fixed bin (35); 42 dcl cv_oct_check_ entry (char (*), fixed bin (35)) returns (fixed bin (35)); 43 dcl cu_$arg_count entry (fixed bin); 44 dcl b36 bit (36) aligned; 45 dcl fb35 fixed bin (35); 46 dcl (addr, length, max, min, substr, unspec, verify) builtin; 47 dcl (ioa_, com_err_) entry options (variable); 48 dcl me char (12); 49 dcl i fixed bin; 50 dcl signal_arg char (32) varying; 51 dcl convert_ipc_code_ entry (fixed bin (35)); 52 dcl linkage_error condition; 53 54 me = "send_ips"; 55 rqargs = 2; /* send_ips wants 2 args */ 56 send_common: 57 evaci = "1"b; /* assume message (or ips name) is ascii */ 58 call cu_$arg_count (i); 59 if i ^= rqargs /* if wrong number of arguments */ 60 &^(rqargs = 3 & i = 2) /* (other than omission of the optional 3rd arg to send_wakeup) */ 61 then do; /* print a usage message */ 62 if rqargs = 2 then 63 call com_err_ (0, me, "Usage: send_ips process_id ips_name"); 64 else call com_err_ (0, me, "Usage: send_wakeup process_id event_channel {event_message}"); 65 return; 66 end; 67 68 /* Pick up first 2 args: process id and ips name or event channel */ 69 70 call cu_$arg_ptr (1, ppid, lpid, code); 71 fb35 = cv_oct_check_ (proc_id, code); 72 if code ^= 0 then do; 73 call com_err_ (0, me, """^a"" (process_id) is non-octal (digit ^d)", proc_id, code); 74 return; 75 end; 76 b36 = unspec (fb35); 77 78 call cu_$arg_ptr (2, pips, lips, (0)); 79 signal_arg = ips_name; /* copy the ips name into a temp for printing */ 80 81 /* If send_wakeup entry point, pick up optional event message (arg 3) and convert the event channel (arg 2) */ 82 83 if rqargs = 3 then do; 84 call cu_$arg_ptr (3, pmsg, lmsg, code); /* check for optional event message argument */ 85 if code = 0 then do; /* if argument there, see if it is ASCII or octal */ 86 event = cv_dbl_oct_check (msg_arg, code); /* try octal first */ 87 if code ^= 0 then do; /* not octal; could be ASCII */ 88 if length (msg_arg) > 8 then do; /* but it must be <= 8 chars */ 89 call com_err_ (0, me, """^a"" is an invalid event message (non-octal (digit ^d) and > 8 chars)", 90 msg_arg, code); 91 return; 92 end; 93 ev_msg = msg_arg; /* copy ascii event msg into string overlay of fb(71) event msg */ 94 signal_arg = msg_arg; /* also copy it into temp for printing */ 95 end; 96 else evaci = ""b; /* remember that event message was octal */ 97 end; /* end event message (3rd arg) given */ 98 else evaci = ""b; /* no message was given; we will send octal zeros */ 99 100 evchn = cv_dbl_oct_check (ips_name, code); /* convert event channel (2nd arg) to fixed bin */ 101 if code ^= 0 then do; 102 call com_err_ (0, me, """^a"" (event_channel) is non-octal (digit ^d)", ips_name, code); 103 return; 104 end; 105 end; 106 107 /* Print args, send the signal, and print "sent it" message */ 108 109 call ioa_ ("^a: sending ^[^a^s^;^s^.3b^] to ^.3b^[ (^.3b)^]", 110 me, evaci, signal_arg, unspec (event), unspec (b36), (rqargs = 3), unspec (evchn)); 111 code = 0; 112 if rqargs = 2 then do; 113 on linkage_error begin; 114 call com_err_ (0, me, "Unable to send ips signal; process lacks re access to the hphcs_ gate."); 115 goto RETURN; 116 end; 117 call hphcs_$ips_wakeup (b36, (ips_name)); /* pass by value for allignment */ 118 revert linkage_error; 119 end; 120 else do; 121 call hcs_$wakeup (b36, evchn, event, code); 122 if code ^= 0 then do; 123 call convert_ipc_code_ (code); 124 call com_err_ (code, me, "(from hcs_$wakeup)"); 125 end; 126 end; 127 128 if code = 0 then 129 call ioa_ ("^a: sent it.", me); 130 RETURN: return; 131 132 /* Entry point to send and ipc_ wakeup */ 133 134 send_wakeup: entry; 135 136 me = "send_wakeup"; 137 rqargs = 3; /* this entry point can have 3 arguments */ 138 goto send_common; 139 140 141 cv_dbl_oct_check: proc (dbloct, code) returns (fixed bin (71)); /* to convert a double length (24 digit) octal number */ 142 143 dcl dbloct char (*); 144 dcl code fixed bin (35); 145 dcl fb71 fixed bin (71); 146 dcl fb35 (2) fixed bin (35) based (addr (fb71)); 147 dcl i fixed bin; 148 149 code = verify (dbloct, "01234567"); /* verify that it contains only octal digits */ 150 if code ^= 0 then return (0); 151 152 i = length (dbloct); /* and is no longer than 24 digits */ 153 if i > 24 then do; 154 code = 25; 155 return (0); 156 end; 157 158 fb71 = 0; /* zero the return value */ 159 if i > 12 then /* if more than 12 digits, convert upper half */ 160 fb35 (1) = cv_oct_check_ (substr (dbloct, 1, i-12), code); 161 if code ^= 0 then return (0); 162 fb35 (2) = cv_oct_check_ (substr (dbloct, max (1, i-11), min (i, 12)), code); /* convert lower half */ 163 if code ^= 0 then do; 164 code = code + i - 12; /* say which digit is bad, counting from start of string */ 165 return (0); 166 end; 167 return (fb71); 168 169 end cv_dbl_oct_check; 170 171 end send_ips; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/22/84 1220.5 send_ips.pl1 >special_ldd>on>ips_signal>send_ips.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 46 ref 93 159 162 b36 000121 automatic bit(36) dcl 44 set ref 76* 109 109 117* 121* code parameter fixed bin(35,0) dcl 144 in procedure "cv_dbl_oct_check" set ref 141 149* 150 154* 159* 161 162* 163 164* 164 code 000120 automatic fixed bin(35,0) dcl 41 in procedure "send_ips" set ref 70* 71* 72 73* 84* 85 86* 87 89* 100* 101 102* 111* 121* 122 123* 124* 128 com_err_ 000024 constant entry external dcl 47 ref 62 64 73 89 102 114 124 convert_ipc_code_ 000026 constant entry external dcl 51 ref 123 cu_$arg_count 000020 constant entry external dcl 43 ref 58 cu_$arg_ptr 000010 constant entry external dcl 30 ref 70 78 84 cv_oct_check_ 000016 constant entry external dcl 42 ref 71 159 162 dbloct parameter char unaligned dcl 143 ref 141 149 152 159 159 162 162 ev_msg based char(8) unaligned dcl 37 set ref 93* evaci 000115 automatic bit(1) dcl 39 set ref 56* 96* 98* 109* evchn 000116 automatic fixed bin(71,0) dcl 40 set ref 100* 109 109 121* event 000112 automatic fixed bin(71,0) initial dcl 36 set ref 36* 86* 93 109 109 121* fb35 000122 automatic fixed bin(35,0) dcl 45 in procedure "send_ips" set ref 71* 76 fb35 based fixed bin(35,0) array dcl 146 in procedure "cv_dbl_oct_check" set ref 159* 162* fb71 000154 automatic fixed bin(71,0) dcl 145 set ref 158* 159 162 167 hcs_$wakeup 000014 constant entry external dcl 35 ref 121 hphcs_$ips_wakeup 000012 constant entry external dcl 34 ref 117 i 000156 automatic fixed bin(17,0) dcl 147 in procedure "cv_dbl_oct_check" set ref 152* 153 159 159 159 162 162 162 162 164 i 000126 automatic fixed bin(17,0) dcl 49 in procedure "send_ips" set ref 58* 59 59 ioa_ 000022 constant entry external dcl 47 ref 109 128 ips_name based char unaligned dcl 32 set ref 79 100* 102* 117 length builtin function dcl 46 ref 88 152 linkage_error 000140 stack reference condition dcl 52 ref 113 118 lips 000107 automatic fixed bin(17,0) dcl 29 set ref 78* 79 100 100 102 102 117 lmsg 000110 automatic fixed bin(17,0) dcl 29 set ref 84* 86 86 88 89 89 93 94 lpid 000106 automatic fixed bin(17,0) dcl 29 set ref 70* 71 71 73 73 max builtin function dcl 46 ref 162 162 me 000123 automatic char(12) unaligned dcl 48 set ref 54* 62* 64* 73* 89* 102* 109* 114* 124* 128* 136* min builtin function dcl 46 ref 162 162 msg_arg based char unaligned dcl 33 set ref 86* 88 89* 93 94 pips 000102 automatic pointer dcl 28 set ref 78* 79 100 102 117 pmsg 000104 automatic pointer dcl 28 set ref 84* 86 88 89 93 94 ppid 000100 automatic pointer dcl 28 set ref 70* 71 73 proc_id based char unaligned dcl 31 set ref 71* 73* rqargs 000114 automatic fixed bin(17,0) dcl 38 set ref 55* 59 59 62 83 109 112 137* signal_arg 000127 automatic varying char(32) dcl 50 set ref 79* 94* 109* substr builtin function dcl 46 ref 159 159 162 162 unspec builtin function dcl 46 ref 76 109 109 109 109 109 109 verify builtin function dcl 46 ref 149 NAMES DECLARED BY EXPLICIT CONTEXT. RETURN 001173 constant label dcl 130 ref 115 cv_dbl_oct_check 001211 constant entry internal dcl 141 ref 86 100 send_common 000230 constant label dcl 56 ref 138 send_ips 000215 constant entry external dcl 26 send_wakeup 001175 constant entry external dcl 134 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1732 1762 1603 1742 Length 2150 1603 30 151 126 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME send_ips 260 external procedure is an external procedure. on unit on line 113 98 on unit cv_dbl_oct_check internal procedure shares stack frame of external procedure send_ips. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME send_ips 000100 ppid send_ips 000102 pips send_ips 000104 pmsg send_ips 000106 lpid send_ips 000107 lips send_ips 000110 lmsg send_ips 000112 event send_ips 000114 rqargs send_ips 000115 evaci send_ips 000116 evchn send_ips 000120 code send_ips 000121 b36 send_ips 000122 fb35 send_ips 000123 me send_ips 000126 i send_ips 000127 signal_arg send_ips 000154 fb71 cv_dbl_oct_check 000156 i cv_dbl_oct_check THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_cs call_ext_out_desc call_ext_out return tra_ext enable shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ convert_ipc_code_ cu_$arg_count cu_$arg_ptr cv_oct_check_ hcs_$wakeup hphcs_$ips_wakeup ioa_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 36 000210 26 000214 54 000223 55 000226 56 000230 58 000232 59 000241 62 000252 64 000303 65 000330 70 000331 71 000350 72 000373 73 000375 74 000435 76 000436 78 000440 79 000460 83 000471 84 000474 85 000513 86 000515 87 000540 88 000542 89 000545 91 000604 93 000605 94 000611 95 000620 96 000621 97 000622 98 000623 100 000624 101 000647 102 000651 103 000711 109 000712 111 000772 112 000773 113 000776 114 001012 115 001037 117 001042 118 001067 119 001071 121 001072 122 001107 123 001111 124 001120 128 001147 130 001173 134 001174 136 001203 137 001206 138 001210 141 001211 149 001222 150 001236 152 001242 153 001244 154 001246 155 001250 158 001253 159 001255 161 001310 162 001317 163 001362 164 001366 165 001375 167 001400 ----------------------------------------------------------- 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