# 2.11BSD#431 - /usr/src/sys/h/ingreslock.h

##### Macros

    A_ABT             X
    A_RLS1            X
    A_RLSA            X
    A_RTN             X
    A_SLP             X
    FALSE             X
    IL_DLOCKS         X
    IL_NLOCKS         X
    IL_PLOCKS         X
    IL_RLOCKS         X
    KEYSIZE           X
    LOCKPRI           X
    LOCKTABSIZE       X
    M_EMTY            X
    M_EXCL            X
    M_SHARE           X
    TRUE              X
    T_CS              X
    T_DB              X
    T_PAGE            X
    T_REL             X
    W_OFF             X
    W_ON              X
    ingres_maplock    X
    lr_act            X
    lr_key            X
    lr_mod            X
    lr_type           X

##### struct's

    Lockform          X
    Lockreq           X
    ulock             X

       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

- in /usr/src/sys/sys/ingreslock.c line 26(4), 188(2), 206(2), 228(2), 257(2), 288(2)

Lockreq defined in line 87; used 10 times

- in /usr/src/sys/sys/ingreslock.c line 75-76(4), 185(2), 203(2), 285(2)

ulock defined in line 73; used 6 times

- in line 90(2)
- in /usr/src/sys/sys/ingreslock.c line 80-82(4)

#### Defined macros

A_ABT defined in line 40; never used
A_RLS1 defined in line 38; used 1 times

- in /usr/src/sys/sys/ingreslock.c line 87

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

- in /usr/src/sys/sys/ingreslock.c line 109, 134, 140

IL_DLOCKS defined in line 16; used 3 times

- in line 17
- in /usr/src/sys/sys/ingreslock.c line 38, 323

IL_NLOCKS defined in line 19; used 9 times

- in line 99
- in /usr/src/sys/sys/ingreslock.c line 24, 35, 190, 208, 269, 290, 315-320(2)

IL_PLOCKS defined in line 18; used 3 times

- in line 19
- in /usr/src/sys/sys/ingreslock.c line 36, 321

IL_RLOCKS defined in line 17; used 3 times

- in line 18
- in /usr/src/sys/sys/ingreslock.c line 37, 322

KEYSIZE defined in line 14; used 4 times

- in line 63, 84
- in /usr/src/sys/sys/ingreslock.c line 41, 297

LOCKPRI defined in line 26; used 2 times

- in /usr/src/sys/sys/ingreslock.c line 132, 143

LOCKTABSIZE defined in line 99; used 2 times

- in /usr/src/sys/pdp/machdep2.c line 235
- in /usr/src/sys/sys/ingreslock.c line 319

M_EMTY defined in line 29; used 6 times

- in /usr/src/sys/sys/ingreslock.c line 192, 210, 231-233(2), 271, 292

M_EXCL defined in line 31; used 3 times

- in /usr/src/sys/sys/ingreslock.c line 89, 195(2)

M_SHARE defined in line 30; used 1 times

- in /usr/src/sys/sys/ingreslock.c line 89

TRUE defined in line 27; used 2 times

- in /usr/src/sys/sys/ingreslock.c line 112, 127

T_CS defined in line 32; used 1 times

- in /usr/src/sys/sys/ingreslock.c line 88

T_DB defined in line 35; used 1 times

- in /usr/src/sys/sys/ingreslock.c line 88

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

- in /usr/src/sys/sys/ingreslock.c line 237

W_ON defined in line 41; used 2 times

- in /usr/src/sys/sys/ingreslock.c line 141, 235

ingres_maplock defined in line 98; used 4 times

- in /usr/src/sys/sys/ingreslock.c line 100, 133, 144, 262

lr_act defined in line 93; used 2 times

- in /usr/src/sys/sys/ingreslock.c line 87, 102

lr_key defined in line 96; used 3 times

- in /usr/src/sys/sys/ingreslock.c line 193, 211, 297

lr_mod defined in line 95; used 4 times

- in /usr/src/sys/sys/ingreslock.c line 89(2), 195, 296

lr_type defined in line 94; used 8 times

- in /usr/src/sys/sys/ingreslock.c line 88(2), 110, 128, 194, 212, 295-298(2)

#### Usage of this include

ingreslock.h used 2 times

- in /usr/src/sys/pdp/machdep2.c line 37
- in /usr/src/sys/sys/ingreslock.c line 18

Last modified: 1995-02-21 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 762 |