1 /*  START OF:       dm_journal_seg_.incl.pl1      October 1982          *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
 2 /*                                                modified June 1982 by M. Pandolf for more meters *  *  *  *  *  *  *  */
 3 
 4      dcl     dm_journal_seg_$       external;
 5 
 6      dcl     dm_journal_segp        ptr;
 7      dcl     dm_per_journalp        ptr;
 8      dcl     dm_per_journal_arrayp  ptr;
 9      dcl     dm_page_entryp         ptr;
10 
11      dcl     n_dm_journals          fixed bin;
12      dcl     max_dm_pages           fixed bin;
13 
14 
15      dcl     1 dm_journal           aligned based (dm_journal_segp),
16 
17                2 lock               bit (36) aligned,       /* Lock for manipulating journal entries */
18                2 wait_event         bit (36) aligned,       /* Wait Event for lock */
19                2 notify_sw          bit (1) aligned,
20 
21                2 n_journals         fixed bin,              /* Number of journals */
22                2 n_journals_inuse   fixed bin,              /* Number of journals in use now */
23                2 max_held_pages_mem fixed bin,              /* Maximum number of pages held in memory */
24                2 n_held_pages_mem   fixed bin,              /* Number of pages held in memory */
25                2 max_held_per_journal fixed bin,            /* max_held_pages_mem / n_journals_inuse */
26                2 per_aste_pool      (0:3) aligned,
27                  3 threshold        fixed bin,              /* Maximum number of active segments */
28                  3 n_active         fixed bin,              /* Number currently active */
29                2 free_list_relp     bit (18) aligned,       /* Free entry list first ptr */
30                2 synch_write_calls  fixed bin (35),         /* Number of calls to check write */
31                2 synch_write_holds  fixed bin (35),         /* Number of times page held for call */
32                2 synch_write_no_stamp
33                                     fixed bin (35),         /* Number of times page had null DM stamp */
34                2 synch_write_inv_vers
35                                     fixed bin (35),         /* Number of times page had invalid DM stamp */
36                2 synch_write_inv_ix
37                                     fixed bin (35),         /* Number of times page had invalid BJ index */
38                2 synch_write_inv_time
39                                     fixed bin (35),         /* Number of times page had future time stamp */
40                2 synch_write_tosses fixed bin (35),         /* Number of times page tossed because of threshold */
41                2 unlink_calls       fixed bin (35),         /* Number of calls to unlink all entries to a journal */
42                2 unlink_steps       fixed bin (35),         /* Number of CMEs unlinked */
43                2 activate_calls     fixed bin (35),         /* Number of times synch segment activated */
44                2 deactivate_calls   fixed bin (35),         /* Number of times synch segment deactivated */
45                2 activate_denied    fixed bin (35),         /* Number of times activation threshold exceeded */
46                2 set_stamp_calls    fixed bin (35),         /* Number of times called to set time stamp */
47                2 allocate_calls     fixed bin (35),         /* Number of times called to allocate a journal */
48                2 free_calls         fixed bin (35),         /* Number of times called to free a journal */
49 
50                2 per_journal        (n_dm_journals refer (dm_journal.n_journals)) aligned like dm_per_journal,
51                2 page_entry         (max_dm_pages refer (dm_journal.max_held_pages_mem)) aligned like dm_page_entry;
52 
53 
54      dcl     1 dm_per_journal_array (dm_journal.n_journals) aligned like dm_per_journal based (dm_per_journal_arrayp);
55 
56      dcl     1 dm_per_journal       aligned based (dm_per_journalp), /* One entry per DM journal */
57                2 time_stamp         fixed bin (71),         /* Pages before this time can be written */
58                2 n_held             fixed bin,              /* Number of pages held in memory */
59                2 uid                bit (36) aligned,       /* Unique ID for owner - ""b => not used */
60                2 access_class       bit (72) aligned,       /* Access Class of Owner */
61                2 entry_relp         bit (18) aligned,       /* Pointer to list of pages held for this journal */
62                2 pad                bit (36) aligned;
63 
64 
65      dcl     1 dm_page_entry        aligned based (dm_page_entryp),
66                2 fp                 bit (18) unal,          /* Forward pointer */
67                2 bp                 bit (18) unal,          /* Backward pointer */
68                2 cme_relp           bit (18) unal,          /* Rel ptr -> CME */
69                2 journal_relp       bit (18) unal;          /* Rel ptr -> dm_per_journal */
70 
71 
72 /*  END OF:         dm_journal_seg_.incl.pl1                  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
73