COMPILATION LISTING OF SEGMENT memo_process_memos_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 09/11/86 1500.0 mst Thu 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 12 13 /****^ HISTORY COMMENTS: 14* 1) change(86-07-15,Rauschelbach), approve(86-07-15,MCR7472), 15* audit(86-08-05,GJohnson), install(86-08-08,MR12.0-1122): 16* Changed to pass have_write_access back to memo. 17* 2) change(86-08-25,Lippard), approve(86-07-15,PBF7472), 18* audit(86-09-10,GWMay), install(86-09-11,MR12.0-1152): 19* Changed to use have_write_access as an *input* argument. 20* END HISTORY COMMENTS */ 21 22 23 memo_process_memos_: proc (P_msp, P_select_bits, P_memo_time_now, P_have_write_access); 24 25 /* * This procedure is invoked both by a command invocation of memo (with no explicitly 26* * specified options) and by the alarm timer, to print, execute, reschedule, etc. 27* * 28* * June, 1979, W. Olin Sibert 29* */ 30 31 dcl (P_msp pointer, 32 P_select_bits (*) bit (1) unaligned, 33 P_memo_time_now fixed bin (35), 34 P_have_write_access bit (1) aligned) parameter; 35 36 dcl idx fixed bin; 37 dcl iocb pointer; 38 dcl temp fixed bin; 39 dcl code fixed bin (35); 40 dcl have_write_access bit (1) aligned; 41 dcl expires_sw bit (1) aligned; 42 dcl complain_about_write_access bit (1) aligned; 43 44 dcl iox_$user_io pointer external static; 45 dcl iox_$user_output pointer external static; 46 47 dcl com_err_ entry options (variable); 48 dcl cu_$cp entry (pointer, fixed bin (21), fixed bin (35)); 49 dcl ioa_$ioa_switch entry options (variable); 50 dcl memo_delete_ entry (pointer, fixed bin, bit (1) aligned); 51 dcl memo_repeat_ entry (pointer, fixed bin, fixed bin (35), fixed bin (35)) returns (fixed bin); 52 53 dcl WHOAMI char (32) internal static options (constant) init ("memo"); 54 55 dcl (addr, length, rtrim) builtin; 56 57 /* */ 58 59 memo_segment_ptr = P_msp; 60 have_write_access = P_have_write_access; 61 62 complain_about_write_access = "1"b; 63 64 do idx = 1 to memo_segment.max_number_used; 65 if P_select_bits (idx) = "1"b then do; /* this one is selected */ 66 expires_sw = "0"b; 67 68 if memo_entry (idx).flags.expires then do; /* is this one supposed to expire? */ 69 if memo_entry (idx).time + memo_entry (idx).exp_delta < P_memo_time_now then do; 70 expires_sw = "1"b; /* its time has come -- set it up to expire, and */ 71 goto SKIP_PROCESSING; /* go to the code to reschedule/delete it */ 72 end; 73 end; 74 75 if memo_entry (idx).flags.single then /* this one gets processed once, and then expires */ 76 expires_sw = "1"b; /* just let it fall through and die */ 77 78 if memo_entry (idx).flags.execute then do; /* call the command processor */ 79 call cu_$cp (addr (memo_entry (idx).data), length (rtrim (memo_entry (idx).data)), code); 80 81 if code ^= 0 then do; /* explain what happened */ 82 call com_err_ (0, WHOAMI, "Command processor was invoked by ^[alarm ^]memo ^d:^/^3x^a", 83 memo_entry (idx).flags.alarm, idx, memo_entry (idx).data); 84 85 if memo_entry (idx).flags.repeatsw then /* and warn about this */ 86 call com_err_ (0, WHOAMI, "This memo will not be rescheduled."); 87 88 if have_write_access then /* avoid faults */ 89 memo_entry (idx).flags.repeatsw = "0"b; 90 end; /* of case for command processor error */ 91 end; /* of case for call memos */ 92 93 else do; 94 if memo_entry (idx).flags.alarm then 95 iocb = iox_$user_io; 96 else iocb = iox_$user_output; 97 98 call ioa_$ioa_switch (iocb, "^[memo: (^d)^;^3d)^]^2x^a", 99 memo_entry (idx).flags.alarm, idx, memo_entry (idx).data); 100 end; 101 102 SKIP_PROCESSING: /* old memos come here to die (or get rescheduled) */ 103 if memo_entry (idx).repeatsw then do; /* repeat it, if necessary */ 104 if have_write_access then temp = memo_repeat_ 105 (memo_segment_ptr, idx, P_memo_time_now, (0)); 106 else if complain_about_write_access then do; 107 call com_err_ (0, WHOAMI, 108 "No write access on memo segment. Cannot reschedule repeating memo ^d.", idx); 109 complain_about_write_access = "0"b; 110 end; 111 end; 112 113 if memo_entry (idx).flags.alarm & ^memo_entry (idx).flags.remains then 114 expires_sw = "1"b; /* non remaining alarm memos expire here, as well */ 115 116 if memo_entry (idx).flags.remains then do; /* turn off some bits here, if we can */ 117 if memo_entry (idx).flags.alarm | memo_entry (idx).flags.repeatsw then do; 118 if have_write_access then do; 119 memo_entry (idx).flags.alarm = "0"b; 120 memo_entry (idx).flags.repeatsw = "0"b; 121 end; 122 123 else if complain_about_write_access then do; 124 call com_err_ (0, WHOAMI, 125 "No write access on memo segment. Cannot process ""remain"" memo ^d.", idx); 126 complain_about_write_access = "0"b; 127 end; 128 end; 129 end; /* of processing for "remain" type memos */ 130 131 if expires_sw then do; 132 if have_write_access then 133 call memo_delete_ (memo_segment_ptr, idx, "1"b); 134 else if complain_about_write_access then do; 135 call com_err_ (0, WHOAMI, 136 "No write access on memo segment. Cannot delete alarm memo ^d.", idx); 137 complain_about_write_access = "0"b; 138 end; 139 end; 140 end; /* of case for selected memo */ 141 end; /* of loop through memos */ 142 143 return; 144 /* BEGIN INCLUDE FILE ... memo_segment.incl.pl1 ... July, 1979 ... W. Olin Sibert */ 1 2 /* * This include file describes a memo segment. Presently, this structure is still 1 3* * compatible with "old" version 3 memo segments, although it uses more of the pad 1 4* * fields; hence, it is still identified as version 3. If the conversion to version 1 5* * 4 memo segments is ever done, this will have to be changed for version 4. 1 6* */ 1 7 1 8 dcl memo_segment_ptr pointer; 1 9 1 10 dcl MAX_NUMBER_MEMOS fixed bin internal static options (constant) init (5802); 1 11 /* max number of memos in a memo segment */ 1 12 1 13 dcl MEMO_SEGMENT_VERSION_3 fixed bin internal static options (constant) init (3); 1 14 1 15 dcl 1 memo_segment aligned based (memo_segment_ptr), /* current version of whole segment */ 1 16 2 header like memo_segment_header, 1 17 2 memo_entry (MAX_NUMBER_MEMOS) like memo_segment_entry; 1 18 1 19 dcl 1 memo_segment_header aligned based, /* header for memo segment */ 1 20 2 version fixed bin (35), /* presently 3 */ 1 21 2 max_number_used fixed bin (35); /* The highest entry known to be used */ 1 22 1 23 dcl 1 memo_segment_entry aligned based, /* the entry for a single memo */ 1 24 2 taken bit (36) aligned, /* Zero if this entry free */ 1 25 2 flags aligned, /* data about this memo */ 1 26 3 print bit (1) unaligned, /* normal type memo */ 1 27 3 alarm bit (1) unaligned, /* alarm type */ 1 28 3 execute bit (1) unaligned, /* execute type */ 1 29 3 repeatsw bit (1) unaligned, /* has repeat string */ 1 30 3 expires bit (1) unaligned, /* has expiration time */ 1 31 3 remains bit (1) unaligned, /* do not delete this memo when its alarm goes off */ 1 32 3 single bit (1) unaligned, /* delete this non-alarm memo after one printing or execution */ 1 33 3 per_process bit (1) unaligned, /* causes repeat to be done from time_now, not maturity */ 1 34 3 pad1 bit (28) unaligned, /* not used */ 1 35 2 exp_delta fixed bin (35), /* delta time before memo expires */ 1 36 2 time fixed bin (35), /* time this memo matures */ 1 37 2 data char (132) aligned, /* the memo message */ 1 38 2 repeat char (32) aligned; /* the repeat string */ 1 39 1 40 /* END INCLUDE FILE memo_segment.incl.pl1 */ 144 145 146 end; /* external procedure memo_process_memos_ */ SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/11/86 1500.0 memo_process_memos_.pl1 >spec>install>1152>memo_process_memos_.pl1 144 1 08/18/81 1510.4 memo_segment.incl.pl1 >ldd>include>memo_segment.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. P_have_write_access parameter bit(1) dcl 31 ref 23 60 P_memo_time_now parameter fixed bin(35,0) dcl 31 set ref 23 69 104* P_msp parameter pointer dcl 31 ref 23 59 P_select_bits parameter bit(1) array unaligned dcl 31 ref 23 65 WHOAMI 000000 constant char(32) initial unaligned dcl 53 set ref 82* 85* 107* 124* 135* addr builtin function dcl 55 ref 79 79 alarm 3(01) based bit(1) array level 4 packed unaligned dcl 1-15 set ref 82* 94 98* 113 117 119* code 000105 automatic fixed bin(35,0) dcl 39 set ref 79* 81 com_err_ 000014 constant entry external dcl 47 ref 82 85 107 124 135 complain_about_write_access 000110 automatic bit(1) dcl 42 set ref 62* 106 109* 123 126* 134 137* cu_$cp 000016 constant entry external dcl 48 ref 79 data 6 based char(132) array level 3 dcl 1-15 set ref 79 79 79 79 82* 98* execute 3(02) based bit(1) array level 4 packed unaligned dcl 1-15 ref 78 exp_delta 4 based fixed bin(35,0) array level 3 dcl 1-15 ref 69 expires 3(04) based bit(1) array level 4 packed unaligned dcl 1-15 ref 68 expires_sw 000107 automatic bit(1) dcl 41 set ref 66* 70* 75* 113* 131 flags 3 based structure array level 3 dcl 1-15 have_write_access 000106 automatic bit(1) dcl 40 set ref 60* 88 104 118 132 header based structure level 2 dcl 1-15 idx 000100 automatic fixed bin(17,0) dcl 36 set ref 64* 65 68 69 69 75 78 79 79 79 79 82 82* 82 85 88 94 98 98* 98 102 104* 107* 113 113 116 117 117 119 120 124* 132* 135* ioa_$ioa_switch 000020 constant entry external dcl 49 ref 98 iocb 000102 automatic pointer dcl 37 set ref 94* 96* 98* iox_$user_io 000010 external static pointer dcl 44 ref 94 iox_$user_output 000012 external static pointer dcl 45 ref 96 length builtin function dcl 55 ref 79 79 max_number_used 1 based fixed bin(35,0) level 3 dcl 1-15 ref 64 memo_delete_ 000022 constant entry external dcl 50 ref 132 memo_entry 2 based structure array level 2 dcl 1-15 memo_repeat_ 000024 constant entry external dcl 51 ref 104 memo_segment based structure level 1 dcl 1-15 memo_segment_entry based structure level 1 dcl 1-23 memo_segment_header based structure level 1 dcl 1-19 memo_segment_ptr 000112 automatic pointer dcl 1-8 set ref 59* 64 68 69 69 75 78 79 79 79 79 82 82 85 88 94 98 98 102 104* 113 113 116 117 117 119 120 132* remains 3(05) based bit(1) array level 4 packed unaligned dcl 1-15 ref 113 116 repeatsw 3(03) based bit(1) array level 4 packed unaligned dcl 1-15 set ref 85 88* 102 117 120* rtrim builtin function dcl 55 ref 79 79 single 3(06) based bit(1) array level 4 packed unaligned dcl 1-15 ref 75 temp 000104 automatic fixed bin(17,0) dcl 38 set ref 104* time 5 based fixed bin(35,0) array level 3 dcl 1-15 ref 69 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. MAX_NUMBER_MEMOS internal static fixed bin(17,0) initial dcl 1-10 MEMO_SEGMENT_VERSION_3 internal static fixed bin(17,0) initial dcl 1-13 NAMES DECLARED BY EXPLICIT CONTEXT. SKIP_PROCESSING 000510 constant label dcl 102 ref 71 memo_process_memos_ 000161 constant entry external dcl 23 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1066 1114 761 1076 Length 1310 761 26 157 104 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME memo_process_memos_ 152 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME memo_process_memos_ 000100 idx memo_process_memos_ 000102 iocb memo_process_memos_ 000104 temp memo_process_memos_ 000105 code memo_process_memos_ 000106 have_write_access memo_process_memos_ 000107 expires_sw memo_process_memos_ 000110 complain_about_write_access memo_process_memos_ 000112 memo_segment_ptr memo_process_memos_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$cp ioa_$ioa_switch memo_delete_ memo_repeat_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. iox_$user_io iox_$user_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 23 000154 59 000166 60 000172 62 000175 64 000177 65 000207 66 000225 68 000226 69 000235 70 000246 71 000250 75 000251 78 000257 79 000262 81 000315 82 000317 85 000370 88 000424 91 000432 94 000433 96 000443 98 000447 102 000510 104 000516 106 000542 107 000544 109 000575 113 000576 116 000621 117 000623 118 000632 119 000634 120 000636 121 000640 123 000641 124 000643 126 000674 131 000675 132 000677 134 000717 135 000721 137 000752 141 000753 143 000755 ----------------------------------------------------------- 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