aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage/lmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/storage/lmgr.h')
-rw-r--r--src/include/storage/lmgr.h92
1 files changed, 50 insertions, 42 deletions
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h
index 0d65b29ba0b..debe950c7c5 100644
--- a/src/include/storage/lmgr.h
+++ b/src/include/storage/lmgr.h
@@ -1,75 +1,83 @@
/*-------------------------------------------------------------------------
*
* lmgr.h--
- * POSTGRES lock manager definitions.
+ * POSTGRES lock manager definitions.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lmgr.h,v 1.5 1997/08/19 21:39:54 momjian Exp $
+ * $Id: lmgr.h,v 1.6 1997/09/07 05:01:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
-#ifndef LMGR_H
+#ifndef LMGR_H
#define LMGR_H
#include <storage/lock.h>
#include <utils/rel.h>
-/*
+/*
* This was moved from pladt.h for the new lock manager. Want to obsolete
* all of the old code.
*/
-typedef struct LRelId {
- Oid relId; /* a relation identifier */
- Oid dbId; /* a database identifier */
-} LRelId;
+typedef struct LRelId
+{
+ Oid relId; /* a relation identifier */
+ Oid dbId; /* a database identifier */
+} LRelId;
-typedef struct LockInfoData {
- bool initialized;
- LRelId lRelId;
- TransactionId transactionIdData;
- uint16 flags;
-} LockInfoData;
-typedef LockInfoData *LockInfo;
+typedef struct LockInfoData
+{
+ bool initialized;
+ LRelId lRelId;
+ TransactionId transactionIdData;
+ uint16 flags;
+} LockInfoData;
+typedef LockInfoData *LockInfo;
#define LockInfoIsValid(linfo) \
- ((PointerIsValid(linfo)) && ((LockInfo) linfo)->initialized)
+ ((PointerIsValid(linfo)) && ((LockInfo) linfo)->initialized)
-extern LRelId RelationGetLRelId(Relation relation);
-extern Oid LRelIdGetRelationId(LRelId lRelId);
-extern void RelationInitLockInfo(Relation relation);
-extern void RelationSetLockForDescriptorOpen(Relation relation);
-extern void RelationSetLockForRead(Relation relation);
-extern void RelationUnsetLockForRead(Relation relation);
-extern void RelationSetLockForWrite(Relation relation);
-extern void RelationUnsetLockForWrite(Relation relation);
+extern LRelId RelationGetLRelId(Relation relation);
+extern Oid LRelIdGetRelationId(LRelId lRelId);
+extern void RelationInitLockInfo(Relation relation);
+extern void RelationSetLockForDescriptorOpen(Relation relation);
+extern void RelationSetLockForRead(Relation relation);
+extern void RelationUnsetLockForRead(Relation relation);
+extern void RelationSetLockForWrite(Relation relation);
+extern void RelationUnsetLockForWrite(Relation relation);
/* used in vaccum.c */
-extern void RelationSetLockForWritePage(Relation relation,
- ItemPointer itemPointer);
+extern void
+RelationSetLockForWritePage(Relation relation,
+ ItemPointer itemPointer);
/* used in nbtpage.c, hashpage.c */
-extern void RelationSetSingleWLockPage(Relation relation,
- ItemPointer itemPointer);
-extern void RelationUnsetSingleWLockPage(Relation relation,
- ItemPointer itemPointer);
-extern void RelationSetSingleRLockPage(Relation relation,
- ItemPointer itemPointer);
-extern void RelationUnsetSingleRLockPage(Relation relation,
- ItemPointer itemPointer);
-extern void RelationSetRIntentLock(Relation relation);
-extern void RelationUnsetRIntentLock(Relation relation);
-extern void RelationSetWIntentLock(Relation relation);
-extern void RelationUnsetWIntentLock(Relation relation);
+extern void
+RelationSetSingleWLockPage(Relation relation,
+ ItemPointer itemPointer);
+extern void
+RelationUnsetSingleWLockPage(Relation relation,
+ ItemPointer itemPointer);
+extern void
+RelationSetSingleRLockPage(Relation relation,
+ ItemPointer itemPointer);
+extern void
+RelationUnsetSingleRLockPage(Relation relation,
+ ItemPointer itemPointer);
+extern void RelationSetRIntentLock(Relation relation);
+extern void RelationUnsetRIntentLock(Relation relation);
+extern void RelationSetWIntentLock(Relation relation);
+extern void RelationUnsetWIntentLock(Relation relation);
/* single.c */
-extern bool SingleLockReln(LockInfo linfo, LOCKT lockt, int action);
-extern bool SingleLockPage(LockInfo linfo, ItemPointer tidPtr,
+extern bool SingleLockReln(LockInfo linfo, LOCKT lockt, int action);
+extern bool
+SingleLockPage(LockInfo linfo, ItemPointer tidPtr,
LOCKT lockt, int action);
/* proc.c */
-extern void InitProcGlobal(IPCKey key);
+extern void InitProcGlobal(IPCKey key);
-#endif /* LMGR_H */
+#endif /* LMGR_H */