COMPILATION LISTING OF SEGMENT asum_find_segment_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/08/85 1141.5 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1985 * 4* * * 5* *********************************************************** */ 6 /* asum_find_segment_ -- per-process finder of existing segments. 7* assumes that asum_data_$system_info_ptr is set. 8* tolerates asum_data_$process_info_ptr = null (); 9**/ 10 11 /* format: style5,indcomtxt */ 12 13 /**** Written 1985-02-20 by BIM */ 14 15 asum_find_segment_: 16 procedure (P_segment_index, P_segment_ptr); 17 18 declare P_segment_index fixed bin; /* Which segment do we create ? */ 19 declare P_segment_ptr pointer; 20 21 dcl null builtin; 22 dcl string builtin; 23 1 1 /* *********************************************************** 1 2* * * 1 3* * Copyright, (C) Honeywell Information Systems Inc., 1985 * 1 4* * * 1 5* *********************************************************** */ 1 6 /* Begin include file asum_data_.incl.pl1 */ 1 7 /* Definitions in asum_data_ (as_user_message_data_) BIM 1985-01-17 */ 1 8 /* format: style3 */ 1 9 1 10 declare asum_data_$acl_entries 1 11 bit (36) aligned ext; /* base acl array here */ 1 12 declare asum_data_$db_dir char (168) ext; 1 13 declare asum_data_$db_multiclass 1 14 bit (1) aligned ext; 1 15 declare asum_data_$n_acl_entries 1 16 fixed bin ext; 1 17 declare asum_data_$db_cbi bit (36) aligned ext; /* No need to declare the whole structure here */ 1 18 declare asum_data_$db_dir_cbi 1 19 bit (36) aligned ext; /* No need to declare the whole structure here */ 1 20 declare asum_data_$db_dir_rb 1 21 (2) fixed bin (3) ext; 1 22 declare asum_data_$db_rb (3) fixed bin (3) ext; 1 23 declare asum_data_$db_locked 1 24 bit (1) aligned ext; 1 25 declare asum_data_$process_info_ptr 1 26 pointer static ext; 1 27 declare asum_data_$system_info_ptr 1 28 pointer static ext; 1 29 declare asum_data_$entry_ring 1 30 fixed bin (3) static ext; 1 31 declare asum_data_$lock_id bit (36) aligned ext; 1 32 declare asum_data_$process_id 1 33 bit (36) aligned ext; 1 34 1 35 /* End include file asum_data_.incl.pl1 */ 24 2 1 /* Begin include file as_user_message_system.incl.pl1 BIM 1985-01-11 */ 2 2 /* format: style4 */ 2 3 2 4 /**** Per-system and per-user information on the as_user_message segments */ 2 5 2 6 /**** Declaration used to construct the name of one of the set of segments */ 2 7 2 8 declare 1 as_user_message_segment_name unaligned, 2 9 2 constant char (16), /* as_user_message_ */ 2 10 2 index picture "99"; 2 11 2 12 declare AS_USER_MESSAGE_SEGMENT_NAME_CONSTANT char (16) init ("as_user_message_") int static options (constant); 2 13 2 14 /**** as_user_messages (mis)-use the pad bits in a message segment 2 15* message ID to identify which of one of a series of segments 2 16* to find the message in. */ 2 17 2 18 declare 1 as_user_message_id aligned, /* use UNSPEC, not based (addr) */ 2 19 2 segment_index fixed bin (9) unsigned unaligned, 2 20 2 pad bit (11) unaligned, 2 21 2 pad_clock bit (52) unaligned; 2 22 2 23 /**** Data stored in the as_user_message_system segment. 2 24* This is the shared overhead database, including the 2 25* associative memory of messages and destination processes. */ 2 26 2 27 declare AS_USER_MESSAGE_SYSTEM_NAME char (32) init ("as_user_message_system") int static options (constant); 2 28 2 29 declare as_user_message_system_info_ptr pointer; 2 30 declare 1 as_user_message_system_info aligned based (as_user_message_system_info_ptr), 2 31 2 header aligned, 2 32 3 sentinel char (8) aligned, /* Version, but mostly validity check */ 2 33 3 time_of_bootload fixed bin (71), /* was this segment initialized in this bootload? */ 2 34 3 lock bit (36) aligned, /* on segment creation/deletion */ 2 35 3 n_segments fixed bin, /* total created */ 2 36 2 37 3 highest_in_use fixed bin (35), /* update with stacq */ 2 38 2 pad (9) bit (36) aligned, 2 39 2 destination_am (16000) aligned, /* each entry is 16 words. Listen UP, compiler */ 2 40 3 process_id bit (36) aligned, 2 41 3 ring fixed bin (3) unsigned unaligned, 2 42 3 reader_deletes bit (1) unaligned, 2 43 3 pad bit (32) unaligned, 2 44 3 handle bit (72) aligned, 2 45 3 message_id bit (72) aligned, 2 46 3 group_id char (32) unaligned, 2 47 3 access_class bit (72) aligned; 2 48 2 49 declare AS_USER_ANY_PROCESS_ID bit (36) aligned init ("777777777777"b3) int static options (constant); 2 50 2 51 2 52 /**** + To look for a message, do the following: 2 53* initialize the message_id to 72 1's. 2 54* loop on the process_id_list, setting px as index; 2 55* if the process_id (px) is ANY_PROCESS_ID or the target process id then do; 2 56* if handle_list (px) is the desired handle then do; 2 57* if the process_id match was exact then 2 58* message_id = min (message_id, message_id (px)); 2 59* otherwise do; 2 60* read out the mesage for message_id (px), 2 61* determine if it is really for target_process. If so, 2 62* message_id = min (message_id, message_id (px)); 2 63* end; 2 64* end; 2 65* end; 2 66* 2 67* If message_id = 72 1's, then there is no message destined for this handle 2 68* for this process. 2 69* 2 70* Otherwise, message_id is the id of the first message for this handle. 2 71**/ 2 72 2 73 declare AS_USER_MESSAGE_SYSTEM_SENTINEL char (8) aligned init ("asumsys1") int static options (constant); 2 74 2 75 /**** Data for each user process */ 2 76 2 77 /**** *system variable to find this stuff with */ 2 78 2 79 declare as_user_message_perprocess_info_ptr pointer; 2 80 2 81 declare 1 as_user_message_perprocess_info aligned based (as_user_message_perprocess_info_ptr), 2 82 2 sentinel char (8) aligned, 2 83 2 mseg_ptr (0:99) pointer options (packed); /* for mseg_ */ 2 84 2 85 declare AS_USER_MESSAGE_PROCESS_SENTINEL char (8) aligned init ("asumprc1") int static options (constant); 2 86 2 87 /* End include file as_user_message_system.incl.pl1 */ 25 3 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 3 2* 3 3* Values for the "access mode" argument so often used in hardcore 3 4* James R. Davis 26 Jan 81 MCR 4844 3 5* Added constants for SM access 4/28/82 Jay Pattin 3 6* Added text strings 03/19/85 Chris Jones 3 7**/ 3 8 3 9 3 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 3 11 dcl ( 3 12 N_ACCESS init ("000"b), 3 13 R_ACCESS init ("100"b), 3 14 E_ACCESS init ("010"b), 3 15 W_ACCESS init ("001"b), 3 16 RE_ACCESS init ("110"b), 3 17 REW_ACCESS init ("111"b), 3 18 RW_ACCESS init ("101"b), 3 19 S_ACCESS init ("100"b), 3 20 M_ACCESS init ("010"b), 3 21 A_ACCESS init ("001"b), 3 22 SA_ACCESS init ("101"b), 3 23 SM_ACCESS init ("110"b), 3 24 SMA_ACCESS init ("111"b) 3 25 ) bit (3) internal static options (constant); 3 26 3 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 3 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 3 29 3 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 3 31 static options (constant); 3 32 3 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 3 34 static options (constant); 3 35 3 36 dcl ( 3 37 N_ACCESS_BIN init (00000b), 3 38 R_ACCESS_BIN init (01000b), 3 39 E_ACCESS_BIN init (00100b), 3 40 W_ACCESS_BIN init (00010b), 3 41 RW_ACCESS_BIN init (01010b), 3 42 RE_ACCESS_BIN init (01100b), 3 43 REW_ACCESS_BIN init (01110b), 3 44 S_ACCESS_BIN init (01000b), 3 45 M_ACCESS_BIN init (00010b), 3 46 A_ACCESS_BIN init (00001b), 3 47 SA_ACCESS_BIN init (01001b), 3 48 SM_ACCESS_BIN init (01010b), 3 49 SMA_ACCESS_BIN init (01011b) 3 50 ) fixed bin (5) internal static options (constant); 3 51 3 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 26 27 28 29 declare code fixed bin (35); 30 declare segment_entryname char (32); 31 declare seg_ptr pointer; 32 declare first bit (1) aligned; 33 34 declare asum_error_ entry options (variable); 35 /* signals a condition, unwinding */ 36 37 declare initiate_file_ entry (character (*), character (*), 38 bit (*), pointer, fixed binary (24), 39 fixed binary (35)); 40 declare pathname_ entry (character (*), character (*)) 41 returns (character (168)); 42 43 44 first = "0"b; 45 go to COMMON; 46 47 first: 48 entry; 49 first = "1"b; 50 COMMON: 51 as_user_message_perprocess_info_ptr = asum_data_$process_info_ptr; 52 as_user_message_system_info_ptr = asum_data_$system_info_ptr; 53 54 if ^first then 55 do; 56 as_user_message_segment_name.constant = 57 AS_USER_MESSAGE_SEGMENT_NAME_CONSTANT; 58 as_user_message_segment_name.index = P_segment_index; 59 60 segment_entryname = string (as_user_message_segment_name); 61 end; 62 else 63 segment_entryname = AS_USER_MESSAGE_SYSTEM_NAME; 64 65 seg_ptr = null (); 66 if ^first then 67 if asum_data_$process_info_ptr ^= null () then 68 call look_in_perprocess_info; 69 70 if seg_ptr = null () then 71 do; 72 call initiate_file_ (asum_data_$db_dir, segment_entryname, 73 RW_ACCESS, seg_ptr, (0), code); 74 if code ^= 0 then 75 if ^first then 76 call asum_error_ (code, "asum_find_segment_", 77 "Missing segment index ^d", P_segment_index) 78 ; 79 else 80 call asum_error_ (code, "asum_find_segment_", 81 "Missing as_user_message_system_data"); 82 if asum_data_$process_info_ptr ^= null () then 83 if ^first then 84 as_user_message_perprocess_info 85 .mseg_ptr (P_segment_index) = seg_ptr; 86 else 87 asum_data_$system_info_ptr = seg_ptr; 88 89 end; 90 91 if ^first then 92 P_segment_ptr = seg_ptr; 93 return; 94 95 look_in_perprocess_info: 96 procedure; 97 98 if as_user_message_perprocess_info.mseg_ptr (P_segment_index) ^= null () 99 then 100 seg_ptr = 101 as_user_message_perprocess_info.mseg_ptr (P_segment_index); 102 return; 103 104 end look_in_perprocess_info; 105 106 end asum_find_segment_; 107 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/08/85 1128.1 asum_find_segment_.pl1 >spec>on>41-15>asum_find_segment_.pl1 24 1 03/19/85 1613.7 asum_data_.incl.pl1 >ldd>include>asum_data_.incl.pl1 25 2 03/08/85 0852.5 as_user_message_system.incl.pl1 >ldd>include>as_user_message_system.incl.pl1 26 3 04/08/85 1113.3 access_mode_values.incl.pl1 >spec>on>41-15>access_mode_values.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. AS_USER_MESSAGE_SEGMENT_NAME_CONSTANT 000011 constant char(16) initial unaligned dcl 2-12 ref 56 AS_USER_MESSAGE_SYSTEM_NAME 000001 constant char(32) initial unaligned dcl 2-27 ref 62 P_segment_index parameter fixed bin(17,0) dcl 18 set ref 15 58 74* 82 98 98 P_segment_ptr parameter pointer dcl 19 set ref 15 91* RW_ACCESS 000000 constant bit(3) initial unaligned dcl 3-11 set ref 72* as_user_message_perprocess_info based structure level 1 dcl 2-81 as_user_message_perprocess_info_ptr 000110 automatic pointer dcl 2-79 set ref 50* 82 98 98 as_user_message_segment_name 000100 automatic structure level 1 packed unaligned dcl 2-8 set ref 60 as_user_message_system_info_ptr 000106 automatic pointer dcl 2-29 set ref 52* asum_data_$db_dir 000010 external static char(168) unaligned dcl 1-12 set ref 72* asum_data_$process_info_ptr 000012 external static pointer dcl 1-25 ref 50 66 82 asum_data_$system_info_ptr 000014 external static pointer dcl 1-27 set ref 52 86* asum_error_ 000016 constant entry external dcl 34 ref 74 79 code 000112 automatic fixed bin(35,0) dcl 29 set ref 72* 74 74* 79* constant 000100 automatic char(16) level 2 packed unaligned dcl 2-8 set ref 56* first 000126 automatic bit(1) dcl 32 set ref 44* 49* 54 66 74 82 91 index 4 000100 automatic picture(2) level 2 packed unaligned dcl 2-8 set ref 58* initiate_file_ 000020 constant entry external dcl 37 ref 72 mseg_ptr 2 based pointer array level 2 dcl 2-81 set ref 82* 98 98 null builtin function dcl 21 ref 65 66 70 82 98 seg_ptr 000124 automatic pointer dcl 31 set ref 65* 70 72* 82 86 91 98* segment_entryname 000113 automatic char(32) unaligned dcl 30 set ref 60* 62* 72* string builtin function dcl 22 ref 60 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. AS_USER_ANY_PROCESS_ID internal static bit(36) initial dcl 2-49 AS_USER_MESSAGE_PROCESS_SENTINEL internal static char(8) initial dcl 2-85 AS_USER_MESSAGE_SYSTEM_SENTINEL internal static char(8) initial dcl 2-73 A_ACCESS internal static bit(3) initial unaligned dcl 3-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 3-33 E_ACCESS internal static bit(3) initial unaligned dcl 3-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 M_ACCESS internal static bit(3) initial unaligned dcl 3-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 N_ACCESS internal static bit(3) initial unaligned dcl 3-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 REW_ACCESS internal static bit(3) initial unaligned dcl 3-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 RE_ACCESS internal static bit(3) initial unaligned dcl 3-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 R_ACCESS internal static bit(3) initial unaligned dcl 3-11 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 SA_ACCESS internal static bit(3) initial unaligned dcl 3-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 3-30 SMA_ACCESS internal static bit(3) initial unaligned dcl 3-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 SM_ACCESS internal static bit(3) initial unaligned dcl 3-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 S_ACCESS internal static bit(3) initial unaligned dcl 3-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 W_ACCESS internal static bit(3) initial unaligned dcl 3-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 3-36 as_user_message_id automatic structure level 1 dcl 2-18 as_user_message_system_info based structure level 1 dcl 2-30 asum_data_$acl_entries external static bit(36) dcl 1-10 asum_data_$db_cbi external static bit(36) dcl 1-17 asum_data_$db_dir_cbi external static bit(36) dcl 1-18 asum_data_$db_dir_rb external static fixed bin(3,0) array dcl 1-20 asum_data_$db_locked external static bit(1) dcl 1-23 asum_data_$db_multiclass external static bit(1) dcl 1-13 asum_data_$db_rb external static fixed bin(3,0) array dcl 1-22 asum_data_$entry_ring external static fixed bin(3,0) dcl 1-29 asum_data_$lock_id external static bit(36) dcl 1-31 asum_data_$n_acl_entries external static fixed bin(17,0) dcl 1-15 asum_data_$process_id external static bit(36) dcl 1-32 pathname_ 000000 constant entry external dcl 40 NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 000101 constant label dcl 50 ref 45 asum_find_segment_ 000062 constant entry external dcl 15 first 000072 constant entry external dcl 47 look_in_perprocess_info 000341 constant entry internal dcl 95 ref 66 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 454 476 355 464 Length 726 355 22 214 77 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME asum_find_segment_ 146 external procedure is an external procedure. look_in_perprocess_info internal procedure shares stack frame of external procedure asum_find_segment_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME asum_find_segment_ 000100 as_user_message_segment_name asum_find_segment_ 000106 as_user_message_system_info_ptr asum_find_segment_ 000110 as_user_message_perprocess_info_ptr asum_find_segment_ 000112 code asum_find_segment_ 000113 segment_entryname asum_find_segment_ 000124 seg_ptr asum_find_segment_ 000126 first asum_find_segment_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. asum_error_ initiate_file_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. asum_data_$db_dir asum_data_$process_info_ptr asum_data_$system_info_ptr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 15 000056 44 000067 45 000070 47 000071 49 000077 50 000101 52 000105 54 000110 56 000114 58 000122 60 000134 61 000137 62 000140 65 000143 66 000145 70 000154 72 000160 74 000216 79 000262 82 000314 86 000331 91 000333 93 000340 95 000341 98 000342 102 000352 ----------------------------------------------------------- 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