63 for (
int i = 0;
i < 10;
i++)
67 for (
int i = 0;
i < 10;
i++)
74 if (
strcmp(
"test_lwlock_tranches_startup",
76 elog(
ERROR,
"incorrect startup lock tranche name");
77 if (
strcmp(
"test_lwlock_tranches_startup10",
79 elog(
ERROR,
"incorrect startup lock tranche name");
118 const char *tranche_name;
#define TextDatumGetCString(d)
#define PG_GETARG_DATUM(n)
#define PG_FUNCTION_INFO_V1(funcname)
#define PG_RETURN_TEXT_P(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
int LWLockNewTrancheId(const char *name)
LWLockPadded * GetNamedLWLockTranche(const char *tranche_name)
void RequestNamedLWLockTranche(const char *tranche_name, int num_lwlocks)
void LWLockRelease(LWLock *lock)
void LWLockInitialize(LWLock *lock, int tranche_id)
const char * GetLWLockIdentifier(uint32 classId, uint16 eventId)
@ LWTRANCHE_FIRST_USER_DEFINED
void(* shmem_request_hook_type)(void)
shmem_request_hook_type shmem_request_hook
Datum test_lwlock_tranche_create(PG_FUNCTION_ARGS)
static shmem_request_hook_type prev_shmem_request_hook
Datum test_lwlock_tranche_lookup(PG_FUNCTION_ARGS)
Datum test_lwlock_get_lwlock_identifier(PG_FUNCTION_ARGS)
static void test_lwlock_tranches_shmem_request(void)
Datum test_startup_lwlocks(PG_FUNCTION_ARGS)
Datum test_lwlock_initialize(PG_FUNCTION_ARGS)
text * cstring_to_text(const char *s)