1: /*
2: ** ILDR.H -- header file for INGRES lock driver.
3: **
4: ** @(#)ildr.h 8.1 12/31/84
5: */
6:
7: # define KEYSIZE 12
8: # define DLOCKS 10 /* max number of data base locks (limits # of ingreses */
9: # define RLOCKS 2*DLOCKS + 6
10: # define PLOCKS RLOCKS + 3
11: # define NLOCKS PLOCKS + 1
12: # define LOCKPRI 1
13: # define TRUE 1
14: # define FALSE 0
15: # define M_EMTY 0
16: # define M_SHARE 2
17: # define M_EXCL 1
18: # define T_CS 0
19: # define T_PAGE 1
20: # define T_REL 2
21: # define T_DB 3
22: # define A_RTN 1
23: # define A_SLP 2
24: # define A_RLS1 3
25: # define A_RLSA 4
26: # define A_ABT 5
27: # define W_ON 1
28: # define W_OFF 0
29: /* Device driver for the /dev/ILOCK
30: * an in core device used as a Lock table
31: */
32: /* Only the parameters NLOCKS, PLOCKS, RLOCKS and DLOCKS
33: * may be changed by an INGRES installation. See
34: * 'HOW TO INSTALL CONCURRENCY DEVICE' for details.
35: * The file can be printed by "nroff .../doc/other/lockdev.nr"
36: */
37: /*
38: * data structure for Lock table
39: */
40: struct Lockform
41: {
42: int l_pid;
43: char l_wflag; /* wait flag: = 1 a process is waiting*/
44: char l_type; /* type of lock:
45: = 0 for critical section
46: = 1 for page
47: = 2 for logical
48: = 3 for data base
49: */
50: char l_mod; /* mod of Lock or lock action requested
51: * = 0 slot empty
52: * = 1 exclusive lock
53: * = 2 shared lock
54: */
55: char l_key[KEYSIZE];
56: } Locktab[NLOCKS];
57:
58: int Lockset[]
59: /* array of number of locks which can be
60: * set for each lock.
61: */
62: {
63: NLOCKS,
64: PLOCKS,
65: RLOCKS,
66: DLOCKS
67: };
68:
69: struct Lockreq
70: /* Lock Request */
71: {
72: int lr_pid; /* requesting process id */
73: char lr_act; /* requested action:
74: * =1 request lock, err return
75: * =2 request lock, sleep
76: * =3 release lock
77: * =4 release all locks for pid
78: */
79: char lr_type; /* same as Locktab l_type */
80: char lr_mod; /* same as Locktab l_mod */
81: char lr_key[KEYSIZE];/* requested key */
82: };
Defined variables
Defined struct's
Defined macros
A_ABT
defined in line
26;
never used
A_RTN
defined in line
22;
never used
A_SLP
defined in line
23;
never used
DLOCKS
defined in line
8; used 2 times
FALSE
defined in line
14;
never used
RLOCKS
defined in line
9; used 2 times
TRUE
defined in line
13;
never used
T_CS
defined in line
18;
never used
T_DB
defined in line
21;
never used
T_REL
defined in line
20;
never used
W_OFF
defined in line
28;
never used
W_ON
defined in line
27;
never used