Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/src/test/modules/test_shm_mq/     Datei vom 11.4.2026 mit Größe 1 kB image not shown  

Quelle  test_shm_mq.h   Sprache: C

 

/*--------------------------------------------------------------------------
 *
 * test_shm_mq.h
 *  Definitions for shared memory message queues
 *
 * Copyright (c) 2013-2025, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
 *  src/test/modules/test_shm_mq/test_shm_mq.h
 *
 * -------------------------------------------------------------------------
 */


#ifndef TEST_SHM_MQ_H
#define TEST_SHM_MQ_H

#include "storage/dsm.h"
#include "storage/shm_mq.h"
#include "storage/spin.h"

/* Identifier for shared memory segments used by this extension. */
#define  PG_TEST_SHM_MQ_MAGIC  0x79fb2447

/*
 * This structure is stored in the dynamic shared memory segment.  We use
 * it to determine whether all workers started up OK and successfully
 * attached to their respective shared message queues.
 */

typedef struct
{
 slock_t  mutex;
 int   workers_total;
 int   workers_attached;
 int   workers_ready;
} test_shm_mq_header;

/* Set up dynamic shared memory and background workers for test run. */
extern void test_shm_mq_setup(int64 queue_size, int32 nworkers,
         dsm_segment **segp, shm_mq_handle **output,
         shm_mq_handle **input);

/* Main entrypoint for a worker. */
pg_noreturn extern PGDLLEXPORT void test_shm_mq_main(Datum);

#endif

Messung
CHZG
1001009899

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland