PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "lib/dshash.h"
#include "storage/dsm_registry.h"
#include "storage/lwlock.h"
#include "storage/shmem.h"
#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
struct | DSMRegistryCtxStruct |
struct | DSMRegistryEntry |
Typedefs | |
typedef struct DSMRegistryCtxStruct | DSMRegistryCtxStruct |
typedef struct DSMRegistryEntry | DSMRegistryEntry |
Functions | |
Size | DSMRegistryShmemSize (void) |
void | DSMRegistryShmemInit (void) |
static void | init_dsm_registry (void) |
void * | GetNamedDSMSegment (const char *name, size_t size, void(*init_callback)(void *ptr), bool *found) |
Variables | |
static DSMRegistryCtxStruct * | DSMRegistryCtx |
static const dshash_parameters | dsh_params |
static dsa_area * | dsm_registry_dsa |
static dshash_table * | dsm_registry_table |
typedef struct DSMRegistryCtxStruct DSMRegistryCtxStruct |
typedef struct DSMRegistryEntry DSMRegistryEntry |
void DSMRegistryShmemInit | ( | void | ) |
Definition at line 69 of file dsm_registry.c.
References DSA_HANDLE_INVALID, DSMRegistryCtxStruct::dsah, DSHASH_HANDLE_INVALID, DSMRegistryCtxStruct::dshh, DSMRegistryCtx, DSMRegistryShmemSize(), and ShmemInitStruct().
Referenced by CreateOrAttachShmemStructs().
Size DSMRegistryShmemSize | ( | void | ) |
Definition at line 63 of file dsm_registry.c.
References MAXALIGN.
Referenced by CalculateShmemSize(), and DSMRegistryShmemInit().
void* GetNamedDSMSegment | ( | const char * | name, |
size_t | size, | ||
void(*)(void *ptr) | init_callback, | ||
bool * | found | ||
) |
Definition at line 131 of file dsm_registry.c.
References Assert, dshash_find_or_insert(), dshash_release_lock(), dsm_attach(), dsm_create(), dsm_find_mapping(), dsm_pin_mapping(), dsm_pin_segment(), dsm_registry_table, dsm_segment_address(), dsm_segment_handle(), elog, ereport, errmsg(), ERROR, DSMRegistryEntry::handle, init_dsm_registry(), MemoryContextSwitchTo(), name, DSMRegistryEntry::size, size, and TopMemoryContext.
Referenced by apw_init_shmem(), injection_init_shmem(), and tdr_attach_shmem().
|
static |
Definition at line 91 of file dsm_registry.c.
References dsa_attach(), dsa_create, dsa_get_handle(), dsa_pin(), dsa_pin_mapping(), DSMRegistryCtxStruct::dsah, dsh_params, dshash_attach(), dshash_create(), dshash_get_hash_table_handle(), DSHASH_HANDLE_INVALID, DSMRegistryCtxStruct::dshh, dsm_registry_dsa, dsm_registry_table, DSMRegistryCtx, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), and LWTRANCHE_DSM_REGISTRY_DSA.
Referenced by GetNamedDSMSegment().
|
static |
Definition at line 50 of file dsm_registry.c.
Referenced by init_dsm_registry().
|
static |
Definition at line 59 of file dsm_registry.c.
Referenced by init_dsm_registry().
|
static |
Definition at line 60 of file dsm_registry.c.
Referenced by GetNamedDSMSegment(), and init_dsm_registry().
|
static |
Definition at line 41 of file dsm_registry.c.
Referenced by DSMRegistryShmemInit(), and init_dsm_registry().