18 #ifndef FOEDUS_THREAD_THREAD_ID_HPP_
19 #define FOEDUS_THREAD_THREAD_ID_HPP_
40 #ifndef DISABLE_CXX11_IN_PUBLIC_HEADERS
42 #endif // DISABLE_CXX11_IN_PUBLIC_HEADERS
60 #ifndef DISABLE_CXX11_IN_PUBLIC_HEADERS
62 #endif // DISABLE_CXX11_IN_PUBLIC_HEADERS
82 #ifndef DISABLE_CXX11_IN_PUBLIC_HEADERS
84 #endif // DISABLE_CXX11_IN_PUBLIC_HEADERS
124 return (node << 8) | local_core;
132 return (global_id >> 8) & 0xFF;
140 return global_id & 0xFF;
222 #endif // FOEDUS_THREAD_THREAD_ID_HPP_
const ThreadLocalOrdinal kMaxThreadLocalOrdinal
Maximum possible value of ThreadLocalOrdinal.
uint8_t ThreadLocalOrdinal
Typedef for a local ID of Thread (core), which is NOT unique across NUMA nodes.
ThreadPolicy
Thread policy for worker threads.
Idle state, receiving a new task.
ThreadStatus
Impersonation status of each worker thread.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
ThreadPriority
Thread priority for worker threads.
A client has set a next task.
ThreadLocalOrdinal decompose_numa_local_ordinal(ThreadId global_id)
Extracts local ordinal from the given globally unique ID of Thread (core).
const ThreadGroupId kMaxThreadGroupId
Maximum possible value of ThreadGroupId.
The thread is requested to terminate.
The thread has picked the task up and is now running.
int64_t TimeoutMicrosec
Used as a general timeout parameter (in microseconds) for synchronous methods.
ThreadGroupId decompose_numa_node(ThreadId global_id)
Extracts NUMA node ID from the given globally unique ID of Thread (core).
#define CXX11_STATIC_ASSERT(expr, message)
Used in public headers in place of "static_assert" of C++11.
ThreadId compose_thread_id(ThreadGroupId node, ThreadLocalOrdinal local_core)
Returns a globally unique ID of Thread (core) for the given node and ordinal in the node...
uint16_t ThreadGlobalOrdinal
Typedef for a globally and contiguously numbered ID of thread.
uint16_t ThreadId
Typedef for a global ID of Thread (core), which is unique across NUMA nodes.
const ThreadId kMaxThreadId
Maximum possible value of ThreadId.
The thread has completed the task and set the result.
ThreadGlobalOrdinal to_global_ordinal(ThreadId thread_id, uint8_t threads_per_nodes)
Calculate ThreadGlobalOrdinal from ThreadId.
uint8_t ThreadGroupId
Typedef for an ID of ThreadGroup (NUMA node).
The thread has terminated (either error or normal, check the result to differentiate them)...
uint64_t ThreadTicket
Typedef for a monotonically increasing ticket for thread impersonation.