Author: Marc Munro Copyright (c) 2005, 2006 Marc Munro License: BSD $Id: veil_datatypes.h,v 1.5 2007/07/31 22:18:27 bloodnok Exp $
Define all Veil public datatypes
Definition in file veil_datatypes.h.
#include "utils/hsearch.h"
#include "storage/lwlock.h"
Go to the source code of this file.
Data Structures | |
struct | MemChunk |
Chunks provide a linked list of dynamically allocated shared memory segments, with the most recently allocated chunk at the tail. More... | |
struct | Object |
General purpose object-type. More... | |
struct | ShmemCtl |
The ShmemCtl structure is the first object allocated from the first chunk of shared memory in context 0. More... | |
struct | Int4Var |
Subtype of Object for storing simple int4 values. More... | |
struct | Range |
Subtype of Object for storing range values. More... | |
struct | Bitmap |
Subtype of Object for storing bitmaps. More... | |
struct | BitmapRef |
Subtype of Object for storing bitmap refs. More... | |
struct | BitmapArray |
Subtype of Object for storing bitmap arrays. More... | |
struct | BitmapHash |
Subtype of Object for storing bitmap hashes. More... | |
struct | Int4Array |
Subtype of Object for storing arrays of integers. More... | |
struct | VarEntry |
A Veil variable. More... | |
struct | veil_variable_t |
Describes a veil shared or session variable. More... | |
Defines | |
#define | VEIL_DATATYPES 1 |
#define | VEIL_DEBUG 1 |
Enables various debugging constructs, such as canaries, in code and data structures. | |
#define | DBG_CANARY 0xca96ca96 |
Value to be set in sacrificial "canary" fields. | |
#define | DBG_CANARY_ENTRY int32 canary; |
Defines a canary element in a data structure. | |
#define | DBG_ELEMS_ENTRY int32 dbgelems; |
Field to record the size of an array so that its canary element can be found. | |
#define | DBG_SET_ELEMS(x, y) (x).dbgelems = y |
Code to records the size of an array so that its canary element can be found. | |
#define | DBG_SET_CANARY(x) (x).canary = DBG_CANARY |
Code to initialise a canary. | |
#define | DBG_TEST_CANARY(x) |
Code to test for a canary having been overwritten. | |
#define | EMPTY 1 |
Base size for an array containing a canary. | |
#define | DBG_SET_TRAILER(x, y) (x).y[(x).dbgelems] = DBG_CANARY; |
Set a trailing canary in an array. | |
#define | DBG_TEST_TRAILER(x, y) |
Test the trailing canary in an array. | |
#define | DBG_CHECK_INDEX(x, i) |
Check whether an array index is in bounds. | |
#define | HASH_KEYLEN 60 |
The key length for veil hash types. | |
Enumerations | |
enum | ObjType { OBJ_UNDEFINED = 0, OBJ_SHMEMCTL, OBJ_INT4, OBJ_RANGE, OBJ_BITMAP, OBJ_BITMAP_ARRAY, OBJ_BITMAP_HASH, OBJ_BITMAP_REF, OBJ_INT4_ARRAY, OBJ_UNDEFINED = 0, OBJ_SHMEMCTL, OBJ_INT4, OBJ_RANGE, OBJ_BITMAP, OBJ_BITMAP_ARRAY, OBJ_BITMAP_HASH, OBJ_BITMAP_REF, OBJ_INT4_ARRAY } |
Describes the type of an Object record or one of its subtypes. |
#define VEIL_DEBUG 1 |
Enables various debugging constructs, such as canaries, in code and data structures.
If such debugging is required, define VEIL_DEBUG in the make invocation, eg: "make VEIL_DEBUG=1".
Definition at line 23 of file veil_datatypes.h.
#define DBG_CANARY 0xca96ca96 |
Value to be set in sacrificial "canary" fields.
If this value is not as expected, the canaryu has been killed by something inappropriately stomping on memory.
Definition at line 32 of file veil_datatypes.h.
#define DBG_TEST_CANARY | ( | x | ) |
Value:
if ((x).canary != DBG_CANARY) {\ elog(ERROR, "canary fault"); }
Definition at line 59 of file veil_datatypes.h.
Referenced by vl_BitmapSetbit(), vl_ClearBitmapArray(), and vl_NewBitmap().
#define EMPTY 1 |
Base size for an array containing a canary.
This is zero if VEIL_DEBUG is not defined, iw when this is defined arrays will be one element longer to allow a canary to be placed at the end of the array.
Definition at line 67 of file veil_datatypes.h.
#define DBG_TEST_TRAILER | ( | x, | |||
y | ) |
Value:
if ((x).y[(x).dbgelems] != DBG_CANARY) {\ elog(ERROR, "trailing canary fault"); }
Definition at line 77 of file veil_datatypes.h.
Referenced by vl_BitmapSetbit(), and vl_NewBitmap().
#define DBG_CHECK_INDEX | ( | x, | |||
i | ) |
Value:
if (i >= (x).dbgelems) {\ elog(ERROR, "Element index out of range %d", i); }
Definition at line 83 of file veil_datatypes.h.
Referenced by vl_BitmapSetbit().