libfoedus-core
FOEDUS Core Library
foedus::xct::McsMockDataPage Struct Reference

A dummy page layout to store RwLockableXctId. More...

Detailed Description

A dummy page layout to store RwLockableXctId.

We need to fake a valid page layout because that's what our UniversalLockId conversion logic assumes.

Definition at line 184 of file xct_mcs_adapter_impl.hpp.

#include <xct_mcs_adapter_impl.hpp>

Collaboration diagram for foedus::xct::McsMockDataPage:

Public Member Functions

void init (storage::StorageId dummy_storage_id, uint16_t node_id, uint32_t in_node_index)
 

Public Attributes

storage::PageHeader header_
 
char header_pad_ [kMcsMockDataPageHeaderPad]
 
RwLockableXctId tid_ [kMcsMockDataPageLocksPerPage]
 
McsWwLock ww_ [kMcsMockDataPageLocksPerPage]
 
char filler_ [kMcsMockDataPageFiller]
 

Member Function Documentation

void foedus::xct::McsMockDataPage::init ( storage::StorageId  dummy_storage_id,
uint16_t  node_id,
uint32_t  in_node_index 
)
inline

Definition at line 185 of file xct_mcs_adapter_impl.hpp.

References header_, foedus::storage::PageHeader::init_volatile(), foedus::storage::kArrayPageType, foedus::xct::kMcsMockDataPageLocksPerPage, foedus::xct::McsWwLock::reset(), foedus::xct::RwLockableXctId::reset(), foedus::storage::VolatilePagePointer::set(), tid_, and ww_.

Referenced by foedus::xct::McsMockNode< RW_BLOCK >::init().

185  {
186  storage::VolatilePagePointer page_id;
187  page_id.set(node_id, in_node_index);
188  header_.init_volatile(page_id, dummy_storage_id, storage::kArrayPageType);
189  for (uint32_t i = 0; i < kMcsMockDataPageLocksPerPage; ++i) {
190  tid_[i].reset();
191  ww_[i].reset();
192  }
193  }
void reset() __attribute__((always_inline))
used only while page initialization
Definition: xct_id.hpp:355
void init_volatile(VolatilePagePointer page_id, StorageId storage_id, PageType page_type) __attribute__((always_inline))
Definition: page.hpp:284
constexpr uint32_t kMcsMockDataPageLocksPerPage
void reset() __attribute__((always_inline))
used only while page initialization
Definition: xct_id.hpp:1150
McsWwLock ww_[kMcsMockDataPageLocksPerPage]
RwLockableXctId tid_[kMcsMockDataPageLocksPerPage]

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

char foedus::xct::McsMockDataPage::filler_[kMcsMockDataPageFiller]

Definition at line 198 of file xct_mcs_adapter_impl.hpp.

storage::PageHeader foedus::xct::McsMockDataPage::header_

Definition at line 194 of file xct_mcs_adapter_impl.hpp.

Referenced by init().

char foedus::xct::McsMockDataPage::header_pad_[kMcsMockDataPageHeaderPad]

Definition at line 195 of file xct_mcs_adapter_impl.hpp.

McsWwLock foedus::xct::McsMockDataPage::ww_[kMcsMockDataPageLocksPerPage]

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