summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorVadim B. Mikheev1999-05-07 01:23:11 +0000
committerVadim B. Mikheev1999-05-07 01:23:11 +0000
commit122abf3af3e0519cfddcfdfd0dfb8eb0c4aca61c (patch)
treedf5da77d26dc9f7337be57fe614030ee6a7b0330 /src/include
parent86bc1da2628322c25190a15f1b6a433237aa1a45 (diff)
Fix LMGR for MVCC.
Get rid of Extend lock mode.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/lmgr.h4
-rw-r--r--src/include/storage/lock.h5
-rw-r--r--src/include/storage/proc.h11
3 files changed, 10 insertions, 10 deletions
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h
index 0e78c33de9b..3af0071d468 100644
--- a/src/include/storage/lmgr.h
+++ b/src/include/storage/lmgr.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lmgr.h,v 1.18 1999/02/19 06:06:34 tgl Exp $
+ * $Id: lmgr.h,v 1.19 1999/05/07 01:23:05 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,8 +25,6 @@
#define ExclusiveLock 6
#define AccessExclusiveLock 7
-#define ExtendLock 8
-
extern LOCKMETHOD LockTableId;
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index da77f1d523c..387f164247c 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lock.h,v 1.24 1999/03/06 21:17:43 tgl Exp $
+ * $Id: lock.h,v 1.25 1999/05/07 01:23:07 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@ typedef int LOCKMODE;
typedef int LOCKMETHOD;
/* MAX_LOCKMODES cannot be larger than the bits in MASK */
-#define MAX_LOCKMODES 9
+#define MAX_LOCKMODES 8
/*
* MAX_LOCK_METHODS corresponds to the number of spin locks allocated in
@@ -204,6 +204,7 @@ typedef struct LOCK
/* data */
int mask;
+ int waitMask;
PROC_QUEUE waitProcs;
int holders[MAX_LOCKMODES];
int nHolding;
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 952f50553ca..53b677858fd 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: proc.h,v 1.20 1999/02/19 07:10:47 tgl Exp $
+ * $Id: proc.h,v 1.21 1999/05/07 01:23:07 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,8 +48,9 @@ typedef struct proc
* were starting our xact: vacuum must not
* remove tuples deleted by xid >= xmin ! */
- LOCK *waitLock; /* Lock we're sleeping on */
- int token; /* info for proc wakeup routines */
+ LOCK *waitLock; /* Lock we're sleeping on ... */
+ int token; /* type of lock we sleeping for */
+ int holdLock; /* while holding these locks */
int pid; /* This procs process id */
short sLocks[MAX_SPINS]; /* Spin lock stats */
SHM_QUEUE lockQueue; /* locks associated with current
@@ -116,8 +117,8 @@ extern bool ProcRemove(int pid);
/* make static in storage/lmgr/proc.c -- jolly */
extern void ProcQueueInit(PROC_QUEUE *queue);
-extern int ProcSleep(PROC_QUEUE *queue, SPINLOCK spinlock, int token,
- int prio, LOCK *lock, TransactionId xid);
+extern int ProcSleep(PROC_QUEUE *queue, LOCKMETHODCTL *lockctl, int token,
+ LOCK *lock);
extern int ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod,
LOCK *lock);
extern void ProcAddLock(SHM_QUEUE *elem);