1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Used modified version of indent that understands over 100 typedefs.

This commit is contained in:
Bruce Momjian
1997-09-08 21:56:23 +00:00
parent 075cede748
commit 59f6a57e59
413 changed files with 4472 additions and 4460 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.7 1997/09/08 20:56:41 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.8 1997/09/08 21:46:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,7 +40,7 @@ typedef struct lookup
{
BufferTag key;
Buffer id;
} LookupEnt;
} LookupEnt;
/*
* Initialize shmem hash table for mapping buffers
@@ -74,7 +74,7 @@ InitBufTable()
}
BufferDesc *
BufTableLookup(BufferTag * tagPtr)
BufTableLookup(BufferTag *tagPtr)
{
LookupEnt *result;
bool found;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.22 1997/09/08 20:56:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.23 1997/09/08 21:46:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -93,7 +93,7 @@ ReadBufferWithBufferLock(Relation relation, BlockNumber blockNum,
bool bufferLockHeld);
static BufferDesc *
BufferAlloc(Relation reln, BlockNumber blockNum,
bool * foundPtr, bool bufferLockHeld);
bool *foundPtr, bool bufferLockHeld);
static int FlushBuffer(Buffer buffer, bool release);
static void BufferSync(void);
static int BufferReplace(BufferDesc *bufHdr, bool bufferLockHeld);
@@ -354,7 +354,7 @@ ReadBufferWithBufferLock(Relation reln,
static BufferDesc *
BufferAlloc(Relation reln,
BlockNumber blockNum,
bool * foundPtr,
bool *foundPtr,
bool bufferLockHeld)
{
BufferDesc *buf,
@@ -1154,7 +1154,7 @@ long NDirectFileRead; /* some I/O's are direct file access.
long NDirectFileWrite; /* e.g., I/O in psort and hashjoin. */
void
PrintBufferUsage(FILE * statfp)
PrintBufferUsage(FILE *statfp)
{
float hitrate;
float localhitrate;

View File

@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.10 1997/09/08 02:28:34 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.11 1997/09/08 21:46:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,7 +63,7 @@ static int nextFreeLocalBuf = 0;
* allocate a local buffer. We do round robin allocation for now.
*/
BufferDesc *
LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool * foundPtr)
LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr)
{
int i;
BufferDesc *bufHdr = (BufferDesc *) NULL;

View File

@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Id: fd.c,v 1.24 1997/09/08 02:28:38 momjian Exp $
* $Id: fd.c,v 1.25 1997/09/08 21:46:54 momjian Exp $
*
* NOTES:
*
@@ -111,7 +111,7 @@ typedef struct vfd
char *fileName;
int fileFlags;
int fileMode;
} Vfd;
} Vfd;
/*
* Virtual File Descriptor array pointer and size. This grows as
@@ -883,7 +883,7 @@ TryAgain:
* AllocateFile()?
*/
void
FreeFile(FILE * file)
FreeFile(FILE *file)
{
DO_DB(elog(DEBUG, "FreeFile: Allocated %d.", allocatedFiles));

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.13 1997/09/08 02:28:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.14 1997/09/08 21:46:59 momjian Exp $
*
* NOTES
*
@@ -73,7 +73,7 @@ typedef struct _PrivateMemStruct
{
int id;
char *memptr;
} PrivateMem;
} PrivateMem;
PrivateMem IpcPrivateMem[16];
@@ -668,11 +668,11 @@ AttachSLockMemory(IPCKey key)
slockM = (struct ipcdummy *) IpcMemoryAttach(SLockMemoryId);
if (slockM == IpcMemAttachFailed)
elog(FATAL, "AttachSLockMemory: could not attach segment");
FreeSLockPP = (SLock **) & (slockM->free);
FreeSLockPP = (SLock **) &(slockM->free);
UnusedSLockIP = (int *) &(slockM->unused);
SLockMemoryLock = (slock_t *) & (slockM->memlock);
SLockMemoryLock = (slock_t *) &(slockM->memlock);
S_INIT_LOCK(SLockMemoryLock);
SLockArray = (SLock *) & (slockM->slocks[0]);
SLockArray = (SLock *) &(slockM->slocks[0]);
return;
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.23 1997/09/08 02:28:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.24 1997/09/08 21:47:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,24 +50,24 @@
* slock_t is defined as a struct mutex.
*/
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
mutex_lock(lock);
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
mutex_unlock(lock);
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
mutex_init(lock);
}
/* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */
int
S_LOCK_FREE(slock_t * lock)
S_LOCK_FREE(slock_t *lock)
{
/* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */
return (lock->lock == 0);
@@ -88,7 +88,7 @@ S_LOCK_FREE(slock_t * lock)
* for the R3000 chips out there.
*/
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
/* spin_lock(lock); */
while (!acquire_lock(lock))
@@ -96,20 +96,20 @@ S_LOCK(slock_t * lock)
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
release_lock(lock);
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
init_lock(lock);
}
/* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */
int
S_LOCK_FREE(slock_t * lock)
S_LOCK_FREE(slock_t *lock)
{
return (stat_lock(lock) == UNLOCKED);
}
@@ -127,26 +127,26 @@ S_LOCK_FREE(slock_t * lock)
#if defined(__alpha__) || defined(__alpha)
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
while (msem_lock(lock, MSEM_IF_NOWAIT) < 0)
;
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
msem_unlock(lock, 0);
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
msem_init(lock, MSEM_UNLOCKED);
}
int
S_LOCK_FREE(slock_t * lock)
S_LOCK_FREE(slock_t *lock)
{
return (lock->msem_state ? 0 : 1);
}
@@ -161,23 +161,23 @@ S_LOCK_FREE(slock_t * lock)
defined(sparc_solaris)
/* for xxxxx_solaris, this is defined in port/.../tas.s */
static int tas(slock_t * lock);
static int tas(slock_t *lock);
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
while (tas(lock))
;
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
*lock = 0;
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}
@@ -194,20 +194,20 @@ S_INIT_LOCK(slock_t * lock)
#if defined(aix)
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
while (cs((int *) lock, 0, 1))
;
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
*lock = 0;
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}
@@ -229,29 +229,29 @@ S_INIT_LOCK(slock_t * lock)
*/
static slock_t clear_lock = {-1, -1, -1, -1};
static int tas(slock_t * lock);
static int tas(slock_t *lock);
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
while (tas(lock))
;
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
*lock = clear_lock; /* struct assignment */
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}
int
S_LOCK_FREE(slock_t * lock)
S_LOCK_FREE(slock_t *lock)
{
register int *lock_word = (int *) (((long) lock + 15) & ~15);
@@ -266,22 +266,22 @@ S_LOCK_FREE(slock_t * lock)
#if defined(sun3)
static int tas(slock_t * lock);
static int tas(slock_t *lock);
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
while (tas(lock));
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
*lock = 0;
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}
@@ -320,7 +320,7 @@ tas_dummy()
#define asm(x) __asm__(x)
#endif
static int tas(slock_t * lock);
static int tas(slock_t *lock);
static int
tas_dummy()
@@ -386,7 +386,7 @@ S_INIT_LOCK(unsigned char *addr)
#if defined(NEED_I386_TAS_ASM)
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
slock_t res;
@@ -397,13 +397,13 @@ __asm__("xchgb %0,%1": "=q"(res), "=m"(*lock):"0"(0x1));
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
*lock = 0;
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}
@@ -414,7 +414,7 @@ S_INIT_LOCK(slock_t * lock)
#if defined(__alpha__) && defined(linux)
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
slock_t res;
@@ -437,14 +437,14 @@ __asm__(" ldq $0, %0 \n\
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
__asm__("mb");
*lock = 0;
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}
@@ -454,7 +454,7 @@ S_INIT_LOCK(slock_t * lock)
#if defined(linux) && defined(sparc)
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
slock_t res;
@@ -467,13 +467,13 @@ S_LOCK(slock_t * lock)
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
*lock = 0;
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}
@@ -502,20 +502,20 @@ success: \n\
}
void
S_LOCK(slock_t * lock)
S_LOCK(slock_t *lock)
{
while (tas(lock))
;
}
void
S_UNLOCK(slock_t * lock)
S_UNLOCK(slock_t *lock)
{
*lock = 0;
}
void
S_INIT_LOCK(slock_t * lock)
S_INIT_LOCK(slock_t *lock)
{
S_UNLOCK(lock);
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.12 1997/09/08 02:28:53 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.13 1997/09/08 21:47:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -342,7 +342,7 @@ HTAB *
ShmemInitHash(char *name, /* table string name for binding */
long init_size, /* initial size */
long max_size, /* max size of the table */
HASHCTL * infoP, /* info about key and bucket size */
HASHCTL *infoP, /* info about key and bucket size */
int hash_flags) /* info about infoP */
{
bool found;
@@ -400,7 +400,7 @@ ShmemInitHash(char *name, /* table string name for binding */
* locationPtr.
*/
bool
ShmemPIDLookup(int pid, SHMEM_OFFSET * locationPtr)
ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr)
{
BindingEnt *result,
item;
@@ -497,7 +497,7 @@ ShmemPIDDestroy(int pid)
* initialized).
*/
long *
ShmemInitStruct(char *name, unsigned long size, bool * foundPtr)
ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
{
BindingEnt *result,
item;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.5 1997/09/08 02:28:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.6 1997/09/08 21:47:10 momjian Exp $
*
* NOTES
*
@@ -39,7 +39,7 @@
* to itself
*/
void
SHMQueueInit(SHM_QUEUE * queue)
SHMQueueInit(SHM_QUEUE *queue)
{
Assert(SHM_PTR_VALID(queue));
(queue)->prev = (queue)->next = MAKE_OFFSET(queue);
@@ -51,7 +51,7 @@ SHMQueueInit(SHM_QUEUE * queue)
*/
#ifdef NOT_USED
bool
SHMQueueIsDetached(SHM_QUEUE * queue)
SHMQueueIsDetached(SHM_QUEUE *queue)
{
Assert(SHM_PTR_VALID(queue));
return ((queue)->prev == INVALID_OFFSET);
@@ -63,7 +63,7 @@ SHMQueueIsDetached(SHM_QUEUE * queue)
* SHMQueueElemInit -- clear an element's links
*/
void
SHMQueueElemInit(SHM_QUEUE * queue)
SHMQueueElemInit(SHM_QUEUE *queue)
{
Assert(SHM_PTR_VALID(queue));
(queue)->prev = (queue)->next = INVALID_OFFSET;
@@ -74,7 +74,7 @@ SHMQueueElemInit(SHM_QUEUE * queue)
* close the links
*/
void
SHMQueueDelete(SHM_QUEUE * queue)
SHMQueueDelete(SHM_QUEUE *queue)
{
SHM_QUEUE *nextElem = (SHM_QUEUE *) MAKE_PTR((queue)->next);
SHM_QUEUE *prevElem = (SHM_QUEUE *) MAKE_PTR((queue)->prev);
@@ -97,7 +97,7 @@ SHMQueueDelete(SHM_QUEUE * queue)
#ifdef SHMQUEUE_DEBUG
void
dumpQ(SHM_QUEUE * q, char *s)
dumpQ(SHM_QUEUE *q, char *s)
{
char elem[16];
char buf[1024];
@@ -152,7 +152,7 @@ dumpQ(SHM_QUEUE * q, char *s)
*/
#ifdef NOT_USED
void
SHMQueueInsertHD(SHM_QUEUE * queue, SHM_QUEUE * elem)
SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem)
{
SHM_QUEUE *prevPtr = (SHM_QUEUE *) MAKE_PTR((queue)->prev);
SHMEM_OFFSET elemOffset = MAKE_OFFSET(elem);
@@ -177,7 +177,7 @@ SHMQueueInsertHD(SHM_QUEUE * queue, SHM_QUEUE * elem)
#endif
void
SHMQueueInsertTL(SHM_QUEUE * queue, SHM_QUEUE * elem)
SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem)
{
SHM_QUEUE *nextPtr = (SHM_QUEUE *) MAKE_PTR((queue)->next);
SHMEM_OFFSET elemOffset = MAKE_OFFSET(elem);
@@ -222,7 +222,7 @@ SHMQueueInsertTL(SHM_QUEUE * queue, SHM_QUEUE * elem)
* next.
*/
void
SHMQueueFirst(SHM_QUEUE * queue, Pointer * nextPtrPtr, SHM_QUEUE * nextQueue)
SHMQueueFirst(SHM_QUEUE *queue, Pointer *nextPtrPtr, SHM_QUEUE *nextQueue)
{
SHM_QUEUE *elemPtr = (SHM_QUEUE *) MAKE_PTR((queue)->next);
@@ -243,7 +243,7 @@ SHMQueueFirst(SHM_QUEUE * queue, Pointer * nextPtrPtr, SHM_QUEUE * nextQueue)
* SHMQueueEmpty -- TRUE if queue head is only element, FALSE otherwise
*/
bool
SHMQueueEmpty(SHM_QUEUE * queue)
SHMQueueEmpty(SHM_QUEUE *queue)
{
Assert(SHM_PTR_VALID(queue));

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.7 1997/09/08 02:29:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.8 1997/09/08 21:47:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,9 +59,9 @@ IpcSemaphoreId SharedInvalidationSemaphore;
SISeg *shmInvalBuffer;
extern BackendId MyBackendId;
static void CleanupInvalidationState(int status, SISeg * segInOutP);
static BackendId SIAssignBackendId(SISeg * segInOutP, BackendTag backendTag);
static int SIGetNumEntries(SISeg * segP);
static void CleanupInvalidationState(int status, SISeg *segInOutP);
static BackendId SIAssignBackendId(SISeg *segInOutP, BackendTag backendTag);
static int SIGetNumEntries(SISeg *segP);
/************************************************************************/
/* SISetActiveProcess(segP, backendId) set the backend status active */
@@ -69,7 +69,7 @@ static int SIGetNumEntries(SISeg * segP);
/************************************************************************/
/* XXX I suspect that the segP parameter is extraneous. -hirohama */
static void
SISetActiveProcess(SISeg * segInOutP, BackendId backendId)
SISetActiveProcess(SISeg *segInOutP, BackendId backendId)
{
/* mark all messages as read */
@@ -83,7 +83,7 @@ SISetActiveProcess(SISeg * segInOutP, BackendId backendId)
/* SIBackendInit() initializes a backend to operate on the buffer */
/****************************************************************************/
int
SIBackendInit(SISeg * segInOutP)
SIBackendInit(SISeg *segInOutP)
{
LRelId LtCreateRelId();
TransactionId LMITransactionIdCopy();
@@ -109,7 +109,7 @@ SIBackendInit(SISeg * segInOutP)
* ----------------
*/
static BackendId
SIAssignBackendId(SISeg * segInOutP, BackendTag backendTag)
SIAssignBackendId(SISeg *segInOutP, BackendTag backendTag)
{
Index index;
ProcState *stateP;
@@ -180,7 +180,7 @@ SIAssignBackendId(SISeg * segInOutP, BackendTag backendTag)
/* should be called only by the postmaster when a backend died */
/************************************************************************/
static void
SISetDeadProcess(SISeg * segP, int backendId)
SISetDeadProcess(SISeg *segP, int backendId)
{
/* XXX call me.... */
@@ -197,7 +197,7 @@ SISetDeadProcess(SISeg * segP, int backendId)
*/
static void
CleanupInvalidationState(int status, /* XXX */
SISeg * segInOutP) /* XXX style */
SISeg *segInOutP) /* XXX style */
{
Assert(PointerIsValid(segInOutP));
@@ -237,7 +237,7 @@ SIComputeSize(int *segSize)
/* SISetStartEntrySection(segP, offset) - sets the offset */
/************************************************************************/
static void
SISetStartEntrySection(SISeg * segP, Offset offset)
SISetStartEntrySection(SISeg *segP, Offset offset)
{
segP->startEntrySection = offset;
}
@@ -246,7 +246,7 @@ SISetStartEntrySection(SISeg * segP, Offset offset)
/* SIGetStartEntrySection(segP) - returnss the offset */
/************************************************************************/
static Offset
SIGetStartEntrySection(SISeg * segP)
SIGetStartEntrySection(SISeg *segP)
{
return (segP->startEntrySection);
}
@@ -256,7 +256,7 @@ SIGetStartEntrySection(SISeg * segP)
/* SISetEndEntrySection(segP, offset) - sets the offset */
/************************************************************************/
static void
SISetEndEntrySection(SISeg * segP, Offset offset)
SISetEndEntrySection(SISeg *segP, Offset offset)
{
segP->endEntrySection = offset;
}
@@ -265,7 +265,7 @@ SISetEndEntrySection(SISeg * segP, Offset offset)
/* SISetEndEntryChain(segP, offset) - sets the offset */
/************************************************************************/
static void
SISetEndEntryChain(SISeg * segP, Offset offset)
SISetEndEntryChain(SISeg *segP, Offset offset)
{
segP->endEntryChain = offset;
}
@@ -274,7 +274,7 @@ SISetEndEntryChain(SISeg * segP, Offset offset)
/* SIGetEndEntryChain(segP) - returnss the offset */
/************************************************************************/
static Offset
SIGetEndEntryChain(SISeg * segP)
SIGetEndEntryChain(SISeg *segP)
{
return (segP->endEntryChain);
}
@@ -283,7 +283,7 @@ SIGetEndEntryChain(SISeg * segP)
/* SISetStartEntryChain(segP, offset) - sets the offset */
/************************************************************************/
static void
SISetStartEntryChain(SISeg * segP, Offset offset)
SISetStartEntryChain(SISeg *segP, Offset offset)
{
segP->startEntryChain = offset;
}
@@ -292,7 +292,7 @@ SISetStartEntryChain(SISeg * segP, Offset offset)
/* SIGetStartEntryChain(segP) - returns the offset */
/************************************************************************/
static Offset
SIGetStartEntryChain(SISeg * segP)
SIGetStartEntryChain(SISeg *segP)
{
return (segP->startEntryChain);
}
@@ -301,7 +301,7 @@ SIGetStartEntryChain(SISeg * segP)
/* SISetNumEntries(segP, num) sets the current nuber of entries */
/************************************************************************/
static bool
SISetNumEntries(SISeg * segP, int num)
SISetNumEntries(SISeg *segP, int num)
{
if (num <= MAXNUMMESSAGES)
{
@@ -318,7 +318,7 @@ SISetNumEntries(SISeg * segP, int num)
/* SIGetNumEntries(segP) - returns the current nuber of entries */
/************************************************************************/
static int
SIGetNumEntries(SISeg * segP)
SIGetNumEntries(SISeg *segP)
{
return (segP->numEntries);
}
@@ -328,7 +328,7 @@ SIGetNumEntries(SISeg * segP)
/* SISetMaxNumEntries(segP, num) sets the maximal number of entries */
/************************************************************************/
static bool
SISetMaxNumEntries(SISeg * segP, int num)
SISetMaxNumEntries(SISeg *segP, int num)
{
if (num <= MAXNUMMESSAGES)
{
@@ -346,7 +346,7 @@ SISetMaxNumEntries(SISeg * segP, int num)
/* SIGetProcStateLimit(segP, i) returns the limit of read messages */
/************************************************************************/
static int
SIGetProcStateLimit(SISeg * segP, int i)
SIGetProcStateLimit(SISeg *segP, int i)
{
return (segP->procState[i].limit);
}
@@ -355,7 +355,7 @@ SIGetProcStateLimit(SISeg * segP, int i)
/* SIIncNumEntries(segP, num) increments the current nuber of entries */
/************************************************************************/
static bool
SIIncNumEntries(SISeg * segP, int num)
SIIncNumEntries(SISeg *segP, int num)
{
if ((segP->numEntries + num) <= MAXNUMMESSAGES)
{
@@ -372,7 +372,7 @@ SIIncNumEntries(SISeg * segP, int num)
/* SIDecNumEntries(segP, num) decrements the current nuber of entries */
/************************************************************************/
static bool
SIDecNumEntries(SISeg * segP, int num)
SIDecNumEntries(SISeg *segP, int num)
{
if ((segP->numEntries - num) >= 0)
{
@@ -389,7 +389,7 @@ SIDecNumEntries(SISeg * segP, int num)
/* SISetStartFreeSpace(segP, offset) - sets the offset */
/************************************************************************/
static void
SISetStartFreeSpace(SISeg * segP, Offset offset)
SISetStartFreeSpace(SISeg *segP, Offset offset)
{
segP->startFreeSpace = offset;
}
@@ -398,7 +398,7 @@ SISetStartFreeSpace(SISeg * segP, Offset offset)
/* SIGetStartFreeSpace(segP) - returns the offset */
/************************************************************************/
static Offset
SIGetStartFreeSpace(SISeg * segP)
SIGetStartFreeSpace(SISeg *segP)
{
return (segP->startFreeSpace);
}
@@ -409,7 +409,7 @@ SIGetStartFreeSpace(SISeg * segP)
/* SIGetFirstDataEntry(segP) returns first data entry */
/************************************************************************/
static SISegEntry *
SIGetFirstDataEntry(SISeg * segP)
SIGetFirstDataEntry(SISeg *segP)
{
SISegEntry *eP;
Offset startChain;
@@ -430,7 +430,7 @@ SIGetFirstDataEntry(SISeg * segP)
/* SIGetLastDataEntry(segP) returns last data entry in the chain */
/************************************************************************/
static SISegEntry *
SIGetLastDataEntry(SISeg * segP)
SIGetLastDataEntry(SISeg *segP)
{
SISegEntry *eP;
Offset endChain;
@@ -450,7 +450,7 @@ SIGetLastDataEntry(SISeg * segP)
/* SIGetNextDataEntry(segP, offset) returns next data entry */
/************************************************************************/
static SISegEntry *
SIGetNextDataEntry(SISeg * segP, Offset offset)
SIGetNextDataEntry(SISeg *segP, Offset offset)
{
SISegEntry *eP;
@@ -468,7 +468,7 @@ SIGetNextDataEntry(SISeg * segP, Offset offset)
/* SIGetNthDataEntry(segP, n) returns the n-th data entry in chain */
/************************************************************************/
static SISegEntry *
SIGetNthDataEntry(SISeg * segP,
SIGetNthDataEntry(SISeg *segP,
int n) /* must range from 1 to MaxMessages */
{
SISegEntry *eP;
@@ -491,7 +491,7 @@ SIGetNthDataEntry(SISeg * segP,
/* SIEntryOffset(segP, entryP) returns the offset for an pointer */
/************************************************************************/
static Offset
SIEntryOffset(SISeg * segP, SISegEntry * entryP)
SIEntryOffset(SISeg *segP, SISegEntry *entryP)
{
/* relative to B !! */
return ((Offset) ((Pointer) entryP -
@@ -504,7 +504,7 @@ SIEntryOffset(SISeg * segP, SISegEntry * entryP)
/* SISetDataEntry(segP, data) - sets a message in the segemnt */
/************************************************************************/
bool
SISetDataEntry(SISeg * segP, SharedInvalidData * data)
SISetDataEntry(SISeg *segP, SharedInvalidData *data)
{
Offset offsetToNewData;
SISegEntry *eP,
@@ -543,7 +543,7 @@ SISetDataEntry(SISeg * segP, SharedInvalidData * data)
/* SIDecProcLimit(segP, num) decrements all process limits */
/************************************************************************/
static void
SIDecProcLimit(SISeg * segP, int num)
SIDecProcLimit(SISeg *segP, int num)
{
int i;
@@ -568,7 +568,7 @@ SIDecProcLimit(SISeg * segP, int num)
/* SIDelDataEntry(segP) - free the FIRST entry */
/************************************************************************/
bool
SIDelDataEntry(SISeg * segP)
SIDelDataEntry(SISeg *segP)
{
SISegEntry *e1P;
@@ -600,7 +600,7 @@ SIDelDataEntry(SISeg * segP)
/* invalid */
/************************************************************************/
void
SISetProcStateInvalid(SISeg * segP)
SISetProcStateInvalid(SISeg *segP)
{
int i;
@@ -625,7 +625,7 @@ SISetProcStateInvalid(SISeg * segP)
/* and executes function */
/************************************************************************/
void
SIReadEntryData(SISeg * segP,
SIReadEntryData(SISeg *segP,
int backendId,
void (*invalFunction) (),
void (*resetFunction) ())
@@ -673,7 +673,7 @@ SIReadEntryData(SISeg * segP,
/* SIDelExpiredDataEntries (segP) - removes irrelevant messages */
/************************************************************************/
void
SIDelExpiredDataEntries(SISeg * segP)
SIDelExpiredDataEntries(SISeg *segP)
{
int min,
i,
@@ -709,7 +709,7 @@ SIDelExpiredDataEntries(SISeg * segP)
/* SISegInit(segP) - initializes the segment */
/************************************************************************/
static void
SISegInit(SISeg * segP)
SISegInit(SISeg *segP)
{
SISegOffsets *oP;
int segSize,

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.16 1997/09/08 20:56:50 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.17 1997/09/08 21:47:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,14 +64,14 @@
/* non-export function prototypes */
static HeapTuple
inv_newtuple(LargeObjectDesc * obj_desc, Buffer buffer,
inv_newtuple(LargeObjectDesc *obj_desc, Buffer buffer,
Page page, char *dbuf, int nwrite);
static HeapTuple inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP);
static int inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes);
static HeapTuple inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *bufP);
static int inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes);
static int
inv_wrold(LargeObjectDesc * obj_desc, char *dbuf, int nbytes,
inv_wrold(LargeObjectDesc *obj_desc, char *dbuf, int nbytes,
HeapTuple htup, Buffer buffer);
static void inv_indextup(LargeObjectDesc * obj_desc, HeapTuple htup);
static void inv_indextup(LargeObjectDesc *obj_desc, HeapTuple htup);
static int _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln);
/*
@@ -267,7 +267,7 @@ inv_open(Oid lobjId, int flags)
* Closes an existing large object descriptor.
*/
void
inv_close(LargeObjectDesc * obj_desc)
inv_close(LargeObjectDesc *obj_desc)
{
Assert(PointerIsValid(obj_desc));
@@ -313,7 +313,7 @@ inv_destroy(Oid lobjId)
*/
#ifdef NOT_USED
int
inv_stat(LargeObjectDesc * obj_desc, struct pgstat * stbuf)
inv_stat(LargeObjectDesc *obj_desc, struct pgstat * stbuf)
{
Assert(PointerIsValid(obj_desc));
Assert(stbuf != NULL);
@@ -346,7 +346,7 @@ inv_stat(LargeObjectDesc * obj_desc, struct pgstat * stbuf)
#endif
int
inv_seek(LargeObjectDesc * obj_desc, int offset, int whence)
inv_seek(LargeObjectDesc *obj_desc, int offset, int whence)
{
int oldOffset;
Datum d;
@@ -423,7 +423,7 @@ inv_seek(LargeObjectDesc * obj_desc, int offset, int whence)
}
int
inv_tell(LargeObjectDesc * obj_desc)
inv_tell(LargeObjectDesc *obj_desc)
{
Assert(PointerIsValid(obj_desc));
@@ -431,7 +431,7 @@ inv_tell(LargeObjectDesc * obj_desc)
}
int
inv_read(LargeObjectDesc * obj_desc, char *buf, int nbytes)
inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes)
{
HeapTuple htup;
Buffer b;
@@ -495,7 +495,7 @@ inv_read(LargeObjectDesc * obj_desc, char *buf, int nbytes)
}
int
inv_write(LargeObjectDesc * obj_desc, char *buf, int nbytes)
inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
{
HeapTuple htup;
Buffer b;
@@ -576,7 +576,7 @@ inv_write(LargeObjectDesc * obj_desc, char *buf, int nbytes)
* such tuple exists.
*/
static HeapTuple
inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP)
inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *bufP)
{
HeapTuple htup;
RetrieveIndexResult res;
@@ -691,7 +691,7 @@ inv_fetchtup(LargeObjectDesc * obj_desc, Buffer *bufP)
* number of bytes actually written to the new tuple.
*/
static int
inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes)
inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes)
{
Relation hr;
HeapTuple ntup;
@@ -762,7 +762,7 @@ inv_wrnew(LargeObjectDesc * obj_desc, char *buf, int nbytes)
}
static int
inv_wrold(LargeObjectDesc * obj_desc,
inv_wrold(LargeObjectDesc *obj_desc,
char *dbuf,
int nbytes,
HeapTuple htup,
@@ -939,7 +939,7 @@ inv_wrold(LargeObjectDesc * obj_desc,
}
static HeapTuple
inv_newtuple(LargeObjectDesc * obj_desc,
inv_newtuple(LargeObjectDesc *obj_desc,
Buffer buffer,
Page page,
char *dbuf,
@@ -1061,7 +1061,7 @@ inv_newtuple(LargeObjectDesc * obj_desc,
}
static void
inv_indextup(LargeObjectDesc * obj_desc, HeapTuple htup)
inv_indextup(LargeObjectDesc *obj_desc, HeapTuple htup)
{
InsertIndexResult res;
Datum v[1];

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.7 1997/09/08 02:29:10 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.8 1997/09/08 21:47:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,7 +48,7 @@
#include "storage/bufmgr.h"
#include "access/transam.h" /* for AmiTransactionId */
static void LRelIdAssign(LRelId * lRelId, Oid dbId, Oid relId);
static void LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId);
/* ----------------
*
@@ -166,7 +166,7 @@ bool
DatabaseIdIsMyDatabaseId(Oid databaseId)
{
return (bool)
(!OidIsValid(databaseId) || databaseId == MyDatabaseId);
(!OidIsValid(databaseId) || databaseId == MyDatabaseId);
}
#endif
@@ -180,7 +180,7 @@ bool
LRelIdContainsMyDatabaseId(LRelId lRelId)
{
return (bool)
(!OidIsValid(lRelId.dbId) || lRelId.dbId == MyDatabaseId);
(!OidIsValid(lRelId.dbId) || lRelId.dbId == MyDatabaseId);
}
#endif
@@ -960,7 +960,7 @@ RelationUnsetLockForExtend(Relation relation)
* Create an LRelid --- Why not just pass in a pointer to the storage?
*/
static void
LRelIdAssign(LRelId * lRelId, Oid dbId, Oid relId)
LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId)
{
lRelId->dbId = dbId;
lRelId->relId = relId;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.13 1997/09/08 02:29:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.14 1997/09/08 21:47:26 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -49,7 +49,7 @@
#include "access/transam.h"
static int
WaitOnLock(LOCKTAB * ltable, LockTableId tableId, LOCK * lock,
WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock,
LOCKT lockt);
/*#define LOCK_MGR_DEBUG*/
@@ -194,8 +194,8 @@ LockDisable(int status)
* Notes: just copying. Should only be called once.
*/
static void
LockTypeInit(LOCKTAB * ltable,
MASK * conflictsP,
LockTypeInit(LOCKTAB *ltable,
MASK *conflictsP,
int *prioP,
int ntypes)
{
@@ -222,7 +222,7 @@ LockTypeInit(LOCKTAB * ltable,
*/
LockTableId
LockTabInit(char *tabName,
MASK * conflictsP,
MASK *conflictsP,
int *prioP,
int ntypes)
{
@@ -452,7 +452,7 @@ LockTabRename(LockTableId tableId)
#endif
*/
bool
LockAcquire(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
LockAcquire(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
{
XIDLookupEnt *result,
item;
@@ -559,7 +559,7 @@ LockAcquire(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
}
#endif
result = (XIDLookupEnt *) hash_search(xidTable, (Pointer) & item, HASH_ENTER, &found);
result = (XIDLookupEnt *) hash_search(xidTable, (Pointer) &item, HASH_ENTER, &found);
if (!result)
{
elog(NOTICE, "LockAcquire: xid table corrupted");
@@ -619,7 +619,7 @@ LockAcquire(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
if (!result->nHolding)
{
SHMQueueDelete(&result->queue);
hash_search(xidTable, (Pointer) & item, HASH_REMOVE, &found);
hash_search(xidTable, (Pointer) &item, HASH_REMOVE, &found);
}
lock->nHolding--;
lock->holders[lockt]--;
@@ -656,8 +656,8 @@ LockAcquire(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
* ----------------------------
*/
int
LockResolveConflicts(LOCKTAB * ltable,
LOCK * lock,
LockResolveConflicts(LOCKTAB *ltable,
LOCK *lock,
LOCKT lockt,
TransactionId xid)
{
@@ -690,7 +690,7 @@ LockResolveConflicts(LOCKTAB * ltable,
#endif
if (!(result = (XIDLookupEnt *)
hash_search(xidTable, (Pointer) & item, HASH_ENTER, &found)))
hash_search(xidTable, (Pointer) &item, HASH_ENTER, &found)))
{
elog(NOTICE, "LockResolveConflicts: xid table corrupted");
return (STATUS_ERROR);
@@ -770,7 +770,7 @@ LockResolveConflicts(LOCKTAB * ltable,
}
static int
WaitOnLock(LOCKTAB * ltable, LockTableId tableId, LOCK * lock, LOCKT lockt)
WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock, LOCKT lockt)
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
@@ -819,7 +819,7 @@ WaitOnLock(LOCKTAB * ltable, LockTableId tableId, LOCK * lock, LOCKT lockt)
* come along and request the lock).
*/
bool
LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
{
LOCK *lock = NULL;
SPINLOCK masterLock;
@@ -935,7 +935,7 @@ LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
*/
Assert(ltable->lockHash->hash == tag_hash);
lock = (LOCK *) hash_search(ltable->lockHash,
(Pointer) & (lock->tag),
(Pointer) &(lock->tag),
HASH_REMOVE_SAVED,
&found);
Assert(lock && found);
@@ -971,7 +971,7 @@ LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
#endif
if (!(result = (XIDLookupEnt *) hash_search(xidTable,
(Pointer) & item,
(Pointer) &item,
HASH_FIND_SAVE,
&found))
|| !found)
@@ -1020,7 +1020,7 @@ LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
if (result->queue.next != INVALID_OFFSET)
SHMQueueDelete(&result->queue);
if (!(result = (XIDLookupEnt *)
hash_search(xidTable, (Pointer) & item, HASH_REMOVE_SAVED, &found)) ||
hash_search(xidTable, (Pointer) &item, HASH_REMOVE_SAVED, &found)) ||
!found)
{
SpinRelease(masterLock);
@@ -1062,7 +1062,7 @@ LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
*/
Assert(ltable->lockHash->hash == tag_hash);
lock = (LOCK *) hash_search(ltable->lockHash,
(Pointer) & (lock->tag),
(Pointer) &(lock->tag),
HASH_REMOVE,
&found);
Assert(lock && found);
@@ -1103,7 +1103,7 @@ LockRelease(LockTableId tableId, LOCKTAG * lockName, LOCKT lockt)
* the new lock holder.
*/
void
GrantLock(LOCK * lock, LOCKT lockt)
GrantLock(LOCK *lock, LOCKT lockt)
{
lock->nActive++;
lock->activeHolders[lockt]++;
@@ -1123,7 +1123,7 @@ GrantLock(LOCK * lock, LOCKT lockt)
*/
#endif
bool
LockReleaseAll(LockTableId tableId, SHM_QUEUE * lockQueue)
LockReleaseAll(LockTableId tableId, SHM_QUEUE *lockQueue)
{
PROC_QUEUE *waitQueue;
int done;
@@ -1168,7 +1168,7 @@ LockReleaseAll(LockTableId tableId, SHM_QUEUE * lockQueue)
#ifdef USER_LOCKS
SpinAcquire(masterLock);
#endif
SHMQueueFirst(lockQueue, (Pointer *) & xidLook, &xidLook->queue);
SHMQueueFirst(lockQueue, (Pointer *) &xidLook, &xidLook->queue);
XID_PRINT("LockReleaseAll", xidLook);
@@ -1312,7 +1312,7 @@ LockReleaseAll(LockTableId tableId, SHM_QUEUE * lockQueue)
Assert(ltable->lockHash->hash == tag_hash);
lock = (LOCK *)
hash_search(ltable->lockHash, (Pointer) & (lock->tag), HASH_REMOVE, &found);
hash_search(ltable->lockHash, (Pointer) &(lock->tag), HASH_REMOVE, &found);
if ((!lock) || (!found))
{
SpinRelease(masterLock);
@@ -1341,7 +1341,7 @@ next_item:
#endif
if (done)
break;
SHMQueueFirst(&xidLook->queue, (Pointer *) & tmp, &tmp->queue);
SHMQueueFirst(&xidLook->queue, (Pointer *) &tmp, &tmp->queue);
xidLook = tmp;
}
SpinRelease(masterLock);
@@ -1444,7 +1444,7 @@ DumpLocks()
if (SHMQueueEmpty(lockQueue))
return;
SHMQueueFirst(lockQueue, (Pointer *) & xidLook, &xidLook->queue);
SHMQueueFirst(lockQueue, (Pointer *) &xidLook, &xidLook->queue);
end = MAKE_OFFSET(lockQueue);
LOCK_DUMP("DumpLocks", MyProc->waitLock, 0);
@@ -1471,7 +1471,7 @@ DumpLocks()
if (done)
break;
SHMQueueFirst(&xidLook->queue, (Pointer *) & tmp, &tmp->queue);
SHMQueueFirst(&xidLook->queue, (Pointer *) &tmp, &tmp->queue);
xidLook = tmp;
}
}

View File

@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.6 1997/09/08 02:29:16 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.7 1997/09/08 21:47:29 momjian Exp $
*
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
@@ -30,10 +30,10 @@
#include "miscadmin.h" /* MyDatabaseId */
static bool
MultiAcquire(LockTableId tableId, LOCKTAG * tag, LOCKT lockt,
MultiAcquire(LockTableId tableId, LOCKTAG *tag, LOCKT lockt,
LOCK_LEVEL level);
static bool
MultiRelease(LockTableId tableId, LOCKTAG * tag, LOCKT lockt,
MultiRelease(LockTableId tableId, LOCKTAG *tag, LOCKT lockt,
LOCK_LEVEL level);
/*
@@ -199,7 +199,7 @@ MultiLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt)
*/
static bool
MultiAcquire(LockTableId tableId,
LOCKTAG * tag,
LOCKTAG *tag,
LOCKT lockt,
LOCK_LEVEL level)
{
@@ -359,7 +359,7 @@ MultiReleaseReln(LockInfo linfo, LOCKT lockt)
*/
static bool
MultiRelease(LockTableId tableId,
LOCKTAG * tag,
LOCKTAG *tag,
LOCKT lockt,
LOCK_LEVEL level)
{

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.20 1997/09/08 02:29:17 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.21 1997/09/08 21:47:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,7 +46,7 @@
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
*
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.20 1997/09/08 02:29:17 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.21 1997/09/08 21:47:30 momjian Exp $
*/
#include <sys/time.h>
#include <unistd.h>
@@ -77,7 +77,7 @@
#include "storage/proc.h"
static void HandleDeadLock(int sig);
static PROC *ProcWakeup(PROC * proc, int errType);
static PROC *ProcWakeup(PROC *proc, int errType);
/*
* timeout (in seconds) for resolving possible deadlock
@@ -106,7 +106,7 @@ static PROC_HDR *ProcGlobal = NULL;
PROC *MyProc = NULL;
static void ProcKill(int exitStatus, int pid);
static void ProcGetNewSemKeyAndNum(IPCKey * key, int *semNum);
static void ProcGetNewSemKeyAndNum(IPCKey *key, int *semNum);
static void ProcFreeSem(IpcSemaphoreKey semKey, int semNum);
/*
@@ -441,7 +441,7 @@ ProcQueueAlloc(char *name)
* ProcQueueInit -- initialize a shared memory process queue
*/
void
ProcQueueInit(PROC_QUEUE * queue)
ProcQueueInit(PROC_QUEUE *queue)
{
SHMQueueInit(&(queue->links));
queue->size = 0;
@@ -462,11 +462,11 @@ ProcQueueInit(PROC_QUEUE * queue)
* NOTES: The process queue is now a priority queue for locking.
*/
int
ProcSleep(PROC_QUEUE * queue,
ProcSleep(PROC_QUEUE *queue,
SPINLOCK spinlock,
int token,
int prio,
LOCK * lock)
LOCK *lock)
{
int i;
PROC *proc;
@@ -556,7 +556,7 @@ ProcSleep(PROC_QUEUE * queue,
* RETURN: the next process in the wait queue.
*/
static PROC *
ProcWakeup(PROC * proc, int errType)
ProcWakeup(PROC *proc, int errType)
{
PROC *retProc;
@@ -597,7 +597,7 @@ ProcGetId()
* released.
*/
int
ProcLockWakeup(PROC_QUEUE * queue, char *ltable, char *lock)
ProcLockWakeup(PROC_QUEUE *queue, char *ltable, char *lock)
{
PROC *proc;
int count;
@@ -642,7 +642,7 @@ ProcLockWakeup(PROC_QUEUE * queue, char *ltable, char *lock)
}
void
ProcAddLock(SHM_QUEUE * elem)
ProcAddLock(SHM_QUEUE *elem)
{
SHMQueueInsertTL(&MyProc->lockQueue, elem);
}
@@ -741,7 +741,7 @@ HandleDeadLock(int sig)
}
void
ProcReleaseSpins(PROC * proc)
ProcReleaseSpins(PROC *proc)
{
int i;
@@ -772,7 +772,7 @@ ProcReleaseSpins(PROC * proc)
* semaphore set.)
*/
static void
ProcGetNewSemKeyAndNum(IPCKey * key, int *semNum)
ProcGetNewSemKeyAndNum(IPCKey *key, int *semNum)
{
int i;
int32 *freeSemMap = ProcGlobal->freeSemMap;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.20 1997/09/08 02:29:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.21 1997/09/08 21:47:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,7 +48,7 @@ typedef struct _MdfdVec
int mdfd_lstbcnt; /* most recent block count */
int mdfd_nextFree; /* next free vector */
struct _MdfdVec *mdfd_chain;/* for large relations */
} MdfdVec;
} MdfdVec;
static int Nfds = 100;
static MdfdVec *Md_fdvec = (MdfdVec *) NULL;

View File

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.10 1997/09/08 02:29:36 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.11 1997/09/08 21:47:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,7 +42,7 @@ typedef struct f_smgr
int (*smgr_truncate) ();
int (*smgr_commit) (); /* may be NULL */
int (*smgr_abort) (); /* may be NULL */
} f_smgr;
} f_smgr;
/*
* The weird placement of commas in this init block is to keep the compiler

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.4 1997/09/08 02:29:37 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.5 1997/09/08 21:47:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,7 +21,7 @@
typedef struct smgrid
{
char *smgr_name;
} smgrid;
} smgrid;
/*
* StorageManager[] -- List of defined storage managers.