1 /* BEGIN INCLUDE FILE:  dm_ci_header.incl.pl1 */
 2 
 3 /* DESCRIPTION:
 4 
 5         This include file contains various structures which make up the
 6    header and trailer of a control interval.
 7 
 8    ****  NOTE:  The include file dm_ci.incl.pl1 is heavily dependent ****
 9    ****  on this include file.  When changing this include file,     ****
10    ****  check dm_ci.incl.pl1 to see if it is affected.              ****
11 */
12 
13 /* HISTORY:
14 Written by Jeffrey D. Ives, 03/02/82.
15   (Design by Andre Bensoussan and Jeffrey D. Ives)
16 Modified:
17 11/02/84 by Matthew Pierret:  Re-organized so that dm_ci.incl.pl1 and
18             dm_ci_header.incl.pl1 do not duplicate structures or constants.
19 */
20 
21 /* format: style2,ind3 */
22 
23 /* ci_header is the first four words of a control interval. Its contents
24    are used to verify that a control interval is in an expected format,
25    to identify the control interval and the file to which the control
26    interval belongs, and to maintain information for the synchronization
27    of disk I/O between DM file control intervals and associated before
28    journal control intervals.  The first two words are the time stamp for
29    synchronization; the latter two identify the control interval. */
30 
31      dcl     ci_header_ptr          ptr;
32      dcl     1 ci_header            aligned based (ci_header_ptr),
33                2 stamp              like ci_stamp,
34                2 id                 like ci_id;
35 
36 /* ci_trailer is the last two words of a control interval and must match
37    the first two words (ci_header.stamp). */
38 
39      dcl     ci_trailer_ptr         ptr;
40      dcl     1 ci_trailer           like ci_header.stamp aligned based (ci_trailer_ptr);
41 
42 
43 /* ci_stamp is a two-word date/time modified stamp, consisting of:
44      version: a 9-bit version string for the structure
45      bj_idx:  before journal index for I/O synchronization
46      time_modified:  Multics clock time of last modification */
47 
48      dcl     1 ci_stamp             aligned based,
49                3 version            bit (9) unal,
50                3 bj_idx             fixed bin (9) uns unal,
51                3 time_modified      fixed bin (53) unal;
52 
53      dcl     CI_HEADER_STAMP_VERSION_1
54                                     bit (9) aligned static options (constant) init ("641"b3);
55 
56 /* ci_id is a two-word identification of the control interval, which
57    rarely changes and consists of:
58      uid:   DM file unique identifier
59      size_code:  the control interval size in bytes, in an encoded
60                  form (see ci_size_code below).
61      num:   the control interval number.  0 is the number of the first
62             control interval of a file. */
63 
64      dcl     1 ci_id                aligned based,
65                3 uid                bit (36),
66                3 size_code          bit (9) unal,
67                3 num                fixed bin (27) uns unal;
68 
69 /* ci_size_code is the structure which defines the content of ci_id.size_code.
70    The size in bytes of a control interval is equal to
71    (2 ** ci_size_code.exponent * (64 + 8 * ci_size_code.addon)).  */
72 
73      dcl     1 ci_size_code         aligned based,
74                2 exponent           fixed bin (6) uns unal,
75                2 addon              fixed bin (3) uns unal;
76 
77 /* ci_header_chunks is a structure which can be used to update the
78    ci_stamp or ci_id in one memory cycle. */
79 
80      dcl     1 ci_header_chunks     aligned based (ci_header_ptr),
81                2 stamp              fixed bin (71),
82                2 id                 fixed bin (71);
83 
84 /* ci_trailer_chunk is a structure which can e used to update the
85    ci_trailer in one memory cycle. */
86 
87      dcl     1 ci_trailer_chunk     aligned based,
88                2 stamp              fixed bin (71);
89 
90 
91 /*  END INCLUDE FILE:  dm_ci_header.incl.pl1  */