COMPILATION LISTING OF SEGMENT reserve_resource Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1725.5 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 reserve_resource: 12 rsr: 13 proc (); 14 15 /* 16* D_E_S_C_R_I_P_T_I_O_N_ 17* 18* This command takes a resource description and reserves the 19* requested resources for the calling process. This command just 20* implements the user interface. It calls parse_resource_desc_$check 21* to parse the resource description and resource_control_$reserve to 22* reserve the resource. 23* 24* 25* 26* J_O_U_R_N_A_L_I_Z_A_T_I_O_N__ 27* 28* 1) Written 11/78 by R.J.C. Kissel. 29* 30**/ 31 32 /* Local variables */ 33 34 dcl nargs fixed bin; 35 dcl arg_ptr ptr; 36 dcl arg_len fixed bin; 37 dcl arg char (arg_len) based (arg_ptr); 38 dcl code fixed bin (35); 39 dcl info_area ptr; 40 dcl err_msg char (256) varying; 41 42 /* Include Files */ 43 1 1 /* --------------- BEGIN include file resource_control_desc.incl.pl1 --------------- */ 1 2 1 3 /* Written by R.J.C. Kissel 3/78. */ 1 4 /* Modified 09/28/78 by C. D. Tavares */ 1 5 1 6 dcl 1 resource_descriptions based (resource_desc_ptr) aligned, 1 7 2 version_no fixed bin, /* caller must set this to resource_desc_version_1 */ 1 8 2 n_items fixed bin, /* Number of resources described by this structure. */ 1 9 2 item (Resource_count refer (resource_descriptions.n_items)) aligned, 1 10 3 type char (32), /* e.g., "tape_drive" */ 1 11 3 name char (32), /* e.g., "tapa_03" */ 1 12 3 uid bit (36), /* The resource unique id. */ 1 13 3 potential_attributes bit (72), /* resource's permissible attributes */ 1 14 3 attributes (2) bit (72), /* RCP attribute description (output) */ 1 15 3 desired_attributes (4) bit (72), /* desired attributes (input) */ 1 16 3 potential_aim_range (2) bit (72), /* Lowest and highest possible AIM bounds for resource */ 1 17 3 aim_range (2) bit (72), /* Current AIM range */ 1 18 3 owner char (32), /* e.g., "Smith.Project" */ 1 19 3 acs_path char (168), /* Access control segment pathname. */ 1 20 3 location char (168), /* String describing location in unusual cases */ 1 21 3 comment char (168), /* User-settable comment string */ 1 22 3 charge_type char (32), /* accounting identifier for this resource */ 1 23 3 rew bit (3) unaligned, /* user's effective access to resource */ 1 24 3 (usage_lock, /* This resource may not be acquired or used. */ 1 25 release_lock, /* The owner is not allowed to release the resource. */ 1 26 awaiting_clear, /* Resource awaiting manual clear */ 1 27 user_alloc) bit (1) unaligned, /* User claims volume contains useful data */ 1 28 3 pad2 bit (29) unaligned, /* Ignored field. */ 1 29 3 given aligned, /* each of these bits says the corresponding */ 1 30 /* item is significant on input */ 1 31 (4 (name, 1 32 uid, 1 33 potential_attributes, 1 34 desired_attributes, 1 35 potential_aim_range, 1 36 aim_range, 1 37 owner, 1 38 acs_path, 1 39 location, 1 40 comment, 1 41 charge_type, 1 42 usage_lock, 1 43 release_lock, 1 44 user_alloc) bit (1), 1 45 4 pad1 bit (22)) unaligned, 1 46 3 state bit (36) aligned, /* For use of resource_control_ only */ 1 47 3 status_code fixed bin (35); /* Standard system status code for this resource. */ 1 48 1 49 1 50 /* Note that the reservation description must always be used with a resource 1 51* description structure. When they are used together the two structures must 1 52* have the same number of entries, i.e. Resource_count is the same for both. */ 1 53 1 54 1 55 dcl 1 reservation_description based (resource_res_ptr) aligned, 1 56 2 version_no fixed bin, /* The version number for this structure. */ 1 57 2 reserved_for char (32), /* Group id of reserved for process. */ 1 58 2 reserved_by char (32), /* Group id of reserved by process. */ 1 59 2 reservation_id fixed bin (71), /* Reservation id of this reservation group. */ 1 60 2 group_starting_time fixed bin (71), /* Starting time for this reservation group. */ 1 61 2 asap_duration fixed bin (71), /* Duration after which as soon as possible is no longer good. */ 1 62 2 flags aligned, 1 63 (3 auto_expire bit (1), /* Should reservation expire when this process terminates. */ 1 64 3 asap bit (1), /* Make this reservation group as soon as possible. */ 1 65 3 rel bit (1), /* Times are relative/absolute. */ 1 66 3 sec bit (1)) unaligned, /* Times are in sec/microsec. */ 1 67 2 n_items fixed bin, /* Number of resources reserved in this group. */ 1 68 2 reservation_group (Resource_count refer (reservation_description.n_items)), 1 69 3 starting_time fixed bin (71), /* When this resource res. starts in the group. */ 1 70 3 duration fixed bin (71); /* Duration of this resource res. in the group. */ 1 71 1 72 dcl (resource_desc_ptr, 1 73 resource_res_ptr) pointer; 1 74 1 75 dcl (resource_desc_version_1 initial (1), 1 76 resource_res_version_1 initial (1)) internal static options (constant); 1 77 1 78 dcl Resource_count fixed bin; /* The number of resources described in the structures. */ 1 79 1 80 /* ---------------- END include file resource_control_desc.incl.pl1 ---------------- */ 44 45 46 /* External Entries */ 47 48 dcl cu_$arg_count entry (fixed bin); 49 dcl get_system_free_area_ 50 entry () returns (ptr); 51 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 52 dcl parse_resource_desc_$check 53 entry (char (*), ptr, ptr, ptr, char (*) varying, fixed bin (35)); 54 dcl com_err_ entry options (variable); 55 dcl resource_control_$reserve 56 entry (ptr, ptr, bit (72) aligned, bit (1) aligned, fixed bin (35)); 57 58 /* External Constants */ 59 60 dcl error_table_$badopt fixed bin (35) external; 61 62 /* Builtin Functions and Conditions */ 63 64 dcl (null) builtin; 65 66 dcl (cleanup) condition; 67 68 resource_desc_ptr = null (); 69 resource_res_ptr = null (); 70 info_area = get_system_free_area_ (); 71 72 on cleanup 73 call Cleanup_Handler; 74 75 call cu_$arg_count (nargs); 76 if nargs ^= 2 77 then goto ERROR_usage; 78 79 call cu_$arg_ptr (1, arg_ptr, arg_len, code); 80 if code ^= 0 81 then goto ERROR_arg; 82 83 if arg ^= "-resource" & arg ^= "-rsc" 84 then goto ERROR_carg; 85 86 call cu_$arg_ptr (2, arg_ptr, arg_len, code); 87 if code ^= 0 88 then goto ERROR_arg; 89 90 call parse_resource_desc_$check (arg, info_area, resource_desc_ptr, resource_res_ptr, err_msg, code); 91 if code ^= 0 92 then goto ERROR_parse; 93 94 call resource_control_$reserve (resource_desc_ptr, resource_res_ptr, "0"b, "0"b, code); 95 if code ^= 0 96 then goto ERROR_res; 97 98 return; 99 100 /* 101* All error handling code goes here. 102**/ 103 104 ERROR_arg: 105 call Cleanup_Handler (); 106 call com_err_ (code, "reserve_resource"); 107 return; 108 109 ERROR_carg: 110 call Cleanup_Handler (); 111 call com_err_ (error_table_$badopt, "reserve_resource", "^a", arg); 112 return; 113 114 ERROR_parse: 115 call Cleanup_Handler (); 116 call com_err_ (code, "reserve_resource", "^a", err_msg); 117 return; 118 119 ERROR_res: 120 call Cleanup_Handler (); 121 call com_err_ (code, "reserve_resource", "No reservations made."); 122 return; 123 124 ERROR_usage: 125 call Cleanup_Handler (); 126 call com_err_ (0b, "reserve_resource", "Usage: rsr -rsc resource_desc"); 127 return; 128 129 Cleanup_Handler: 130 proc (); 131 132 if resource_desc_ptr ^= null () 133 then free resource_descriptions; 134 135 if resource_res_ptr ^= null () 136 then free reservation_description; 137 138 end Cleanup_Handler; 139 140 end reserve_resource; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1619.2 reserve_resource.pl1 >dumps>old>recomp>reserve_resource.pl1 44 1 02/13/79 1715.0 resource_control_desc.incl.pl1 >ldd>include>resource_control_desc.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. arg based char unaligned dcl 37 set ref 83 83 90* 111* arg_len 000104 automatic fixed bin(17,0) dcl 36 set ref 79* 83 83 86* 90 90 111 111 arg_ptr 000102 automatic pointer dcl 35 set ref 79* 83 83 86* 90 111 cleanup 000216 stack reference condition dcl 66 ref 72 code 000105 automatic fixed bin(35,0) dcl 38 set ref 79* 80 86* 87 90* 91 94* 95 106* 116* 121* com_err_ 000020 constant entry external dcl 54 ref 106 111 116 121 126 cu_$arg_count 000010 constant entry external dcl 48 ref 75 cu_$arg_ptr 000014 constant entry external dcl 51 ref 79 86 err_msg 000110 automatic varying char(256) dcl 40 set ref 90* 116* error_table_$badopt 000024 external static fixed bin(35,0) dcl 60 set ref 111* get_system_free_area_ 000012 constant entry external dcl 49 ref 70 info_area 000106 automatic pointer dcl 39 set ref 70* 90* n_items 31 based fixed bin(17,0) level 2 in structure "reservation_description" dcl 1-55 in procedure "rsr" ref 135 n_items 1 based fixed bin(17,0) level 2 in structure "resource_descriptions" dcl 1-6 in procedure "rsr" ref 132 nargs 000100 automatic fixed bin(17,0) dcl 34 set ref 75* 76 null builtin function dcl 64 ref 68 69 132 135 parse_resource_desc_$check 000016 constant entry external dcl 52 ref 90 reservation_description based structure level 1 dcl 1-55 ref 135 resource_control_$reserve 000022 constant entry external dcl 55 ref 94 resource_desc_ptr 000212 automatic pointer dcl 1-72 set ref 68* 90* 94* 132 132 resource_descriptions based structure level 1 dcl 1-6 ref 132 resource_res_ptr 000214 automatic pointer dcl 1-72 set ref 69* 90* 94* 135 135 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Resource_count automatic fixed bin(17,0) dcl 1-78 resource_desc_version_1 internal static fixed bin(17,0) initial dcl 1-75 resource_res_version_1 internal static fixed bin(17,0) initial dcl 1-75 NAMES DECLARED BY EXPLICIT CONTEXT. Cleanup_Handler 000530 constant entry internal dcl 129 ref 72 104 109 114 119 124 ERROR_arg 000271 constant label dcl 104 ref 80 87 ERROR_carg 000321 constant label dcl 109 ref 83 ERROR_parse 000366 constant label dcl 114 set ref 91 ERROR_res 000430 constant label dcl 119 ref 95 ERROR_usage 000467 constant label dcl 124 set ref 76 reserve_resource 000055 constant entry external dcl 11 rsr 000046 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 724 752 564 734 Length 1154 564 26 165 140 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rsr 192 external procedure is an external procedure. on unit on line 72 64 on unit Cleanup_Handler 64 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rsr 000100 nargs rsr 000102 arg_ptr rsr 000104 arg_len rsr 000105 code rsr 000106 info_area rsr 000110 err_msg rsr 000212 resource_desc_ptr rsr 000214 resource_res_ptr rsr THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return enable ext_entry int_entry free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr get_system_free_area_ parse_resource_desc_$check resource_control_$reserve THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000045 68 000062 69 000064 70 000065 72 000073 75 000115 76 000124 79 000127 80 000146 83 000150 86 000162 87 000201 90 000203 91 000241 94 000243 95 000266 98 000270 104 000271 106 000275 107 000320 109 000321 111 000325 112 000365 114 000366 116 000372 117 000427 119 000430 121 000434 122 000466 124 000467 126 000473 127 000526 129 000527 132 000535 135 000550 138 000563 ----------------------------------------------------------- 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