Annotation of 42BSD/ingres/source/h/ildr.h, revision 1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.