COMPILATION LISTING OF SEGMENT rlm_set_scope Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 01/03/85 1627.0 mst Thu Options: optimize list 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 8 /* DESCRIPTION: 9* 10* Records the given scope settings and, if the relation is protected, 11* calls page_file_manager_ to record the implied lock advice. 12**/ 13 14 /* HISTORY: 15* 16*Written by Matthew Pierret, 10/06/82. 17*Modified: 18*03/16/83 by Matthew Pierret: Changed to use rlm_opening_info$get_dont_refresh. 19*06/18/84 by Matthew Pierret: Removed declaration of the un-used null builtin. 20**/ 21 /* format: style2,ind3 */ 22 23 /* format: style2,ind3 */ 24 25 rlm_set_scope: 26 proc (p_rel_opening_id, p_this_process_permission, p_other_processes_permission, p_code); 27 28 /* START OF DECLARATIONS */ 29 /* Parameter */ 30 31 dcl p_rel_opening_id bit (36) aligned parameter; 32 dcl p_this_process_permission 33 bit (2) aligned parameter; 34 dcl p_other_processes_permission 35 bit (2) aligned parameter; 36 dcl p_code fixed bin (35) parameter; 37 38 /* Automatic */ 39 40 dcl lock_mode fixed bin; 41 42 /* Based */ 43 /* Builtin */ 44 /* Constant */ 45 46 dcl myname init ("rlm_set_scope") char (32) varying int static options (constant); 47 48 /* Entry */ 49 50 dcl rlm_opening_info$get_dont_refresh 51 entry (bit (36) aligned, ptr, fixed bin (35)); 52 dcl rlm_update_opening_info$lock_advice 53 entry (ptr, bit (2) aligned, bit (2) aligned, fixed bin (35)); 54 dcl file_manager_$lock_advice 55 entry (bit (36) aligned, fixed bin, fixed bin (35)); 56 57 /* External */ 58 /* END OF DECLARATIONS */ 59 60 p_code = 0; 61 62 call rlm_opening_info$get_dont_refresh (p_rel_opening_id, relation_opening_info_ptr, p_code); 63 if p_code ^= 0 64 then return; 65 66 call 67 rlm_update_opening_info$lock_advice (relation_opening_info_ptr, p_this_process_permission, 68 p_other_processes_permission, p_code); 69 70 if p_other_processes_permission = NO_PERMISSION 71 then lock_mode = LOCK_MODE_X; 72 else if p_other_processes_permission = READ_PERMISSION 73 then if p_this_process_permission = READ_PERMISSION 74 then lock_mode = LOCK_MODE_S; 75 else lock_mode = LOCK_MODE_SIX; 76 else if p_this_process_permission = READ_PERMISSION 77 then lock_mode = LOCK_MODE_IS; 78 else lock_mode = LOCK_MODE_IX; 79 80 call file_manager_$lock_advice (p_rel_opening_id, lock_mode, p_code); 81 82 return; 83 1 1 /* BEGIN INCLUDE FILE - dm_rlm_opening_info.incl.pl1 */ 1 2 1 3 /* Written by Matthew Pierret, 09/08/82. 1 4*Modified: 1 5*01/18/83 by Matthew Pierret: Changed version to be char (8). Added 1 6* transaction_id. 1 7*02/25/83 by Matthew Pierret: Changed to relation_opening_info (from 1 8* relation_info). 1 9*10/29/84 by Stanford S. Cox: Changed to not init version. 1 10**/ 1 11 1 12 1 13 /* format: style2,ind3 */ 1 14 1 15 dcl 1 relation_opening_info 1 16 aligned based (relation_opening_info_ptr), 1 17 2 version char (8), 1 18 2 per_process, 1 19 3 current_transaction_id 1 20 bit (36) aligned init ("0"b), 1 21 3 current_rollback_count 1 22 fixed bin (35) init (0), 1 23 3 file_opening_id bit (36) aligned init ("0"b), 1 24 3 number_of_openings 1 25 fixed bin (17) aligned init (0), 1 26 3 lock_advice aligned, 1 27 4 this_process bit (2) unaligned init ("0"b), 1 28 4 other_processes 1 29 bit (2) unaligned init ("0"b), 1 30 4 mbz1 bit (32) unaligned init ("0"b), 1 31 3 record_cursor_ptr 1 32 ptr init (null), 1 33 3 index_cursor_array_ptr 1 34 ptr init (null), 1 35 2 relation_header_ptr 1 36 ptr init (null), 1 37 2 attribute_info_ptr ptr init (null), 1 38 2 index_attribute_map_ptr 1 39 ptr init (null); 1 40 1 41 dcl relation_opening_info_ptr 1 42 ptr; 1 43 dcl RELATION_OPENING_INFO_VERSION_2 1 44 init ("rlmopen2") char (8) aligned internal static options (constant); 1 45 1 46 1 47 /* END INCLUDE FILE - dm_rlm_opening_info.incl.pl1 */ 84 85 2 1 /* BEGIN INCLUDE FILE dm_rlm_permissions.incl.pl1 */ 2 2 2 3 /* Written by Matthew Pierret, 03/02/83. */ 2 4 2 5 /* format: style2,ind3 */ 2 6 2 7 dcl ( 2 8 NO_PERMISSION init ("00"b), 2 9 READ_PERMISSION init ("10"b), 2 10 WRITE_PERMISSION init ("01"b), 2 11 READ_WRITE_PERMISSION init ("11"b) 2 12 ) bit (2) aligned internal static options (constant); 2 13 2 14 /* END INCLUDE FILE dm_rlm_permissions.incl.pl1 */ 86 87 3 1 /* START OF: dm_lock_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 3 2 3 3 /* DESCRIPTION: 3 4* 3 5* Hierarchical lock modes for Data Management control interval locking. In 3 6*addition to conventional read and write locks, intention locks are provided 3 7*for finer locking granularity. 3 8**/ 3 9 3 10 /* HISTORY: 3 11*Written by Jeffrey D. Ives, 04/30/82. 3 12*Modified: 3 13*12/05/84 by Stanford S. Cox: Added Description. 3 14**/ 3 15 /* format: style3,idind25 */ 3 16 3 17 dcl LOCK_MODE_S fixed bin static options (constant) init (2); 3 18 dcl LOCK_MODE_X fixed bin static options (constant) init (3); 3 19 dcl LOCK_MODE_IS fixed bin static options (constant) init (4); 3 20 dcl LOCK_MODE_IX fixed bin static options (constant) init (5); 3 21 dcl LOCK_MODE_SIX fixed bin static options (constant) init (6); 3 22 3 23 dcl LOCK_ENTIRE_FILE fixed bin (27) static options (constant) init (-1); 3 24 3 25 dcl LOCK_MODE_NAMES (2:6) char (3) int static options (constant) 3 26 init (" S", " X", " IS", " IX", "SIX"); 3 27 3 28 /* 3 29* S Share Let others read it but not modify it. 3 30* X Exclusive Let nobody else read or modify it. 3 31* IS Intention Share I am only using S locks, because I am only reading CIs. 3 32* IX Intention Exclusive I am using S and X locks, because I am reading and modifying CIs. 3 33* SIX Share with Intention Exclusive I am reading control intervals, but only locking the ones I modify. 3 34**/ 3 35 3 36 /* END OF: dm_lock_modes.incl.pl1 * * * * * * * * * * * * * * * * */ 88 89 90 end rlm_set_scope; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/03/85 1148.0 rlm_set_scope.pl1 >spec>temp>famis1>rlm_set_scope.pl1 84 1 01/03/85 1004.6 dm_rlm_opening_info.incl.pl1 >spec>temp>famis1>dm_rlm_opening_info.incl.pl1 86 2 01/03/85 1004.6 dm_rlm_permissions.incl.pl1 >spec>temp>famis1>dm_rlm_permissions.incl.pl1 88 3 01/03/85 1005.5 dm_lock_modes.incl.pl1 >spec>temp>famis1>dm_lock_modes.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. LOCK_MODE_IS constant fixed bin(17,0) initial dcl 3-19 ref 76 LOCK_MODE_IX constant fixed bin(17,0) initial dcl 3-20 ref 78 LOCK_MODE_S constant fixed bin(17,0) initial dcl 3-17 ref 72 LOCK_MODE_SIX constant fixed bin(17,0) initial dcl 3-21 ref 75 LOCK_MODE_X constant fixed bin(17,0) initial dcl 3-18 ref 70 NO_PERMISSION constant bit(2) initial dcl 2-7 ref 70 READ_PERMISSION constant bit(2) initial dcl 2-7 ref 72 72 76 file_manager_$lock_advice 000014 constant entry external dcl 54 ref 80 lock_mode 000100 automatic fixed bin(17,0) dcl 40 set ref 70* 72* 75* 76* 78* 80* p_code parameter fixed bin(35,0) dcl 36 set ref 25 60* 62* 63 66* 80* p_other_processes_permission parameter bit(2) dcl 34 set ref 25 66* 70 72 p_rel_opening_id parameter bit(36) dcl 31 set ref 25 62* 80* p_this_process_permission parameter bit(2) dcl 32 set ref 25 66* 72 76 relation_opening_info_ptr 000102 automatic pointer dcl 1-41 set ref 62* 66* rlm_opening_info$get_dont_refresh 000010 constant entry external dcl 50 ref 62 rlm_update_opening_info$lock_advice 000012 constant entry external dcl 52 ref 66 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. LOCK_ENTIRE_FILE internal static fixed bin(27,0) initial dcl 3-23 LOCK_MODE_NAMES internal static char(3) initial array unaligned dcl 3-25 READ_WRITE_PERMISSION internal static bit(2) initial dcl 2-7 RELATION_OPENING_INFO_VERSION_2 internal static char(8) initial dcl 1-43 WRITE_PERMISSION internal static bit(2) initial dcl 2-7 myname internal static varying char(32) initial dcl 46 relation_opening_info based structure level 1 dcl 1-15 NAME DECLARED BY EXPLICIT CONTEXT. rlm_set_scope 000010 constant entry external dcl 25 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 210 226 122 220 Length 454 122 16 211 65 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rlm_set_scope 87 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rlm_set_scope 000100 lock_mode rlm_set_scope 000102 relation_opening_info_ptr rlm_set_scope THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. file_manager_$lock_advice rlm_opening_info$get_dont_refresh rlm_update_opening_info$lock_advice NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. CONSTANTS 000000 aa 404000000043 000001 aa 514000000002 000002 aa 514000000044 BEGIN PROCEDURE rlm_set_scope ENTRY TO rlm_set_scope STATEMENT 1 ON LINE 25 rlm_set_scope: proc (p_rel_opening_id, p_this_process_permission, p_other_processes_permission, p_code); 000003 at 000004000002 000004 tt 000001000001 000005 ta 000000000000 000006 ta 000003000000 000007 da 000061300000 000010 aa 000140 6270 00 eax7 96 000011 aa 7 00034 3521 20 epp2 pr7|28,* 000012 aa 2 01045 2721 00 tsp2 pr2|549 ext_entry 000013 aa 000010000000 000014 aa 000000000000 STATEMENT 1 ON LINE 60 p_code = 0; 000015 aa 6 00032 3735 20 epp7 pr6|26,* 000016 aa 7 00010 4501 20 stz pr7|8,* p_code STATEMENT 1 ON LINE 62 call rlm_opening_info$get_dont_refresh (p_rel_opening_id, relation_opening_info_ptr, p_code); 000017 aa 7 00002 3521 20 epp2 pr7|2,* p_rel_opening_id 000020 aa 6 00106 2521 00 spri2 pr6|70 000021 aa 6 00102 3521 00 epp2 pr6|66 relation_opening_info_ptr 000022 aa 6 00110 2521 00 spri2 pr6|72 000023 aa 7 00010 3521 20 epp2 pr7|8,* p_code 000024 aa 6 00112 2521 00 spri2 pr6|74 000025 aa 6 00104 6211 00 eax1 pr6|68 000026 aa 014000 4310 07 fld 6144,dl 000027 la 4 00010 3521 20 epp2 pr4|8,* rlm_opening_info$get_dont_refresh 000030 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 63 if p_code ^= 0 then return; 000031 aa 6 00032 3735 20 epp7 pr6|26,* 000032 aa 7 00010 2361 20 ldq pr7|8,* p_code 000033 aa 0 00631 6011 00 tnz pr0|409 return STATEMENT 1 ON LINE 66 call rlm_update_opening_info$lock_advice (relation_opening_info_ptr, p_this_process_permission, p_other_processes_permission, p_code); 000034 aa 6 00102 3521 00 epp2 pr6|66 relation_opening_info_ptr 000035 aa 6 00116 2521 00 spri2 pr6|78 000036 aa 7 00004 3521 20 epp2 pr7|4,* p_this_process_permission 000037 aa 6 00120 2521 00 spri2 pr6|80 000040 aa 7 00006 3521 20 epp2 pr7|6,* p_other_processes_permission 000041 aa 6 00122 2521 00 spri2 pr6|82 000042 aa 7 00010 3521 20 epp2 pr7|8,* p_code 000043 aa 6 00124 2521 00 spri2 pr6|84 000044 aa 6 00114 6211 00 eax1 pr6|76 000045 aa 020000 4310 07 fld 8192,dl 000046 aa 6 00044 3701 20 epp4 pr6|36,* 000047 la 4 00012 3521 20 epp2 pr4|10,* rlm_update_opening_info$lock_advice 000050 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 70 if p_other_processes_permission = NO_PERMISSION then lock_mode = LOCK_MODE_X; 000051 aa 6 00032 3735 20 epp7 pr6|26,* 000052 aa 7 00006 2351 20 lda pr7|6,* p_other_processes_permission 000053 aa 0 00004 3771 00 anaq pr0|4 = 600000000000 000000000000 000054 aa 6 00126 7551 00 sta pr6|86 p_other_processes_permission 000055 aa 000004 6010 04 tnz 4,ic 000061 000056 aa 000003 2360 07 ldq 3,dl 000057 aa 6 00100 7561 00 stq pr6|64 lock_mode 000060 aa 000026 7100 04 tra 22,ic 000106 STATEMENT 1 ON LINE 72 else if p_other_processes_permission = READ_PERMISSION then if p_this_process_permission = READ_PERMISSION then lock_mode = LOCK_MODE_S; 000061 aa 400000 1150 03 cmpa 131072,du 000062 aa 000013 6010 04 tnz 11,ic 000075 000063 aa 7 00004 2351 20 lda pr7|4,* p_this_process_permission 000064 aa 0 00004 3771 00 anaq pr0|4 = 600000000000 000000000000 000065 aa 400000 1150 03 cmpa 131072,du 000066 aa 000004 6010 04 tnz 4,ic 000072 000067 aa 000002 2360 07 ldq 2,dl 000070 aa 6 00100 7561 00 stq pr6|64 lock_mode 000071 aa 000015 7100 04 tra 13,ic 000106 STATEMENT 1 ON LINE 75 else lock_mode = LOCK_MODE_SIX; 000072 aa 000006 2360 07 ldq 6,dl 000073 aa 6 00100 7561 00 stq pr6|64 lock_mode 000074 aa 000012 7100 04 tra 10,ic 000106 STATEMENT 1 ON LINE 76 else if p_this_process_permission = READ_PERMISSION then lock_mode = LOCK_MODE_IS; 000075 aa 7 00004 2351 20 lda pr7|4,* p_this_process_permission 000076 aa 0 00004 3771 00 anaq pr0|4 = 600000000000 000000000000 000077 aa 400000 1150 03 cmpa 131072,du 000100 aa 000004 6010 04 tnz 4,ic 000104 000101 aa 000004 2360 07 ldq 4,dl 000102 aa 6 00100 7561 00 stq pr6|64 lock_mode 000103 aa 000003 7100 04 tra 3,ic 000106 STATEMENT 1 ON LINE 78 else lock_mode = LOCK_MODE_IX; 000104 aa 000005 2360 07 ldq 5,dl 000105 aa 6 00100 7561 00 stq pr6|64 lock_mode STATEMENT 1 ON LINE 80 call file_manager_$lock_advice (p_rel_opening_id, lock_mode, p_code); 000106 aa 7 00002 3521 20 epp2 pr7|2,* p_rel_opening_id 000107 aa 6 00106 2521 00 spri2 pr6|70 000110 aa 6 00100 3521 00 epp2 pr6|64 lock_mode 000111 aa 6 00110 2521 00 spri2 pr6|72 000112 aa 7 00010 3521 20 epp2 pr7|8,* p_code 000113 aa 6 00112 2521 00 spri2 pr6|74 000114 aa 6 00104 6211 00 eax1 pr6|68 000115 aa 014000 4310 07 fld 6144,dl 000116 aa 6 00044 3701 20 epp4 pr6|36,* 000117 la 4 00014 3521 20 epp2 pr4|12,* file_manager_$lock_advice 000120 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 82 return; 000121 aa 0 00631 7101 00 tra pr0|409 return STATEMENT 1 ON LINE 90 end rlm_set_scope; END PROCEDURE rlm_set_scope ----------------------------------------------------------- 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