PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "miscadmin.h"
#include "storage/ipc.h"
#include "storage/procarray.h"
#include "storage/shm_mq.h"
#include "storage/shm_toc.h"
#include "tcop/tcopprot.h"
#include "test_shm_mq.h"
Go to the source code of this file.
Functions | |
static void | attach_to_queues (dsm_segment *seg, shm_toc *toc, int myworkernumber, shm_mq_handle **inqhp, shm_mq_handle **outqhp) |
static void | copy_messages (shm_mq_handle *inqh, shm_mq_handle *outqh) |
void | test_shm_mq_main (Datum main_arg) |
|
static |
Definition at line 154 of file worker.c.
References MyProc, shm_mq_attach(), shm_mq_set_receiver(), shm_mq_set_sender(), and shm_toc_lookup().
Referenced by test_shm_mq_main().
|
static |
Definition at line 176 of file worker.c.
References CHECK_FOR_INTERRUPTS, data, len, res, shm_mq_receive(), shm_mq_send(), and SHM_MQ_SUCCESS.
Referenced by test_shm_mq_main().
void test_shm_mq_main | ( | Datum | main_arg | ) |
Definition at line 47 of file worker.c.
References attach_to_queues(), BackendPidGetProc(), BackgroundWorkerUnblockSignals(), BackgroundWorker::bgw_notify_pid, copy_messages(), DatumGetInt32(), DEBUG1, die, dsm_attach(), dsm_detach(), dsm_segment_address(), elog, ereport, errcode(), errmsg(), ERROR, test_shm_mq_header::mutex, MyBgworkerEntry, PG_TEST_SHM_MQ_MAGIC, pqsignal(), proc_exit(), PGPROC::procLatch, SetLatch(), shm_toc_attach(), shm_toc_lookup(), SpinLockAcquire, SpinLockRelease, test_shm_mq_header::workers_attached, test_shm_mq_header::workers_ready, and test_shm_mq_header::workers_total.