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

Defined variables

Lockset defined in line 75; never used
Locktab defined in line 73; never used

Defined struct's

Lockform defined in line 57; never used
Lockreq defined in line 37; never used

Defined macros

A_ABT defined in line 32; never used
A_RLS1 defined in line 30; never used
A_RLSA defined in line 31; never used
A_RTN defined in line 28; never used
A_SLP defined in line 29; never used
DLOCKS defined in line 13; used 2 times
KEYSIZE defined in line 17; used 2 times
LOCKPRI defined in line 52; never used
M_EMTY defined in line 19; never used
M_EXCL defined in line 21; never used
M_SHARE defined in line 20; never used
NLOCKS defined in line 16; used 2 times
PLOCKS defined in line 15; used 2 times
RLOCKS defined in line 14; used 2 times
T_CS defined in line 23; never used
T_DB defined in line 26; never used
T_PAGE defined in line 24; never used
T_REL defined in line 25; never used
W_OFF defined in line 35; never used
W_ON defined in line 34; never used
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 715
Valid CSS Valid XHTML 1.0 Strict