1: #if !defined(lint) && defined(DOSCCS)
   2: static char *sccsid = "@(#)ildr.h	1.0	(2.11BSD GTE)	2/14/95";
   3: #endif	lint
   4: 
   5: /*
   6:  * This is the include file for the Ingres concurrency (lock) driver.
   7:  * Only the parameters NLOCKS, PLOCKS, RLOCKS and DLOCKS may be changed.
   8:  *
   9:  * The initial values allow for 10 simultaneous Ingres users on the system.
  10:  * This should be enough but if you wish to raise that limit then change
  11:  * _only_ the 'IL_DLOCKS' parameter below.
  12: */
  13: 
  14: #define KEYSIZE 12
  15: /* max number of data base locks (max # of Ingreses) */
  16: #define IL_DLOCKS   10
  17: #define IL_RLOCKS   ((2*IL_DLOCKS) + 6)
  18: #define IL_PLOCKS   (IL_RLOCKS + 3)
  19: #define IL_NLOCKS   (IL_PLOCKS + 1)
  20: 
  21: /*
  22:  * Do not change anything below this line unless you are modifying the
  23:  * driver.
  24: */
  25: 
  26: #define LOCKPRI     1
  27: #define TRUE        1
  28: #define FALSE       0
  29: #define M_EMTY      0
  30: #define M_SHARE     2
  31: #define M_EXCL      1
  32: #define T_CS        0
  33: #define T_PAGE      1
  34: #define T_REL       2
  35: #define T_DB        3
  36: #define A_RTN       1
  37: #define A_SLP       2
  38: #define A_RLS1      3
  39: #define A_RLSA      4
  40: #define A_ABT       5
  41: #define W_ON        1
  42: #define W_OFF       0
  43: 
  44: /*
  45:  *	data structure for Lock table
  46:  */
  47: struct  Lockform
  48:     {
  49:     int l_pid;
  50:     char    l_wflag;    /* wait flag: = 1 a process is waiting*/
  51:     char    l_type;     /* type of lock:
  52: 					= 0 for critical section
  53: 					= 1 for page
  54: 					= 2 for logical
  55: 					= 3 for data base
  56: 				*/
  57:     char    l_mod;      /* mod of Lock or lock action requested
  58: 				 *	= 0 slot empty
  59: 				 *	= 1 exclusive lock
  60: 				 *	= 2 shared lock
  61: 				 */
  62:     char    l_pad;
  63:     char    l_key[KEYSIZE];
  64:     };
  65: 
  66: /*
  67:  * This is the structure written by Ingres programs.
  68:  *
  69:  * This structure _must_ agree in size and alignment with the 'lockreq'
  70:  * structure defined in /usr/ingres/source/lock.h
  71: */
  72: 
  73: struct  ulock
  74:     {
  75:     char    _act;       /* requested action:
  76: 				 *	=1 request lock, err return
  77: 				 *	=2 request lock, sleep
  78: 				 *	=3 release lock
  79: 				 *	=4 release all locks for pid
  80: 				 */
  81:     char    _type;      /* same as Locktab l_type */
  82:     char    _mod;       /* same as Locktab l_mod */
  83:     char    _pad;       /* Pad byte to align key on word boundary */
  84:     char    _key[KEYSIZE];  /* requested key	*/
  85:     };
  86: 
  87: struct Lockreq
  88:     {
  89:     int lr_pid;     /* requesting process id */
  90:     struct  ulock lr_req;   /* The structure written by the user */
  91:     };
  92: 
  93: #define lr_act  lr_req._act
  94: #define lr_type lr_req._type
  95: #define lr_mod  lr_req._mod
  96: #define lr_key  lr_req._key
  97: 
  98: #define ingres_maplock()    mapseg5(Locktabseg.se_addr, Locktabseg.se_desc)
  99: #define LOCKTABSIZE (IL_NLOCKS * sizeof (struct Lockform))
 100: 
 101:     extern  segm    Locktabseg;

Defined variables

sccsid defined in line 2; never used

Defined struct's

Lockform defined in line 47; used 14 times
Lockreq defined in line 87; used 10 times
ulock defined in line 73; used 6 times

Defined macros

A_ABT defined in line 40; never used
A_RLS1 defined in line 38; used 1 times
A_RLSA defined in line 39; never used
A_RTN defined in line 36; never used
A_SLP defined in line 37; never used
FALSE defined in line 28; used 3 times
IL_DLOCKS defined in line 16; used 3 times
IL_NLOCKS defined in line 19; used 9 times
IL_PLOCKS defined in line 18; used 3 times
IL_RLOCKS defined in line 17; used 3 times
KEYSIZE defined in line 14; used 4 times
LOCKPRI defined in line 26; used 2 times
LOCKTABSIZE defined in line 99; used 2 times
M_EMTY defined in line 29; used 6 times
M_EXCL defined in line 31; used 3 times
M_SHARE defined in line 30; used 1 times
TRUE defined in line 27; used 2 times
T_CS defined in line 32; used 1 times
T_DB defined in line 35; used 1 times
T_PAGE defined in line 33; never used
T_REL defined in line 34; never used
W_OFF defined in line 42; used 1 times
W_ON defined in line 41; used 2 times
ingres_maplock defined in line 98; used 4 times
lr_act defined in line 93; used 2 times
lr_key defined in line 96; used 3 times
lr_mod defined in line 95; used 4 times
lr_type defined in line 94; used 8 times

Usage of this include

Last modified: 1995-02-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 911
Valid CSS Valid XHTML 1.0 Strict