head	1.7;
access;
symbols
	release_4_2:1.7
	aix_ok:1.7;
locks; strict;
comment	@ * @;


1.7
date	91.11.14.19.38.21;	author kemnitz;	state Exp;
branches;
next	1.6;

1.6
date	91.08.29.23.49.37;	author mer;	state Exp;
branches;
next	1.5;

1.5
date	91.08.03.01.02.33;	author mer;	state Exp;
branches;
next	1.4;

1.4
date	91.07.22.17.52.00;	author mer;	state Exp;
branches;
next	1.3;

1.3
date	91.07.22.17.23.35;	author mer;	state Exp;
branches;
next	1.2;

1.2
date	91.07.22.16.26.58;	author mer;	state Exp;
branches;
next	1.1;

1.1
date	91.07.22.15.15.03;	author mer;	state Exp;
branches;
next	;


desc
@new file for new lock manager
@


1.7
log
@protos checkin.
@
text
@/*
 * multilev.h -- multi level lock table consts/defs
 *
 * $Header: RCS/multilev.h,v 1.6 91/08/29 23:49:37 mer Exp Locker: kemnitz $
 *
 * for single.c and multi.c and their clients
 */
#ifndef _INC_MULTILEV_
#define _INC_MULTILEV_

#include "storage/lock.h"
#include "storage/lmgr.h"

#define READ_LOCK  	2
#define WRITE_LOCK 	1

/* any time a small granularity READ/WRITE lock is set.  
 * Higher granularity READ_INTENT/WRITE_INTENT locks must
 * also be set.  A read intent lock is has value READ+INTENT.
 * in this implementation.
 */
#define NO_LOCK		0
#define INTENT		2
#define READ_INTENT	(READ_LOCK+INTENT)
#define WRITE_INTENT	(WRITE_LOCK+INTENT)

#define EXTEND_LOCK	5

#define SHORT_TERM	1
#define LONG_TERM	2
#define UNLOCK		0

#define N_LEVELS 3
#define RELN_LEVEL 0
#define PAGE_LEVEL 1
#define TUPLE_LEVEL 2
typedef int LOCK_LEVEL;

/* multi.c */

/*
 * function prototypes
 */
LockTableId InitMultiLevelLockm();
bool MultiLockReln ARGS((LockInfo linfo, LOCKT lockt));
bool MultiLockTuple ARGS((LockInfo linfo, ItemPointer tidPtr, LOCKT lockt));
bool MultiLockPage ARGS((LockInfo linfo, ItemPointer tidPtr, LOCKT lockt));
bool MultiReleaseReln ARGS((LockInfo linfo, LOCKT lockt));
bool MultiReleasePage ARGS((LockInfo linfo, ItemPointer tidPtr, LOCKT lockt));

bool MultiAcquire ARGS((
	LockTableId tableId, 
	LOCKTAG *tag, 
	LOCK_LEVEL level, 
	LOCKT lockt
));

bool MultiRelease ARGS((
	LockTableId tableId, 
	LOCKTAG *tag, 
	LOCK_LEVEL level, 
	LOCKT lockt
));


#endif _INC_MULTILEV_
@


1.6
log
@purge old lmgr code
@
text
@d4 1
a4 1
 * $Header: /users/mer/postgres/src/lib/H/storage/RCS/multilev.h,v 1.5 1991/08/03 01:02:33 mer Exp mer $
d12 1
d52 1
a52 1
	TableId tableId, 
d59 1
a59 1
	TableId tableId, 
@


1.5
log
@add extend locks
@
text
@d4 1
a4 1
 * $Header: RCS/multilev.h,v 1.4 91/07/22 17:52:00 mer Exp Locker: mer $
d8 2
d40 26
a65 1
TableId InitMultiLevelLockm();
@


1.4
log
@add include for TableId's
@
text
@d4 1
a4 1
 * $Header: RCS/multilev.h,v 1.3 91/07/22 17:23:35 mer Exp Locker: mer $
d23 2
@


1.3
log
@comment unclosed oops.
@
text
@d4 1
a4 1
 * $Header$
d8 2
@


1.2
log
@fix compiler error
@
text
@d4 2
d32 1
a32 1
/* multi.c *
@


1.1
log
@Initial revision
@
text
@d30 3
@
