18 #ifndef FOEDUS_THREAD_THREAD_POOL_PIMPL_HPP_
19 #define FOEDUS_THREAD_THREAD_POOL_PIMPL_HPP_
50 const void* task_input,
51 uint64_t task_input_size,
56 const void* task_input,
57 uint64_t task_input_size,
62 const void* task_input,
63 uint64_t task_input_size,
95 return groups_[numa_node].get_thread_ref(core_ordinal);
100 #endif // FOEDUS_THREAD_THREAD_POOL_PIMPL_HPP_
ThreadGroup * local_group_
Thread group of the local SOC engine.
Pimpl object of ThreadPool.
uint8_t ThreadLocalOrdinal
Typedef for a local ID of Thread (core), which is NOT unique across NUMA nodes.
A view of Thread group object for other SOCs and master engine.
ThreadRef get_thread_ref(ThreadId id) __attribute__((always_inline))
For better performance, but for some reason this method causes an issue in MCS lock.
ThreadGroup * get_local_group() const
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Typedefs of ID types used in thread package.
ThreadLocalOrdinal decompose_numa_local_ordinal(ThreadId global_id)
Extracts local ordinal from the given globally unique ID of Thread (core).
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
ThreadGroupRef * get_group(ThreadGroupId numa_node)
Typical implementation of Initializable as a skeleton base class.
bool impersonate(const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session)
A user session running on an impersonated thread.
friend std::ostream & operator<<(std::ostream &o, const ThreadPoolPimpl &v)
Represents a group of pre-allocated threads running in one NUMA node.
ThreadPoolPimpl(Engine *engine)
Database engine object that holds all resources and provides APIs.
A view of Thread object for other SOCs and master engine.
ThreadRef * get_thread(ThreadId id)
ThreadGroupId decompose_numa_node(ThreadId global_id)
Extracts NUMA node ID from the given globally unique ID of Thread (core).
ErrorStack initialize_once() override
std::vector< ThreadGroupRef > groups_
List of all thread groups, one for each NUMA node in this engine.
Forward declarations of classes in memory package.
bool impersonate_on_numa_node(ThreadGroupId node, const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session)
uint16_t ThreadId
Typedef for a global ID of Thread (core), which is unique across NUMA nodes.
bool impersonate_on_numa_core(ThreadId core, const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session)
ErrorStack uninitialize_once() override
Forward declarations of classes in thread package.
#define ALWAYS_INLINE
A function suffix to hint that the function should always be inlined.
uint8_t ThreadGroupId
Typedef for an ID of ThreadGroup (NUMA node).