libfoedus-core
FOEDUS Core Library
|
A dummy implementation that provides McsAdaptorConcept for testing. More...
A dummy implementation that provides McsAdaptorConcept for testing.
A testcase shares an instance of this object and creates below to test locking logics easily without any other FOEDUS engine pieces. These mock objects are only for testing, thus no performance optimization at all.
You might feel it weird to have classes for testing here, but we need to define them here to allow explicit instantiation of templated functions receiving these objects within xct_mcs_impl.cpp. Otherwise we have to define, not just declare, the templated funcs in hpp.
Definition at line 129 of file xct_mcs_adapter_impl.hpp.
#include <xct_mcs_adapter_impl.hpp>
Public Member Functions | |
McsMockThread ()=default | |
McsMockThread (McsMockThread &&rhs) | |
void | init (uint32_t max_block_count) |
xct::McsBlockIndex | get_mcs_rw_async_block_index (const memory::GlobalVolatilePageResolver &resolver, xct::McsRwLock *lock) |
Public Attributes | |
std::vector< McsWwBlock > | mcs_ww_blocks_ |
std::vector< RW_BLOCK > | mcs_rw_blocks_ |
std::vector< xct::McsRwAsyncMapping > | mcs_rw_async_mappings_ |
uint32_t | mcs_rw_async_mapping_current_ |
uint32_t | mcs_block_current_ |
std::atomic< bool > | mcs_waiting_ |
|
default |
|
inline |
Definition at line 131 of file xct_mcs_adapter_impl.hpp.
References foedus::xct::McsMockThread< RW_BLOCK >::mcs_block_current_, foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_async_mappings_, foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_blocks_, foedus::xct::McsMockThread< RW_BLOCK >::mcs_waiting_, and foedus::xct::McsMockThread< RW_BLOCK >::mcs_ww_blocks_.
|
inline |
Definition at line 147 of file xct_mcs_adapter_impl.hpp.
References foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_async_mappings_, and foedus::xct::rw_lock_to_universal_lock_id().
Referenced by foedus::xct::McsMockAdaptor< RW_BLOCK >::get_rw_other_async_block().
|
inline |
Definition at line 139 of file xct_mcs_adapter_impl.hpp.
References foedus::xct::McsMockThread< RW_BLOCK >::mcs_block_current_, foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_async_mapping_current_, foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_async_mappings_, foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_blocks_, foedus::xct::McsMockThread< RW_BLOCK >::mcs_waiting_, and foedus::xct::McsMockThread< RW_BLOCK >::mcs_ww_blocks_.
uint32_t foedus::xct::McsMockThread< RW_BLOCK >::mcs_block_current_ |
Definition at line 163 of file xct_mcs_adapter_impl.hpp.
Referenced by foedus::xct::McsMockAdaptor< RW_BLOCK >::get_other_cur_block(), foedus::xct::McsMockThread< RW_BLOCK >::init(), and foedus::xct::McsMockThread< RW_BLOCK >::McsMockThread().
uint32_t foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_async_mapping_current_ |
Definition at line 162 of file xct_mcs_adapter_impl.hpp.
Referenced by foedus::xct::McsMockThread< RW_BLOCK >::init().
std::vector<xct::McsRwAsyncMapping> foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_async_mappings_ |
Definition at line 161 of file xct_mcs_adapter_impl.hpp.
Referenced by foedus::xct::McsMockThread< RW_BLOCK >::get_mcs_rw_async_block_index(), foedus::xct::McsMockThread< RW_BLOCK >::init(), and foedus::xct::McsMockThread< RW_BLOCK >::McsMockThread().
std::vector< RW_BLOCK > foedus::xct::McsMockThread< RW_BLOCK >::mcs_rw_blocks_ |
Definition at line 160 of file xct_mcs_adapter_impl.hpp.
Referenced by foedus::xct::McsMockAdaptor< RW_BLOCK >::get_rw_other_block(), foedus::xct::McsMockThread< RW_BLOCK >::init(), and foedus::xct::McsMockThread< RW_BLOCK >::McsMockThread().
std::atomic<bool> foedus::xct::McsMockThread< RW_BLOCK >::mcs_waiting_ |
Definition at line 164 of file xct_mcs_adapter_impl.hpp.
Referenced by foedus::xct::McsMockThread< RW_BLOCK >::init(), foedus::xct::McsMockThread< RW_BLOCK >::McsMockThread(), and foedus::xct::McsMockAdaptor< RW_BLOCK >::other_waiting().
std::vector<McsWwBlock> foedus::xct::McsMockThread< RW_BLOCK >::mcs_ww_blocks_ |
Definition at line 159 of file xct_mcs_adapter_impl.hpp.
Referenced by foedus::xct::McsMockAdaptor< RW_BLOCK >::get_ww_other_block(), foedus::xct::McsMockThread< RW_BLOCK >::init(), and foedus::xct::McsMockThread< RW_BLOCK >::McsMockThread().