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

Lockset defined in line 58; never used
Locktab defined in line 56; never used

Defined struct's

Lockform defined in line 40; never used
Lockreq defined in line 69; never used

Defined macros

A_ABT defined in line 26; never used
A_RLS1 defined in line 24; never used
A_RLSA defined in line 25; 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
  • in line 9, 66
FALSE defined in line 14; never used
KEYSIZE defined in line 7; used 2 times
LOCKPRI defined in line 12; never used
M_EMTY defined in line 15; never used
M_EXCL defined in line 17; never used
M_SHARE defined in line 16; never used
NLOCKS defined in line 11; used 2 times
PLOCKS defined in line 10; used 2 times
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_PAGE defined in line 19; 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
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 727
Valid CSS Valid XHTML 1.0 Strict