mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: lock.h,v 1.6 1997/09/07 05:01:26 momjian Exp $
|
||||
* $Id: lock.h,v 1.7 1997/09/08 02:39:05 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <storage/itemptr.h>
|
||||
|
||||
extern SPINLOCK LockMgrLock;
|
||||
typedef int MASK;
|
||||
typedef int MASK;
|
||||
|
||||
#define INIT_TABLE_SIZE 100
|
||||
#define MAX_TABLE_SIZE 1000
|
||||
@@ -36,9 +36,9 @@ typedef int MASK;
|
||||
#define NLOCKS_PER_XACT 40
|
||||
#define NLOCKENTS NLOCKS_PER_XACT*NBACKENDS
|
||||
|
||||
typedef int LOCK_TYPE;
|
||||
typedef int LOCKT;
|
||||
typedef int LockTableId;
|
||||
typedef int LOCK_TYPE;
|
||||
typedef int LOCKT;
|
||||
typedef int LockTableId;
|
||||
|
||||
/* MAX_LOCKTYPES cannot be larger than the bits in MASK */
|
||||
#define MAX_LOCKTYPES 6
|
||||
@@ -57,10 +57,10 @@ typedef int LockTableId;
|
||||
|
||||
typedef struct ltag
|
||||
{
|
||||
Oid relId;
|
||||
Oid dbId;
|
||||
Oid relId;
|
||||
Oid dbId;
|
||||
ItemPointerData tupleId;
|
||||
} LOCKTAG;
|
||||
} LOCKTAG;
|
||||
|
||||
#define TAGSIZE (sizeof(LOCKTAG))
|
||||
|
||||
@@ -86,12 +86,12 @@ typedef struct ltag
|
||||
*/
|
||||
typedef struct lockctl
|
||||
{
|
||||
LockTableId tableId;
|
||||
int nLockTypes;
|
||||
int conflictTab[MAX_LOCKTYPES];
|
||||
int prio[MAX_LOCKTYPES];
|
||||
SPINLOCK masterLock;
|
||||
} LOCKCTL;
|
||||
LockTableId tableId;
|
||||
int nLockTypes;
|
||||
int conflictTab[MAX_LOCKTYPES];
|
||||
int prio[MAX_LOCKTYPES];
|
||||
SPINLOCK masterLock;
|
||||
} LOCKCTL;
|
||||
|
||||
/*
|
||||
* lockHash -- hash table on lock Ids,
|
||||
@@ -101,10 +101,10 @@ typedef struct lockctl
|
||||
*/
|
||||
typedef struct ltable
|
||||
{
|
||||
HTAB *lockHash;
|
||||
HTAB *xidHash;
|
||||
LOCKCTL *ctl;
|
||||
} LOCKTAB;
|
||||
HTAB *lockHash;
|
||||
HTAB *xidHash;
|
||||
LOCKCTL *ctl;
|
||||
} LOCKTAB;
|
||||
|
||||
/* -----------------------
|
||||
* A transaction never conflicts with its own locks. Hence, if
|
||||
@@ -137,30 +137,30 @@ typedef struct ltable
|
||||
|
||||
typedef struct XIDTAG
|
||||
{
|
||||
SHMEM_OFFSET lock;
|
||||
int pid;
|
||||
TransactionId xid;
|
||||
} XIDTAG;
|
||||
SHMEM_OFFSET lock;
|
||||
int pid;
|
||||
TransactionId xid;
|
||||
} XIDTAG;
|
||||
|
||||
typedef struct XIDLookupEnt
|
||||
{
|
||||
/* tag */
|
||||
XIDTAG tag;
|
||||
XIDTAG tag;
|
||||
|
||||
/* data */
|
||||
int holders[MAX_LOCKTYPES];
|
||||
int nHolding;
|
||||
SHM_QUEUE queue;
|
||||
} XIDLookupEnt;
|
||||
int holders[MAX_LOCKTYPES];
|
||||
int nHolding;
|
||||
SHM_QUEUE queue;
|
||||
} XIDLookupEnt;
|
||||
|
||||
#define XID_TAGSIZE (sizeof(XIDTAG))
|
||||
|
||||
/* originally in procq.h */
|
||||
typedef struct procQueue
|
||||
{
|
||||
SHM_QUEUE links;
|
||||
int size;
|
||||
} PROC_QUEUE;
|
||||
SHM_QUEUE links;
|
||||
int size;
|
||||
} PROC_QUEUE;
|
||||
|
||||
|
||||
/*
|
||||
@@ -177,16 +177,16 @@ typedef struct procQueue
|
||||
typedef struct Lock
|
||||
{
|
||||
/* hash key */
|
||||
LOCKTAG tag;
|
||||
LOCKTAG tag;
|
||||
|
||||
/* data */
|
||||
int mask;
|
||||
PROC_QUEUE waitProcs;
|
||||
int holders[MAX_LOCKTYPES];
|
||||
int nHolding;
|
||||
int activeHolders[MAX_LOCKTYPES];
|
||||
int nActive;
|
||||
} LOCK;
|
||||
int mask;
|
||||
PROC_QUEUE waitProcs;
|
||||
int holders[MAX_LOCKTYPES];
|
||||
int nHolding;
|
||||
int activeHolders[MAX_LOCKTYPES];
|
||||
int nActive;
|
||||
} LOCK;
|
||||
|
||||
#define LockGetLock_nHolders(l) l->nHolders
|
||||
|
||||
@@ -202,23 +202,23 @@ extern SPINLOCK LockMgrLock;
|
||||
/*
|
||||
* function prototypes
|
||||
*/
|
||||
extern void InitLocks(void);
|
||||
extern void LockDisable(int status);
|
||||
extern LockTableId
|
||||
extern void InitLocks(void);
|
||||
extern void LockDisable(int status);
|
||||
extern LockTableId
|
||||
LockTabInit(char *tabName, MASK * conflictsP, int *prioP,
|
||||
int ntypes);
|
||||
extern bool LockAcquire(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt);
|
||||
extern bool LockAcquire(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt);
|
||||
extern int
|
||||
LockResolveConflicts(LOCKTAB * ltable, LOCK * lock, LOCKT lockt,
|
||||
TransactionId xid);
|
||||
extern bool LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt);
|
||||
extern void GrantLock(LOCK * lock, LOCKT lockt);
|
||||
extern bool LockReleaseAll(LockTableId tableId, SHM_QUEUE * lockQueue);
|
||||
extern int LockShmemSize(void);
|
||||
extern bool LockingDisabled(void);
|
||||
extern bool LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt);
|
||||
extern void GrantLock(LOCK * lock, LOCKT lockt);
|
||||
extern bool LockReleaseAll(LockTableId tableId, SHM_QUEUE * lockQueue);
|
||||
extern int LockShmemSize(void);
|
||||
extern bool LockingDisabled(void);
|
||||
|
||||
#ifdef DEADLOCK_DEBUG
|
||||
extern void DumpLocks(void);
|
||||
extern void DumpLocks(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user