1 /* BEGIN INCLUDE FILE - dm_cm_info.incl.pl1 */ 2 3 /* DESCRIPTION: 4 The cm_info structure is used to hold per-process opening information 5 about a collection. It is generally allocated in the process' DM free 6 area, as returned by the function get_dm_free_area_. The opening_manager_ 7 is used to provide access the cm_info structure, keeping it in a hash 8 table keyed on file opening id and collection id combined. 9 Currently cm_info is never freed until the process terminates. Each 10 time a new transaction is started, detected when the current transaction 11 id of a process differs from cm_info.current_transaction_id, the information 12 in cm_info is refreshed. Storage record information is only refreshed on 13 demand, as most modules do not need the information in the storage record. 14 Instead, cm_info.storage_record_ptr is set to null (), but 15 cm_info.storage_record_buffer_ptr remains set to the previous value of 16 cm_info.storage_record_ptr. When a refreshed copy of the storage record is 17 requested, it is placed at the location pointed to by 18 cm_info.storage_record_buffer_ptr, saving the expense of re-allocation. 19 */ 20 21 /* HISTORY: 22 Written by Matthew Pierret, 10/27/82. 23 Modified: 24 01/25/83 by Matthew Pierret: Changed to version 2. Added 25 storage_record_buffer_ptr. This points to the storage_record. 26 When cm_info is refreshed, storage_record_ptr is set to null, 27 but storage_record_buffer_ptr continues to point at where the 28 storage_record was. When the storge_record is again requested, 29 it is put back in the same place rather than allocating a new 30 storage_record. 31 09/24/84 by Matthew Pierret: Re-wrote DESCRIPTION section. Removed the 32 init clause from the version component. 33 */ 34 35 /* format: style2,ind3,ll79 */ 36 37 dcl 1 cm_info aligned based (cm_info_ptr), 38 2 version char (8), 39 2 current_txn_id bit (36) aligned init ("0"b), 40 2 file_oid bit (36) aligned init ("0"b), 41 2 collection_id bit (36) aligned init ("0"b), 42 2 header_ptr ptr init (null), 43 2 storage_record_ptr ptr init (null), 44 2 storage_record_buffer_ptr 45 ptr init (null); 46 47 dcl cm_info_ptr ptr init (null); 48 dcl CM_INFO_VERSION_2 init ("cm_info2") char (8) aligned 49 internal static options (constant); 50 51 /* END INCLUDE FILE - dm_cm_info.incl.pl1 */