Tervel  1.0.0
A collection of wait-free containers and algorithms.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
tervel::ThreadContext Class Reference

Thread local information. More...

#include <thread_context.h>

Public Member Functions

 ThreadContext (Tervel *tervel)
 
 ~ThreadContext ()
 
util::memory::hp::HazardPointer *const get_hazard_pointer ()
 
util::ProgressAssurance *const get_progress_assurance ()
 
util::memory::hp::ElementList *const get_hp_element_list ()
 
util::memory::rc::DescriptorPool *const get_rc_descriptor_pool ()
 
const uint64_t get_thread_id ()
 A unique ID among all active threads. More...
 
const uint64_t get_num_threads ()
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (ThreadContext)
 

Private Attributes

Tervel *const tervel_
 Tervel provides a link to the shared Tervel object. More...
 
const uint64_t thread_id_
 
util::memory::hp::ElementList *const hp_element_list_
 
util::memory::rc::DescriptorPool *const rc_descriptor_pool_
 

Detailed Description

Thread local information.

Each thread should have an instance of this.

Constructor & Destructor Documentation

tervel::ThreadContext::ThreadContext ( Tervel tervel)
explicit
tervel::ThreadContext::~ThreadContext ( )

Member Function Documentation

tervel::ThreadContext::DISALLOW_COPY_AND_ASSIGN ( ThreadContext  )
private
util::memory::hp::HazardPointer* const tervel::ThreadContext::get_hazard_pointer ( )
Returns
a reference to the HazardPointer singleton
util::memory::hp::ElementList* const tervel::ThreadContext::get_hp_element_list ( )
Returns
a reference to the hp_element_list_
const uint64_t tervel::ThreadContext::get_num_threads ( )
Returns
number of threads
util::ProgressAssurance* const tervel::ThreadContext::get_progress_assurance ( )
Returns
a reference to the ProgressAssurance singleton
util::memory::rc::DescriptorPool* const tervel::ThreadContext::get_rc_descriptor_pool ( )
Returns
a reference to the rc_descriptor_pool
const uint64_t tervel::ThreadContext::get_thread_id ( )

A unique ID among all active threads.

Returns
the threads id.

Member Data Documentation

util::memory::hp::ElementList* const tervel::ThreadContext::hp_element_list_
private
util::memory::rc::DescriptorPool* const tervel::ThreadContext::rc_descriptor_pool_
private
Tervel* const tervel::ThreadContext::tervel_
private

Tervel provides a link to the shared Tervel object.

This object contains number of threads, hazard_pointer, and other shared structures.

const uint64_t tervel::ThreadContext::thread_id_
private

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