PostgreSQL Source Code  git master
block.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  BlockIdData
 

Macros

#define InvalidBlockNumber   ((BlockNumber) 0xFFFFFFFF)
 
#define MaxBlockNumber   ((BlockNumber) 0xFFFFFFFE)
 
#define BlockNumberIsValid(blockNumber)    ((bool) ((BlockNumber) (blockNumber) != InvalidBlockNumber))
 
#define BlockIdIsValid(blockId)    ((bool) PointerIsValid(blockId))
 
#define BlockIdSet(blockId, blockNumber)
 
#define BlockIdCopy(toBlockId, fromBlockId)
 
#define BlockIdEquals(blockId1, blockId2)
 
#define BlockIdGetBlockNumber(blockId)
 

Typedefs

typedef uint32 BlockNumber
 
typedef struct BlockIdData BlockIdData
 
typedef BlockIdDataBlockId
 

Macro Definition Documentation

◆ BlockIdCopy

#define BlockIdCopy (   toBlockId,
  fromBlockId 
)
Value:
( \
AssertMacro(PointerIsValid(toBlockId)), \
AssertMacro(PointerIsValid(fromBlockId)), \
(toBlockId)->bi_hi = (fromBlockId)->bi_hi, \
(toBlockId)->bi_lo = (fromBlockId)->bi_lo \
)
#define PointerIsValid(pointer)
Definition: c.h:698

Definition at line 95 of file block.h.

◆ BlockIdEquals

#define BlockIdEquals (   blockId1,
  blockId2 
)
Value:
((blockId1)->bi_hi == (blockId2)->bi_hi && \
(blockId1)->bi_lo == (blockId2)->bi_lo)

Definition at line 107 of file block.h.

◆ BlockIdGetBlockNumber

#define BlockIdGetBlockNumber (   blockId)
Value:
( \
AssertMacro(BlockIdIsValid(blockId)), \
(BlockNumber) (((blockId)->bi_hi << 16) | ((uint16) (blockId)->bi_lo)) \
)
uint32 BlockNumber
Definition: block.h:31
#define BlockIdIsValid(blockId)
Definition: block.h:77
unsigned short uint16
Definition: c.h:440

Definition at line 115 of file block.h.

◆ BlockIdIsValid

#define BlockIdIsValid (   blockId)     ((bool) PointerIsValid(blockId))

Definition at line 77 of file block.h.

◆ BlockIdSet

#define BlockIdSet (   blockId,
  blockNumber 
)
Value:
( \
AssertMacro(PointerIsValid(blockId)), \
(blockId)->bi_hi = (blockNumber) >> 16, \
(blockId)->bi_lo = (blockNumber) & 0xffff \
)

Definition at line 84 of file block.h.

◆ BlockNumberIsValid

#define BlockNumberIsValid (   blockNumber)     ((bool) ((BlockNumber) (blockNumber) != InvalidBlockNumber))

Definition at line 70 of file block.h.

◆ InvalidBlockNumber

#define InvalidBlockNumber   ((BlockNumber) 0xFFFFFFFF)

Definition at line 33 of file block.h.

◆ MaxBlockNumber

#define MaxBlockNumber   ((BlockNumber) 0xFFFFFFFE)

Definition at line 35 of file block.h.

Typedef Documentation

◆ BlockId

typedef BlockIdData* BlockId

Definition at line 59 of file block.h.

◆ BlockIdData

typedef struct BlockIdData BlockIdData

◆ BlockNumber

Definition at line 31 of file block.h.