COMPILATION LISTING OF SEGMENT vrm_lock_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1015.2 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(86-06-05,GJohnson), approve(86-06-05,MCR7387), 17* audit(86-06-10,Martinson), install(86-07-11,MR12.0-1091): 18* Correct error message documentation. 19* END HISTORY COMMENTS */ 20 21 22 /* VRM_LOCK_: Entries which handle logical volume registration lock */ 23 24 /* Created 07/31/84 by EJ Sharpe - actually pirated mdc_lock_ */ 25 /* Modified 84-11-01 by EJ Sharpe for some minor fixes */ 26 27 vrm_lock_: proc; 28 29 /* Parameters */ 30 31 dcl arg_code fixed bin (35); 32 33 /* Automatic */ 34 35 dcl code fixed bin (35); 36 dcl vl fixed bin; /* Validation level */ 37 dcl vrm_data_rings (3) fixed bin (3); 38 39 /* Static */ 40 41 dcl saved_data_ptr ptr int static init (null); 42 dcl test_mode bit (1) int static init ("0"b); /* For debugging */ 43 44 /* Constants */ 45 46 dcl vrm_data_dir char (32) int static options (constant) init (">system_library_1"); 47 dcl vrm_data_ename char (32) int static options (constant) init ("vrm_data"); 48 49 1 1 /* Begin include file ..... vrm_data.incl.pl1 */ 1 2 1 3 /* Declaration of vrm_data segment, containing vrm lock */ 1 4 /* Created 07/27/84 by EJ Sharpe by copying mdc_data.incl.pl1 and 1 5* changing every occurance of "mdc" with "vrm" 1 6**/ 1 7 1 8 dcl vrm_datap ptr; 1 9 1 10 dcl 1 vrm_data aligned based (vrm_datap), 1 11 2 lock bit (36), /* The actual lock */ 1 12 2 lock_cnt fixed bin (35), /* Meter of times locked */ 1 13 2 unlock_cnt fixed bin (35), /* Meter of times unlocked */ 1 14 2 fill fixed bin (35), 1 15 2 time_locked fixed bin (71), /* Time last locked */ 1 16 2 time_spent_locked fixed bin (71), /* Total time lock was locked */ 1 17 2 locker_name char (32); /* Name of process locking lock */ 1 18 1 19 /* End include file ..... vrm_data.incl.pl1 */ 50 51 52 53 /* External stuff */ 54 55 dcl admin_gate_$syserr_error_code entry () options (variable); 56 dcl clock_ entry returns (fixed bin (52)); 57 dcl cu_$level_get entry (fixed bin); 58 dcl cu_$level_set entry (fixed bin); 59 dcl get_group_id_ entry returns (char (32)); 60 dcl get_lock_id_ entry returns (bit (36)); 61 dcl get_ring_ entry returns (fixed bin); 62 dcl hcs_$initiate entry (char (*), char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 63 dcl hcs_$truncate_file entry (char (*), char (*), fixed bin (19), fixed bin (35)); 64 dcl hcs_$append_branchx entry (char (*), char (*), fixed bin (5), dim (3) fixed bin (3), char (*), fixed bin (1), 65 fixed bin (1), fixed bin (24), fixed bin (35)); 66 dcl admin_gate_$reclassify_sys_seg entry (char (*), char (*), bit (72) aligned, fixed bin (35)); 67 dcl set_lock_$lock entry (bit (36) aligned, fixed bin, fixed bin (35)); 68 dcl set_lock_$unlock entry (bit (36) aligned, fixed bin (35)); 69 70 dcl error_table_$invalid_lock_reset ext fixed bin (35); 71 dcl error_table_$namedup ext fixed bin (35); 72 73 dcl sys_info$access_class_ceiling bit (72) aligned external; 74 75 dcl (null) builtin; 76 77 /* Entries to handle the lock */ 78 79 lock: entry (arg_code); 80 81 if test_mode then do; 82 arg_code = 0; 83 return; 84 end; 85 call find_vrm_data; /* Get pointer */ 86 call set_lock_$lock (vrm_data.lock, 30, code); 87 if code = 0 then go to locked; /* Locked ok */ 88 if code = error_table_$invalid_lock_reset then do; /* Recoverable error */ 89 call admin_gate_$syserr_error_code (4, code, "vrm_lock_$lock:"); 90 code = 0; 91 go to locked; 92 end; 93 94 arg_code = code; 95 96 return; /* Lock failed */ 97 98 locked: vrm_data.lock_cnt = vrm_data.lock_cnt + 1; /* Do some meters */ 99 vrm_data.time_locked = clock_ (); 100 vrm_data.locker_name = get_group_id_ (); 101 arg_code = code; 102 return; 103 104 105 unlock: entry; 106 107 if test_mode then return; 108 call find_vrm_data; 109 unlock_common: 110 vrm_data.unlock_cnt = vrm_data.unlock_cnt + 1; 111 vrm_data.time_spent_locked = vrm_data.time_spent_locked + clock_ () - vrm_data.time_locked; 112 call set_lock_$unlock (vrm_data.lock, code); 113 if code ^= 0 then call admin_gate_$syserr_error_code (4, code, "vrm_lock_$unlock:"); 114 return; 115 116 117 /* Entry called by cleanup handlers on crawl-out. It is not certain that the lock is locked */ 118 119 cleanup: entry; 120 121 if test_mode then return; 122 if saved_data_ptr = null then return; /* Never called lock */ 123 vrm_datap = saved_data_ptr; 124 125 if vrm_data.lock ^= get_lock_id_ () then return; /* Not locked by me */ 126 go to unlock_common; /* Join std path */ 127 128 /* Entry to set test mode */ 129 130 set_test_mode: entry; 131 132 test_mode = "1"b; 133 return; 134 135 /* Internal procedure to get a pointer to the vrm_data segment */ 136 137 find_vrm_data: proc; 138 139 dcl vrm_data_err condition; 140 141 if saved_data_ptr ^= null then do; /* Pointer already knwon */ 142 vrm_datap = saved_data_ptr; 143 return; 144 end; 145 146 call cu_$level_get (vl); 147 call cu_$level_set (get_ring_ ()); 148 call hcs_$initiate (vrm_data_dir, vrm_data_ename, "", 0, 0, saved_data_ptr, code); 149 call cu_$level_set (vl); 150 151 if saved_data_ptr ^= null then do; /* It worked */ 152 vrm_datap = saved_data_ptr; 153 return; 154 end; 155 156 call admin_gate_$syserr_error_code (4, code, 157 "vrm_lock_: Unable to initiate ^a>^a.", vrm_data_dir, vrm_data_ename); 158 159 signal vrm_data_err; /* I don't know what else to do now */ 160 161 return; 162 163 end find_vrm_data; 164 165 /* Initialization entry to create the vrm_data segment which contains the lock */ 166 167 vrm_data_init: entry; 168 169 if test_mode then return; 170 171 vrm_data_rings = get_ring_ (); 172 call hcs_$append_branchx (vrm_data_dir, vrm_data_ename, 01010b, vrm_data_rings, "*.*.*", 0, 0, 0, code); 173 if (code ^= 0) & (code ^= error_table_$namedup) then do; 174 call admin_gate_$syserr_error_code (0, code, "vrm_lock_$vrm_data_init: Unable to create ^a>^a.", 175 vrm_data_dir, vrm_data_ename); 176 return; 177 end; 178 179 if code = error_table_$namedup then do; 180 call hcs_$truncate_file (vrm_data_dir, vrm_data_ename, 0, code); 181 if code ^= 0 then do; 182 call admin_gate_$syserr_error_code (0, code, "vrm_lock_$vrm_data_init: Unable to truncate ^a>^a.", 183 vrm_data_dir, vrm_data_ename); 184 return; 185 end; 186 end; 187 188 call admin_gate_$reclassify_sys_seg (vrm_data_dir, vrm_data_ename, sys_info$access_class_ceiling, code); 189 if code ^= 0 then 190 call admin_gate_$syserr_error_code (0, code, "vrm_lock_$vrm_data_init: Unable to reclassify ^a>^a.", 191 vrm_data_dir, vrm_data_ename); 192 return; 193 194 /* BEGIN MESSAGE DOCUMENTATION 195* 196* Message: 197* vrm_lock_$lock: LOCK ERROR MESSAGE. 198* 199* S: $log 200* 201* T: $run 202* 203* M: A logical volume registration operation failed because of a problem 204* with the vrm control lock. 205* 206* A: $ignore 207* 208* Message: 209* vrm_lock_$unlock: LOCK ERROR MESSAGE. 210* 211* S: $log 212* 213* T: $run 214* 215* M: At the completion ofa logical volume registratin operation, some 216* error occured unlocking the vrm control lock. 217* 218* A: $ignore 219* 220* Message: 221* vrm_lock_: Unable to initiate PATHNAME. REASON. 222* 223* S: $log 224* 225* T: $run 226* 227* M: Logical volume registration control (vrm) was unable to initiate 228* PATHNAME, which contains the vrm control lock, because of REASON. 229* The logical volume registration control operation requested was 230* not performed. 231* 232* A: $ignore 233* 234* Message: 235* vrm_lock_$vrm_data_init: Unable to create PATHNAME. REASON. 236* 237* S: $info 238* 239* T: $init 240* 241* M: Logical volume registration control (vrm) was unable to create 242* the segment PATHNAME, to be used for the vrm control lock, for the 243* REASON given. Subsequent logical volume registration control 244* operations may fail. 245* 246* A: $ignore 247* 248* Message: 249* vrm_lock_$vrm_data_init: Unable to truncate PATHNAME. REASON. 250* 251* S: $info 252* 253* T: $init 254* 255* M: Logical volume registration control was unable to truncate 256* the segment PATHNAME for the REASON given. This segment is to 257* be used for the logical volume registration control lock. 258* Subsequent logical volume registration control operations may fail. 259* 260* A: $ignore 261* 262* Message: 263* vrm_lock_$vrm_data_init: Unable to reclassify PATHNAME. REASON. 264* 265* S: $info 266* 267* T: $init 268* 269* M: Logical volume registration control was unable to reclassify 270* the segment PATHNAME to its proper access class for the REASON given. 271* This segment is to be used for the logical volume registration control 272* lock. Subsequent logical volume registration control operations may fail. 273* 274* END MESSAGE DOCUMENTATION */ 275 276 277 end vrm_lock_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0803.3 vrm_lock_.pl1 >spec>install>1111>vrm_lock_.pl1 50 1 11/20/84 1944.9 vrm_data.incl.pl1 >ldd>include>vrm_data.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. admin_gate_$reclassify_sys_seg 000040 constant entry external dcl 66 ref 188 admin_gate_$syserr_error_code 000014 constant entry external dcl 55 ref 89 113 156 174 182 189 arg_code parameter fixed bin(35,0) dcl 31 set ref 79 82* 94* 101* clock_ 000016 constant entry external dcl 56 ref 99 111 code 000100 automatic fixed bin(35,0) dcl 35 set ref 86* 87 88 89* 90* 94 101 112* 113 113* 148* 156* 172* 173 173 174* 179 180* 181 182* 188* 189 189* cu_$level_get 000020 constant entry external dcl 57 ref 146 cu_$level_set 000022 constant entry external dcl 58 ref 147 149 error_table_$invalid_lock_reset 000046 external static fixed bin(35,0) dcl 70 ref 88 error_table_$namedup 000050 external static fixed bin(35,0) dcl 71 ref 173 179 get_group_id_ 000024 constant entry external dcl 59 ref 100 get_lock_id_ 000026 constant entry external dcl 60 ref 125 get_ring_ 000030 constant entry external dcl 61 ref 147 147 171 hcs_$append_branchx 000036 constant entry external dcl 64 ref 172 hcs_$initiate 000032 constant entry external dcl 62 ref 148 hcs_$truncate_file 000034 constant entry external dcl 63 ref 180 lock based bit(36) level 2 dcl 1-10 set ref 86* 112* 125 lock_cnt 1 based fixed bin(35,0) level 2 dcl 1-10 set ref 98* 98 locker_name 10 based char(32) level 2 dcl 1-10 set ref 100* null builtin function dcl 75 ref 122 141 151 saved_data_ptr 000010 internal static pointer initial dcl 41 set ref 122 123 141 142 148* 151 152 set_lock_$lock 000042 constant entry external dcl 67 ref 86 set_lock_$unlock 000044 constant entry external dcl 68 ref 112 sys_info$access_class_ceiling 000052 external static bit(72) dcl 73 set ref 188* test_mode 000012 internal static bit(1) initial packed unaligned dcl 42 set ref 81 107 121 132* 169 time_locked 4 based fixed bin(71,0) level 2 dcl 1-10 set ref 99* 111 time_spent_locked 6 based fixed bin(71,0) level 2 dcl 1-10 set ref 111* 111 unlock_cnt 2 based fixed bin(35,0) level 2 dcl 1-10 set ref 109* 109 vl 000101 automatic fixed bin(17,0) dcl 36 set ref 146* 149* vrm_data based structure level 1 dcl 1-10 vrm_data_dir 000010 constant char(32) initial packed unaligned dcl 46 set ref 148* 156* 172* 174* 180* 182* 188* 189* vrm_data_ename 000000 constant char(32) initial packed unaligned dcl 47 set ref 148* 156* 172* 174* 180* 182* 188* 189* vrm_data_err 000120 stack reference condition dcl 139 ref 159 vrm_data_rings 000102 automatic fixed bin(3,0) array dcl 37 set ref 171* 172* vrm_datap 000106 automatic pointer dcl 1-8 set ref 86 98 98 99 100 109 109 111 111 111 112 123* 125 142* 152* NAMES DECLARED BY EXPLICIT CONTEXT. cleanup 000407 constant entry external dcl 119 find_vrm_data 000771 constant entry internal dcl 137 ref 85 108 lock 000161 constant entry external dcl 79 locked 000253 constant label dcl 98 ref 87 91 set_test_mode 000440 constant entry external dcl 130 unlock 000312 constant entry external dcl 105 unlock_common 000323 constant label dcl 109 ref 126 vrm_data_init 000452 constant entry external dcl 167 vrm_lock_ 000150 constant entry external dcl 27 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1416 1472 1147 1426 Length 1716 1147 54 207 246 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME vrm_lock_ 212 external procedure is an external procedure. find_vrm_data internal procedure shares stack frame of external procedure vrm_lock_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 saved_data_ptr vrm_lock_ 000012 test_mode vrm_lock_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME vrm_lock_ 000100 code vrm_lock_ 000101 vl vrm_lock_ 000102 vrm_data_rings vrm_lock_ 000106 vrm_datap vrm_lock_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac signal_op ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. admin_gate_$reclassify_sys_seg admin_gate_$syserr_error_code clock_ cu_$level_get cu_$level_set get_group_id_ get_lock_id_ get_ring_ hcs_$append_branchx hcs_$initiate hcs_$truncate_file set_lock_$lock set_lock_$unlock THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$invalid_lock_reset error_table_$namedup sys_info$access_class_ceiling LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 27 000147 79 000155 81 000166 82 000170 83 000172 85 000173 86 000174 87 000211 88 000213 89 000216 90 000246 91 000247 94 000250 96 000252 98 000253 99 000260 100 000272 101 000305 102 000310 105 000311 107 000317 108 000322 109 000323 111 000330 112 000344 113 000355 114 000405 119 000406 121 000414 122 000417 123 000423 125 000425 126 000436 130 000437 132 000445 133 000450 167 000451 169 000457 171 000462 172 000501 173 000557 174 000564 176 000617 179 000620 180 000623 181 000647 182 000651 184 000705 188 000706 189 000732 192 000770 137 000771 141 000772 142 000777 143 001001 146 001002 147 001010 148 001026 149 001070 151 001077 152 001104 153 001106 156 001107 159 001143 161 001146 ----------------------------------------------------------- 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