Rename BindingTab to BindingTable.
This commit is contained in:
parent
a8376c1c84
commit
eef15f555b
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.11 1998/06/23 17:59:54 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.12 1998/06/25 14:24:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -83,7 +83,7 @@ CreateSharedMemoryAndSemaphores(IPCKey key)
|
|||||||
IPCKeyGetBufferMemoryKey(key), size);
|
IPCKeyGetBufferMemoryKey(key), size);
|
||||||
}
|
}
|
||||||
ShmemCreate(IPCKeyGetBufferMemoryKey(key), size);
|
ShmemCreate(IPCKeyGetBufferMemoryKey(key), size);
|
||||||
ShmemBindingTabReset();
|
ShmemBindingTableReset();
|
||||||
InitShmem(key, size);
|
InitShmem(key, size);
|
||||||
InitBufferPool(key);
|
InitBufferPool(key);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.21 1998/06/23 16:04:46 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.22 1998/06/25 14:24:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -81,7 +81,7 @@ SPINLOCK BindingLock; /* lock for binding table access */
|
|||||||
static unsigned long *ShmemFreeStart = NULL; /* pointer to the OFFSET
|
static unsigned long *ShmemFreeStart = NULL; /* pointer to the OFFSET
|
||||||
* of first free shared
|
* of first free shared
|
||||||
* memory */
|
* memory */
|
||||||
static unsigned long *ShmemBindingTabOffset = NULL; /* start of the binding
|
static unsigned long *ShmemBindingTableOffset = NULL; /* start of the binding
|
||||||
* table (for bootstrap) */
|
* table (for bootstrap) */
|
||||||
static int ShmemBootstrap = FALSE; /* flag becomes true when shared
|
static int ShmemBootstrap = FALSE; /* flag becomes true when shared
|
||||||
* mem is created by POSTMASTER */
|
* mem is created by POSTMASTER */
|
||||||
@ -89,13 +89,13 @@ static int ShmemBootstrap = FALSE; /* flag becomes true when shared
|
|||||||
static HTAB *BindingTable = NULL;
|
static HTAB *BindingTable = NULL;
|
||||||
|
|
||||||
/* ---------------------
|
/* ---------------------
|
||||||
* ShmemBindingTabReset() - Resets the binding table to NULL....
|
* ShmemBindingTableReset() - Resets the binding table to NULL....
|
||||||
* useful when the postmaster destroys existing shared memory
|
* useful when the postmaster destroys existing shared memory
|
||||||
* and creates all new segments after a backend crash.
|
* and creates all new segments after a backend crash.
|
||||||
* ----------------------
|
* ----------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ShmemBindingTabReset(void)
|
ShmemBindingTableReset(void)
|
||||||
{
|
{
|
||||||
BindingTable = (HTAB *) NULL;
|
BindingTable = (HTAB *) NULL;
|
||||||
}
|
}
|
||||||
@ -179,10 +179,10 @@ InitShmem(unsigned int key, unsigned int size)
|
|||||||
/* First long in shared memory is the count of available space */
|
/* First long in shared memory is the count of available space */
|
||||||
ShmemFreeStart = (unsigned long *) ShmemBase;
|
ShmemFreeStart = (unsigned long *) ShmemBase;
|
||||||
/* next is a shmem pointer to the binding table */
|
/* next is a shmem pointer to the binding table */
|
||||||
ShmemBindingTabOffset = ShmemFreeStart + 1;
|
ShmemBindingTableOffset = ShmemFreeStart + 1;
|
||||||
|
|
||||||
currFreeSpace +=
|
currFreeSpace +=
|
||||||
sizeof(ShmemFreeStart) + sizeof(ShmemBindingTabOffset);
|
sizeof(ShmemFreeStart) + sizeof(ShmemBindingTableOffset);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bootstrap initialize spin locks so we can start to use the
|
* bootstrap initialize spin locks so we can start to use the
|
||||||
@ -245,7 +245,7 @@ InitShmem(unsigned int key, unsigned int size)
|
|||||||
|
|
||||||
Assert(ShmemBootstrap);
|
Assert(ShmemBootstrap);
|
||||||
result->location = MAKE_OFFSET(BindingTable->hctl);
|
result->location = MAKE_OFFSET(BindingTable->hctl);
|
||||||
*ShmemBindingTabOffset = result->location;
|
*ShmemBindingTableOffset = result->location;
|
||||||
result->size = BTABLE_SIZE;
|
result->size = BTABLE_SIZE;
|
||||||
|
|
||||||
ShmemBootstrap = FALSE;
|
ShmemBootstrap = FALSE;
|
||||||
@ -514,10 +514,10 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Assert(ShmemBindingTabOffset);
|
Assert(ShmemBindingTableOffset);
|
||||||
|
|
||||||
*foundPtr = TRUE;
|
*foundPtr = TRUE;
|
||||||
return ((long *) MAKE_PTR(*ShmemBindingTabOffset));
|
return ((long *) MAKE_PTR(*ShmemBindingTableOffset));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: shmem.h,v 1.11 1998/02/26 04:43:34 momjian Exp $
|
* $Id: shmem.h,v 1.12 1998/06/25 14:24:35 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -59,7 +59,7 @@ typedef struct SHM_QUEUE
|
|||||||
} SHM_QUEUE;
|
} SHM_QUEUE;
|
||||||
|
|
||||||
/* shmem.c */
|
/* shmem.c */
|
||||||
extern void ShmemBindingTabReset(void);
|
extern void ShmemBindingTableReset(void);
|
||||||
extern void ShmemCreate(unsigned int key, unsigned int size);
|
extern void ShmemCreate(unsigned int key, unsigned int size);
|
||||||
extern int InitShmem(unsigned int key, unsigned int size);
|
extern int InitShmem(unsigned int key, unsigned int size);
|
||||||
extern long *ShmemAlloc(unsigned long size);
|
extern long *ShmemAlloc(unsigned long size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user