1 /* Begin include file dir_lock_seg_.incl.pl1 BIM 830312 */
 2 /* From dirlockt.incl.pl1 */
 3 
 4 /* format: style3,idind25,indcomtxt */
 5 
 6 /**** Several arrays in this program are zero based. The zero-th
 7       entries are NEVER USED. referencers should start at 1, not lbound.
 8       The zero entries are there to improve the compiler's subscript
 9       calculations. The compiler can fetch dir_lock_all_dir_locks (foo).uid
10       with an lda pr6|FOO,*ql */
11 
12 dcl       dir_lock_seg$            external static;         /* name of the segment containing the directory locks */
13 
14 dcl       dir_lock_segp            pointer;                 /* pointer to the dirlock table */
15 
16 dcl       1 dir_lock_seg           based (dir_lock_segp) aligned,
17             2 header               aligned like dir_lock_seg_header,
18             2 dir_locks            (0:dir_lock_seg.header.n_dir_locks) aligned like dir_lock,
19             2 readers              (0:dir_lock_seg.header.n_dir_locks, dir_lock_seg.header.max_readers) bit (36) aligned;
20 
21 declare   (dir_lock_all_locksp, dir_lock_all_readersp)
22                                    pointer;
23 
24 declare   1 dir_lock_all_dir_locks (0:dir_lock_seg.header.n_dir_locks) aligned like dir_lock based (dir_lock_all_locksp);
25 declare   dir_lock_all_readers     (0:dir_lock_seg.header.n_dir_locks, dir_lock_seg.header.max_readers) bit (36)
26                                    aligned based (dir_lock_all_readersp);
27 
28 declare   DIR_LOCK_SEG_EVENT       char (4) aligned init ("drls") int static options (constant);
29 
30 declare   1 dir_lock_seg_header    aligned based,
31             2 seg_lock             aligned like lock,
32             2 n_dir_locks          fixed bin,               /* max number */
33             2 highest_in_use       fixed bin,
34             2 max_readers          fixed bin,
35             2 pad_even             bit (36) aligned,
36             2 readers_ptr          pointer,
37             2 locks_ptr            pointer,
38             2 meters               aligned,
39               3 find_calls         fixed bin (35),
40               3 find_failures      fixed bin (35),
41               3 max_in_use         fixed bin (35),
42               3 pad_meters         fixed bin (35),
43             2 pad                  (16) bit (36) aligned;   /* to 32 */
44 
45 declare   dir_lockp                pointer;
46 declare   1 dir_lock               aligned based (dir_lockp),
47             2 uid                  bit (36) aligned,
48             2 flags                aligned,
49               3 notify_sw          bit (1) unaligned,
50               3 salvage_sw         bit (1) unaligned,       /* ON if dir was locked for salvage */
51               3 pad                bit (34) unaligned,
52             2 lock_count           fixed bin (17),          /* POSITIVE --> write_lock */
53                                                             /* NEGATIVE --> -number of lockers */
54                                                             /* ZERO --> not locked */
55             2 write_locker         bit (36) aligned;        /* in case of read, see next declaration, and expect this 0 */
56 
57 declare   dir_read_lockers_ptr     pointer;
58 declare   dir_read_lockers         (dir_lock_seg.header.max_readers) bit (36) aligned based (dir_read_lockers_ptr);
59 
60 /* End include file dir_lock_seg_.incl.pl1 */