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

Make functions static where possible, enclose unused functions in #ifdef NOT_USED.

This commit is contained in:
Bruce Momjian
1997-08-19 21:40:56 +00:00
parent b992e200b8
commit 1d8bbfd2e7
186 changed files with 1114 additions and 1048 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.3 1996/11/03 04:56:59 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.4 1997/08/19 21:32:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -153,6 +153,7 @@ BufTableInsert(BufferDesc *buf)
}
/* prints out collision stats for the buf table */
#ifdef NOT_USED
void
DBG_LookupListCheck(int nlookup)
{
@@ -160,3 +161,4 @@ DBG_LookupListCheck(int nlookup)
hash_stats("Shared",SharedBufHash);
}
#endif

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.18 1997/08/18 20:53:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.19 1997/08/19 21:32:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,12 +30,6 @@
*
* WriteBuffer() -- WriteNoReleaseBuffer() + ReleaseBuffer()
*
* DirtyBufferCopy() -- For a given dbid/relid/blockno, if the buffer is
* in the cache and is dirty, mark it clean and copy
* it to the requested location. This is a logical
* write, and has been installed to support the cache
* management code for write-once storage managers.
*
* FlushBuffer() -- as above but never delayed write.
*
* BufferSync() -- flush all dirty buffers in the buffer pool.
@@ -169,6 +163,7 @@ ReadBuffer(Relation reln, BlockNumber blockNum)
*
* XXX caller must have already acquired BufMgrLock
*/
#ifdef NOT_USED
static bool
is_userbuffer(Buffer buffer)
{
@@ -178,7 +173,9 @@ is_userbuffer(Buffer buffer)
return false;
return true;
}
#endif
#ifdef NOT_USED
Buffer
ReadBuffer_Debug(char *file,
int line,
@@ -198,6 +195,7 @@ refcount = %ld, file: %s, line: %d\n",
}
return buffer;
}
#endif
/*
* ReadBufferWithBufferLock -- does the work of
@@ -669,6 +667,7 @@ WriteBuffer(Buffer buffer)
return(TRUE);
}
#ifdef NOT_USED
void
WriteBuffer_Debug(char *file, int line, Buffer buffer)
{
@@ -682,8 +681,15 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line);
}
}
#endif
/*
* DirtyBufferCopy() -- For a given dbid/relid/blockno, if the buffer is
* in the cache and is dirty, mark it clean and copy
* it to the requested location. This is a logical
* write, and has been installed to support the cache
* management code for write-once storage managers.
*
* DirtyBufferCopy() -- Copy a given dirty buffer to the requested
* destination.
*
@@ -695,6 +701,7 @@ refcount = %ld, file: %s, line: %d\n",
*
* NOTE: used by sony jukebox code in postgres 4.2 - ay 2/95
*/
#ifdef NOT_USED
void
DirtyBufferCopy(Oid dbid, Oid relid, BlockNumber blkno, char *dest)
{
@@ -722,6 +729,7 @@ DirtyBufferCopy(Oid dbid, Oid relid, BlockNumber blkno, char *dest)
SpinRelease(BufMgrLock);
}
#endif
/*
* FlushBuffer -- like WriteBuffer, but force the page to disk.
@@ -1462,6 +1470,7 @@ blockNum=%d, flags=0x%x, refcount=%d %d)\n",
* pool and start measuring some performance with a clean empty buffer
* pool.
*/
#ifdef NOT_USED
void
BufferPoolBlowaway()
{
@@ -1476,6 +1485,7 @@ BufferPoolBlowaway()
BufTableDelete(&BufferDescriptors[i-1]);
}
}
#endif
#undef IncrBufferRefCount
#undef ReleaseBuffer
@@ -1535,6 +1545,7 @@ ReleaseBuffer(Buffer buffer)
return(STATUS_OK);
}
#ifdef NOT_USED
void
IncrBufferRefCount_Debug(char *file, int line, Buffer buffer)
{
@@ -1548,7 +1559,9 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line);
}
}
#endif
#ifdef NOT_USED
void
ReleaseBuffer_Debug(char *file, int line, Buffer buffer)
{
@@ -1562,7 +1575,9 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line);
}
}
#endif
#ifdef NOT_USED
int
ReleaseAndReadBuffer_Debug(char *file,
int line,
@@ -1594,6 +1609,7 @@ refcount = %ld, file: %s, line: %d\n",
}
return b;
}
#endif
#ifdef BMTRACE

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.3 1996/11/10 03:02:16 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.4 1997/08/19 21:32:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -109,6 +109,7 @@ PinBuffer(BufferDesc *buf)
PrivateRefCount[b]++;
}
#ifdef NOT_USED
void
PinBuffer_Debug(char *file, int line, BufferDesc *buf)
{
@@ -122,6 +123,7 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line);
}
}
#endif
#undef UnpinBuffer
@@ -148,6 +150,7 @@ UnpinBuffer(BufferDesc *buf)
}
}
#ifdef NOT_USED
void
UnpinBuffer_Debug(char *file, int line, BufferDesc *buf)
{
@@ -161,6 +164,7 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line);
}
}
#endif
/*
* GetFreeBuffer() -- get the 'next' buffer from the freelist.
@@ -222,6 +226,7 @@ InitFreeList(bool init)
/*
* print out the free list and check for breaks.
*/
#ifdef NOT_USED
void
DBG_FreeListCheck(int nfree)
{
@@ -256,6 +261,7 @@ DBG_FreeListCheck(int nfree)
}
}
#endif
#ifdef NOT_USED
/*

View File

@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Id: fd.c,v 1.21 1997/08/18 02:14:50 momjian Exp $
* $Id: fd.c,v 1.22 1997/08/19 21:32:48 momjian Exp $
*
* NOTES:
*
@@ -503,6 +503,7 @@ FileAccess(File file)
/*
* Called when we get a shared invalidation message on some relation.
*/
#ifdef NOT_USED
void
FileInvalidate(File file)
{
@@ -511,6 +512,7 @@ FileInvalidate(File file)
LruDelete(file);
}
}
#endif
/* VARARGS2 */
static File
@@ -735,6 +737,7 @@ FileSeek(File file, long offset, int whence)
/*
* XXX not actually used but here for completeness
*/
#ifdef NOT_USED
long
FileTell(File file)
{
@@ -742,6 +745,7 @@ FileTell(File file)
file, VfdCache[file].fileName));
return VfdCache[file].seekPos;
}
#endif
int
FileTruncate(File file, int offset)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.10 1997/01/08 08:32:01 bryanh Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.11 1997/08/19 21:32:54 momjian Exp $
*
* NOTES
*
@@ -49,6 +49,8 @@ int UsePrivateMemory = 1;
int UsePrivateMemory = 0;
#endif
static void IpcMemoryDetach(int status, char *shmaddr);
/* ----------------------------------------------------------------
* exit() handling stuff
* ----------------------------------------------------------------
@@ -312,6 +314,7 @@ IpcSemaphoreCreate(IpcSemaphoreKey semKey,
/* */
/* note: the xxx_return variables are only used for debugging. */
/****************************************************************************/
#ifdef NOT_USED
static int IpcSemaphoreSet_return;
void
@@ -330,6 +333,7 @@ IpcSemaphoreSet(int semId, int semno, int value)
IpcConfigTip();
}
}
#endif
/****************************************************************************/
/* IpcSemaphoreKill(key) - removes a semaphore */
@@ -513,7 +517,7 @@ IpcMemoryIdGet(IpcMemoryKey memKey, uint32 size)
/* from a backend address space */
/* (only called by backends running under the postmaster) */
/****************************************************************************/
void
static void
IpcMemoryDetach(int status, char *shmaddr)
{
if (shmdt(shmaddr) < 0) {

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.17 1997/08/17 02:39:54 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.18 1997/08/19 21:33:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,9 +45,9 @@
#if defined(HAS_TEST_AND_SET)
# if defined(__alpha__) && defined(linux)
extern long int tas(slock_t *lock);
static long int tas(slock_t *lock);
# else
extern int tas(slock_t *lock);
static int tas(slock_t *lock);
#endif
#if defined (nextstep)
@@ -383,7 +383,7 @@ S_INIT_LOCK(unsigned char *addr)
#if defined(NEED_I386_TAS_ASM)
int
static int
tas(slock_t *m)
{
slock_t res;
@@ -415,7 +415,7 @@ S_INIT_LOCK(slock_t *lock)
#if defined(__alpha__) && defined(linux)
long int
static long int
tas(slock_t *m)
{
slock_t res;
@@ -459,7 +459,7 @@ S_INIT_LOCK(slock_t *lock)
#if defined(linux) && defined(sparc)
int
static int
tas(slock_t *m)
{
slock_t res;
@@ -492,7 +492,7 @@ S_INIT_LOCK(slock_t *lock)
#if defined(NEED_NS32K_TAS_ASM)
int
static int
tas(slock_t *m)
{
slock_t res = 0;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.2 1996/11/03 05:06:58 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.3 1997/08/19 21:33:06 momjian Exp $
*
* NOTES
*
@@ -49,12 +49,14 @@ SHMQueueInit(SHM_QUEUE *queue)
* SHMQueueIsDetached -- TRUE if element is not currently
* in a queue.
*/
#ifdef NOT_USED
bool
SHMQueueIsDetached(SHM_QUEUE *queue)
{
Assert(SHM_PTR_VALID(queue));
return ((queue)->prev == INVALID_OFFSET);
}
#endif
/*
* SHMQueueElemInit -- clear an element's links
@@ -146,6 +148,7 @@ dumpQ(SHM_QUEUE *q, char *s)
* SHMQueueInsertHD -- put elem in queue between the queue head
* and its "prev" element.
*/
#ifdef NOT_USED
void
SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem)
{
@@ -168,6 +171,7 @@ SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem)
dumpQ(queue, "in SHMQueueInsertHD: end");
#endif /* SHMQUEUE_DEBUG_HD */
}
#endif
void
SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.4 1997/01/14 01:53:11 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.5 1997/08/19 21:33:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,13 +48,6 @@ CreateSpinlocks(IPCKey key)
return(TRUE);
}
bool
AttachSpinLocks(IPCKey key)
{
/* the spin lock shared memory must have been attached by now */
return(TRUE);
}
bool
InitSpinLocks(int init, IPCKey key)
{
@@ -100,16 +93,26 @@ SpinRelease(SPINLOCK lock)
ExclusiveUnlock(lock);
}
bool
#else /* HAS_TEST_AND_SET */
/* Spinlocks are implemented using SysV semaphores */
static bool AttachSpinLocks(IPCKey key);
static bool SpinIsLocked(SPINLOCK lock);
static bool
AttachSpinLocks(IPCKey key)
{
/* the spin lock shared memory must have been attached by now */
return(TRUE);
}
static bool
SpinIsLocked(SPINLOCK lock)
{
return(!LockIsFree(lock));
}
#else /* HAS_TEST_AND_SET */
/* Spinlocks are implemented using SysV semaphores */
/*
* SpinAcquire -- try to grab a spinlock
*
@@ -135,7 +138,7 @@ SpinRelease(SPINLOCK lock)
IpcSemaphoreUnlock(SpinLockId, lock, IpcExclusiveLock);
}
bool
static bool
SpinIsLocked(SPINLOCK lock)
{
int semval;
@@ -176,7 +179,7 @@ CreateSpinlocks(IPCKey key)
/*
* Attach to existing spinlock set
*/
bool
static bool
AttachSpinLocks(IPCKey key)
{
IpcSemaphoreId id;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.12 1997/08/12 22:54:04 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.13 1997/08/19 21:33:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -296,6 +296,7 @@ inv_destroy(Oid lobjId)
* updated so frequently, and postgres only appends tuples at the
* end of relations. Once clustering works, we should fix this.
*/
#ifdef NOT_USED
int
inv_stat(LargeObjectDesc *obj_desc, struct pgstat *stbuf)
{
@@ -325,6 +326,7 @@ inv_stat(LargeObjectDesc *obj_desc, struct pgstat *stbuf)
return (0);
}
#endif
int
inv_seek(LargeObjectDesc *obj_desc, int offset, int whence)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.4 1997/01/10 20:18:47 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.5 1997/08/19 21:33:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,6 +48,8 @@
#include "storage/bufmgr.h"
#include "access/transam.h" /* for AmiTransactionId */
static void LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId);
/* ----------------
*
* ----------------
@@ -134,12 +136,13 @@ RelationGetLRelId(Relation relation)
* after it is created.
* ----------------
*/
#ifdef NOT_USED
Oid
LRelIdGetDatabaseId(LRelId lRelId)
{
return (lRelId.dbId);
}
#endif
/*
* LRelIdGetRelationId --
@@ -155,23 +158,27 @@ LRelIdGetRelationId(LRelId lRelId)
* DatabaseIdIsMyDatabaseId --
* True iff database object identifier is valid in my present database.
*/
#ifdef NOT_USED
bool
DatabaseIdIsMyDatabaseId(Oid databaseId)
{
return (bool)
(!OidIsValid(databaseId) || databaseId == MyDatabaseId);
}
#endif
/*
* LRelIdContainsMyDatabaseId --
* True iff "lock" relation identifier is valid in my present database.
*/
#ifdef NOT_USED
bool
LRelIdContainsMyDatabaseId(LRelId lRelId)
{
return (bool)
(!OidIsValid(lRelId.dbId) || lRelId.dbId == MyDatabaseId);
}
#endif
/*
* RelationInitLockInfo --
@@ -285,6 +292,7 @@ elog(DEBUG, "DiscardLockInfo: NULL relation->lockInfo")
* RelationDiscardLockInfo --
* Discards the lock information in a relation descriptor.
*/
#ifdef NOT_USED
void
RelationDiscardLockInfo(Relation relation)
{
@@ -296,6 +304,7 @@ RelationDiscardLockInfo(Relation relation)
pfree(relation->lockInfo);
relation->lockInfo = NULL;
}
#endif
/*
* RelationSetLockForDescriptorOpen --
@@ -537,6 +546,7 @@ elog(DEBUG, "RelationSetLockForTupleRead(%s[%d,%d], 0x%x) called", \
* RelationSetLockForTupleRead --
* Sets tuple level read lock.
*/
#ifdef NOT_USED
void
RelationSetLockForTupleRead(Relation relation, ItemPointer itemPointer)
{
@@ -625,6 +635,7 @@ RelationSetLockForTupleRead(Relation relation, ItemPointer itemPointer)
*/
MultiLockTuple(linfo, itemPointer, READ_LOCK);
}
#endif
/* ----------------
* RelationSetLockForReadPage
@@ -890,6 +901,7 @@ RelationUnsetWIntentLock(Relation relation)
* a WORM disk jukebox. Sometimes need exclusive access to extend a
* file by a block.
*/
#ifdef NOT_USED
void
RelationSetLockForExtend(Relation relation)
{
@@ -906,7 +918,9 @@ RelationSetLockForExtend(Relation relation)
MultiLockReln((LockInfo) relation->lockInfo, EXTEND_LOCK);
}
#endif
#ifdef NOT_USED
void
RelationUnsetLockForExtend(Relation relation)
{
@@ -923,11 +937,12 @@ RelationUnsetLockForExtend(Relation relation)
MultiReleaseReln((LockInfo) relation->lockInfo, EXTEND_LOCK);
}
#endif
/*
* Create an LRelid --- Why not just pass in a pointer to the storage?
*/
void
static void
LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId)
{
lRelId->dbId = dbId;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.10 1997/08/12 22:54:07 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.11 1997/08/19 21:33:19 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -48,6 +48,9 @@
#include "access/xact.h"
#include "access/transam.h"
static int WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock,
LOCKT lockt);
/*#define LOCK_MGR_DEBUG*/
#ifndef LOCK_MGR_DEBUG
@@ -369,6 +372,7 @@ LockTabInit(char *tabName,
* client to use different tableIds when acquiring/releasing
* short term and long term locks.
*/
#ifdef NOT_USED
LockTableId
LockTabRename(LockTableId tableId)
{
@@ -390,6 +394,7 @@ LockTabRename(LockTableId tableId)
AllTables[newTableId] = AllTables[tableId];
return(newTableId);
}
#endif
/*
* LockAcquire -- Check for lock conflicts, sleep if conflict found,
@@ -753,7 +758,7 @@ LockResolveConflicts(LOCKTAB *ltable,
return(STATUS_FOUND);
}
int
static int
WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock, LOCKT lockt)
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);

View File

@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.3 1997/08/12 22:54:09 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.4 1997/08/19 21:33:25 momjian Exp $
*
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
@@ -29,6 +29,10 @@
#include "utils/rel.h"
#include "miscadmin.h" /* MyDatabaseId */
static bool MultiAcquire(LockTableId tableId, LOCKTAG *tag, LOCKT lockt,
LOCK_LEVEL level);
static bool MultiRelease(LockTableId tableId, LOCKTAG *tag, LOCKT lockt,
LOCK_LEVEL level);
/*
* INTENT indicates to higher level that a lower level lock has been
@@ -186,7 +190,7 @@ MultiLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt)
* Returns: TRUE if lock is set, FALSE if not
* Side Effects:
*/
bool
static bool
MultiAcquire(LockTableId tableId,
LOCKTAG *tag,
LOCKT lockt,
@@ -288,6 +292,7 @@ MultiAcquire(LockTableId tableId,
* Release a page in the multi-level lock table
* ------------------
*/
#ifdef NOT_USED
bool
MultiReleasePage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt)
{
@@ -307,6 +312,7 @@ MultiReleasePage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt)
return (MultiRelease(MultiTableId, &tag, lockt, PAGE_LEVEL));
}
#endif
/* ------------------
* Release a relation in the multi-level lock table
@@ -335,7 +341,7 @@ MultiReleaseReln(LockInfo linfo, LOCKT lockt)
*
* Returns: TRUE if successful, FALSE otherwise.
*/
bool
static bool
MultiRelease(LockTableId tableId,
LOCKTAG *tag,
LOCKT lockt,

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.17 1997/02/14 04:16:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.18 1997/08/19 21:33:29 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.17 1997/02/14 04:16:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.18 1997/08/19 21:33:29 momjian Exp $
*/
#include <sys/time.h>
#include <unistd.h>
@@ -76,6 +76,9 @@
#include "storage/spin.h"
#include "storage/proc.h"
static void HandleDeadLock(int sig);
static PROC *ProcWakeup(PROC *proc, int errType);
/*
* timeout (in seconds) for resolving possible deadlock
*/
@@ -401,6 +404,7 @@ ProcKill(int exitStatus, int pid)
* Returns: a pointer to the queue or NULL
* Side Effects: Initializes the queue if we allocated one
*/
#ifdef NOT_USED
PROC_QUEUE *
ProcQueueAlloc(char *name)
{
@@ -418,6 +422,7 @@ ProcQueueAlloc(char *name)
}
return(queue);
}
#endif
/*
* ProcQueueInit -- initialize a shared memory process queue
@@ -536,7 +541,7 @@ ProcSleep(PROC_QUEUE *queue,
* remove the process from the wait queue and set its links invalid.
* RETURN: the next process in the wait queue.
*/
PROC *
static PROC *
ProcWakeup(PROC *proc, int errType)
{
PROC *retProc;
@@ -563,11 +568,13 @@ ProcWakeup(PROC *proc, int errType)
/*
* ProcGetId --
*/
#ifdef NOT_USED
int
ProcGetId()
{
return( MyProc->procId );
}
#endif
/*
* ProcLockWakeup -- routine for waking up processes when a lock is
@@ -631,7 +638,7 @@ ProcAddLock(SHM_QUEUE *elem)
* up my semaphore.
* --------------------
*/
void
static void
HandleDeadLock(int sig)
{
LOCK *lock;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.6 1997/03/12 21:07:11 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.7 1997/08/19 21:33:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,6 +26,9 @@
#include "lib/qsort.h"
static void PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
char *location, Size size);
static bool PageManagerShuffle = true; /* default is shuffle mode */
/* ----------------------------------------------------------------
@@ -506,7 +509,7 @@ PageIndexTupleDelete(Page page, OffsetNumber offnum)
*
* This routine should never be called on an empty page.
*/
void
static void
PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
char *location,
Size size)

View File

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.7 1997/08/18 20:53:18 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.8 1997/08/19 21:33:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,6 +23,8 @@
#include "utils/rel.h"
#include "utils/palloc.h"
static void smgrshutdown(int dummy);
typedef struct f_smgr {
int (*smgr_init)(); /* may be NULL */
int (*smgr_shutdown)(); /* may be NULL */
@@ -100,7 +102,7 @@ smgrinit()
return (SM_SUCCESS);
}
void
static void
smgrshutdown(int dummy)
{
int i;
@@ -373,6 +375,7 @@ smgrcommit()
return (SM_SUCCESS);
}
#ifdef NOT_USED
int
smgrabort()
{
@@ -387,6 +390,7 @@ smgrabort()
return (SM_SUCCESS);
}
#endif
bool
smgriswo(int16 smgrno)