Veil
ShmemCtl Struct Reference

The ShmemCtl structure is the first object allocated from the first chunk of shared memory in context 0. More...

#include <veil_datatypes.h>

Data Fields

ObjType type
 This must have the value OBJ_SHMEMCTL.
 
bool initialised
 Set to true once struct is setup.
 
LWLockId veil_lwlock
 dynamically allocated LWLock
 
int current_context
 Index of the current context (0 or 1) More...
 
size_t total_allocated [2]
 Total shared memory allocated in chunks in each context.
 
bool switching
 Whether a context-switch is in progress.
 
MemChunkcontext [2]
 The first chunks of each context.
 
TransactionId xid [2]
 The transaction id of the transaction that initialised each context: this is used to determine whether there are transactions still runnning that may be using an earlier context. More...
 
MemContextcontext [2]
 Array (pair) of contexts.
 

Detailed Description

The ShmemCtl structure is the first object allocated from the first chunk of shared memory in context 0.

This object describes and manages shared memory allocated by shmalloc()

Definition at line 161 of file veil_datatypes.h.

Field Documentation

◆ current_context

int ShmemCtl::current_context

Index of the current context (0 or 1)

dynamically allocated LWLock

Index of the current context (0 or 1)

Definition at line 165 of file veil_datatypes.h.

Referenced by get_cur_context_id(), vl_complete_context_switch(), vl_force_context_switch(), and vl_prepare_context_switch().

◆ xid

TransactionId ShmemCtl::xid

The transaction id of the transaction that initialised each context: this is used to determine whether there are transactions still runnning that may be using an earlier context.

Definition at line 172 of file veil_datatypes.h.

Referenced by get_cur_context_id(), vl_complete_context_switch(), vl_force_context_switch(), and vl_prepare_context_switch().


The documentation for this struct was generated from the following files: