libfoedus-core
FOEDUS Core Library
|
A view of Thread object for other SOCs and master engine. More...
A view of Thread object for other SOCs and master engine.
Definition at line 39 of file thread_ref.hpp.
#include <thread_ref.hpp>
Friends | |
std::ostream & | operator<< (std::ostream &o, const ThreadRef &v) |
foedus::thread::ThreadRef::ThreadRef | ( | ) |
Definition at line 36 of file thread_ref.cpp.
Definition at line 47 of file thread_ref.cpp.
References foedus::soc::SocManager::get_shared_memory_repo(), foedus::Engine::get_soc_manager(), foedus::soc::SharedMemoryRepo::get_thread_memory_anchors(), foedus::soc::ThreadMemoryAnchors::mcs_rw_async_mappings_memories_, foedus::soc::ThreadMemoryAnchors::mcs_rw_extended_lock_memories_, foedus::soc::ThreadMemoryAnchors::mcs_rw_simple_lock_memories_, foedus::soc::ThreadMemoryAnchors::mcs_ww_lock_memories_, foedus::soc::ThreadMemoryAnchors::task_input_memory_, foedus::soc::ThreadMemoryAnchors::task_output_memory_, and foedus::soc::ThreadMemoryAnchors::thread_memory_.
|
inline |
Definition at line 71 of file thread_ref.hpp.
Referenced by foedus::thread::ThreadPimplMcsAdaptor< RW_BLOCK >::get_other_cur_block(), foedus::thread::ImpersonateSession::get_output_size(), foedus::thread::ImpersonateSession::get_result(), foedus::thread::ThreadPimplMcsAdaptor< RW_BLOCK >::get_rw_other_block(), foedus::thread::ThreadPimplMcsAdaptor< RW_BLOCK >::get_ww_other_block(), foedus::thread::ImpersonateSession::is_running(), foedus::thread::operator<<(), foedus::thread::ThreadPimplMcsAdaptor< RW_BLOCK >::other_waiting(), foedus::thread::ImpersonateSession::release(), foedus::thread::ImpersonateSession::wait(), and foedus::thread::ImpersonateSession::wait_for().
|
inline |
Definition at line 59 of file thread_ref.hpp.
Epoch foedus::thread::ThreadRef::get_in_commit_epoch | ( | ) | const |
Definition at line 114 of file thread_ref.cpp.
References foedus::thread::ThreadControlBlock::in_commit_epoch_, and foedus::assorted::memory_fence_acquire().
xct::McsRwAsyncMapping * foedus::thread::ThreadRef::get_mcs_rw_async_mapping | ( | xct::UniversalLockId | lock_id | ) |
Definition at line 149 of file thread_ref.cpp.
References ASSERT_ND, and foedus::thread::ThreadControlBlock::mcs_rw_async_mapping_current_.
Referenced by foedus::thread::ThreadPimplMcsAdaptor< RW_BLOCK >::get_rw_other_async_block().
|
inline |
Definition at line 68 of file thread_ref.hpp.
Referenced by foedus::thread::ThreadPimplMcsAdaptor< RW_BLOCK >::get_rw_other_block().
|
inline |
Definition at line 69 of file thread_ref.hpp.
|
inline |
Definition at line 66 of file thread_ref.hpp.
|
inline |
Definition at line 65 of file thread_ref.hpp.
|
inline |
Definition at line 64 of file thread_ref.hpp.
Referenced by foedus::thread::ThreadPimplMcsAdaptor< RW_BLOCK >::get_ww_other_block().
|
inline |
Definition at line 61 of file thread_ref.hpp.
References foedus::thread::decompose_numa_node().
uint64_t foedus::thread::ThreadRef::get_snapshot_cache_hits | ( | ) | const |
Definition at line 119 of file thread_ref.cpp.
References foedus::thread::ThreadControlBlock::stat_snapshot_cache_hits_.
uint64_t foedus::thread::ThreadRef::get_snapshot_cache_misses | ( | ) | const |
Definition at line 123 of file thread_ref.cpp.
References foedus::thread::ThreadControlBlock::stat_snapshot_cache_misses_.
|
inline |
Definition at line 62 of file thread_ref.hpp.
|
inline |
Definition at line 63 of file thread_ref.hpp.
Referenced by foedus::thread::ImpersonateSession::get_output(), and foedus::thread::ImpersonateSession::get_raw_output_buffer().
|
inline |
Definition at line 60 of file thread_ref.hpp.
Referenced by foedus::thread::operator<<().
void foedus::thread::ThreadRef::reset_snapshot_cache_counts | ( | ) | const |
Definition at line 127 of file thread_ref.cpp.
References foedus::thread::ThreadControlBlock::stat_snapshot_cache_hits_, and foedus::thread::ThreadControlBlock::stat_snapshot_cache_misses_.
bool foedus::thread::ThreadRef::try_impersonate | ( | const proc::ProcName & | proc_name, |
const void * | task_input, | ||
uint64_t | task_input_size, | ||
ImpersonateSession * | session | ||
) |
Conditionally try to occupy this thread, or impersonate.
If it fails, it immediately returns.
[in] | proc_name | the name of the procedure to run on this thread. |
[in] | task_input | input data of arbitrary format for the procedure. |
[in] | task_input_size | byte size of the input data to copy into the thread's memory. |
[out] | session | the session to run on this thread. On success, the session receives a ticket so that the caller can wait for the completion. |
Definition at line 59 of file thread_ref.cpp.
References foedus::thread::ThreadControlBlock::current_ticket_, foedus::thread::ThreadControlBlock::input_len_, foedus::thread::ImpersonateSession::is_valid(), foedus::thread::kNotInitialized, foedus::thread::kWaitingForExecution, foedus::thread::kWaitingForTask, foedus::assorted::memory_fence_acquire(), foedus::thread::ThreadControlBlock::proc_name_, foedus::thread::ImpersonateSession::release(), foedus::soc::SharedPolling::signal(), foedus::thread::ThreadControlBlock::status_, foedus::thread::ThreadControlBlock::task_mutex_, foedus::thread::ImpersonateSession::thread_, foedus::thread::ImpersonateSession::ticket_, UNLIKELY, and foedus::thread::ThreadControlBlock::wakeup_cond_.
Referenced by foedus::thread::ThreadPoolPimpl::impersonate(), foedus::thread::ThreadPoolPimpl::impersonate_on_numa_core(), and foedus::thread::ThreadPoolPimpl::impersonate_on_numa_node().
|
friend |
Definition at line 172 of file thread_ref.cpp.