PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "fmgr.h"
#include "storage/dsm_registry.h"
#include "storage/lwlock.h"
Go to the source code of this file.
Data Structures | |
struct | TestDSMRegistryStruct |
Typedefs | |
typedef struct TestDSMRegistryStruct | TestDSMRegistryStruct |
Functions | |
static void | tdr_init_shmem (void *ptr) |
static void | tdr_attach_shmem (void) |
PG_FUNCTION_INFO_V1 (set_val_in_shmem) | |
Datum | set_val_in_shmem (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (get_val_in_shmem) | |
Datum | get_val_in_shmem (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
static TestDSMRegistryStruct * | tdr_state |
typedef struct TestDSMRegistryStruct TestDSMRegistryStruct |
Datum get_val_in_shmem | ( | PG_FUNCTION_ARGS | ) |
Definition at line 65 of file test_dsm_registry.c.
References TestDSMRegistryStruct::lck, LW_SHARED, LWLockAcquire(), LWLockRelease(), PG_RETURN_UINT32, tdr_attach_shmem(), tdr_state, and TestDSMRegistryStruct::val.
PG_FUNCTION_INFO_V1 | ( | get_val_in_shmem | ) |
PG_FUNCTION_INFO_V1 | ( | set_val_in_shmem | ) |
Datum set_val_in_shmem | ( | PG_FUNCTION_ARGS | ) |
Definition at line 52 of file test_dsm_registry.c.
References TestDSMRegistryStruct::lck, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PG_GETARG_UINT32, PG_RETURN_VOID, tdr_attach_shmem(), tdr_state, and TestDSMRegistryStruct::val.
|
static |
Definition at line 39 of file test_dsm_registry.c.
References GetNamedDSMSegment(), TestDSMRegistryStruct::lck, LWLockRegisterTranche(), tdr_init_shmem(), tdr_state, and LWLock::tranche.
Referenced by get_val_in_shmem(), and set_val_in_shmem().
|
static |
Definition at line 30 of file test_dsm_registry.c.
References LWLockInitialize(), and LWLockNewTrancheId().
Referenced by tdr_attach_shmem().
PG_MODULE_MAGIC |
Definition at line 19 of file test_dsm_registry.c.
|
static |
Definition at line 27 of file test_dsm_registry.c.
Referenced by get_val_in_shmem(), set_val_in_shmem(), and tdr_attach_shmem().