Zero  0.1.0
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
thread_t Class Referenceabstract

#include <kits_thread.h>

Inheritance diagram for thread_t:
thread_wrapper_t abort_smt_t base_client_t base_worker_t checkpointer_t crasher_t db_init_smt_t member_func_thread_t< Class, Functor > root_thread_t table_loading_smt_t tpcb::ShoreTPCBEnv::table_builder_t tpcb::ShoreTPCBEnv::table_creator_t tpcc::ShoreTPCCEnv::table_builder_t tpcc::ShoreTPCCEnv::table_creator_t ycsb::table_builder_t ycsb::table_creator_t

Public Member Functions

virtual void work ()=0
 
bool delete_me ()
 
std::string thread_name ()
 
randgen_trandgen ()
 Returns pointer to thread_t's randgen_t object. More...
 
int rand ()
 Returns a pseudo-random integer between 0 and RAND_MAX. More...
 
int rand (int n)
 
virtual ~thread_t ()
 
- Public Member Functions inherited from thread_wrapper_t
 thread_wrapper_t ()
 
virtual ~thread_wrapper_t ()
 
virtual void before_run ()
 
virtual void after_run ()
 
void spawn ()
 
void fork ()
 
void join ()
 

Protected Member Functions

 thread_t (const std::string &name)
 

Protected Attributes

bool _delete_me
 

Private Member Functions

void run ()
 
void setuppool (thread_pool *apool)
 
void setupthr ()
 

Private Attributes

std::string _thread_name
 
randgen_t _randgen
 
thread_pool_ppool
 

Constructor & Destructor Documentation

§ ~thread_t()

virtual thread_t::~thread_t ( )
inlinevirtual

§ thread_t()

thread_t::thread_t ( const std::string &  name)
protected

Member Function Documentation

§ delete_me()

bool thread_t::delete_me ( )
inline

§ rand() [1/2]

int thread_t::rand ( )
inline

Returns a pseudo-random integer between 0 and RAND_MAX.

§ rand() [2/2]

int thread_t::rand ( int  n)
inline

Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive).

Source http://java.sun.com/j2se/1.5.0/docs/api/java/util/Random.html#nextInt(int)

§ randgen()

randgen_t* thread_t::randgen ( )
inline

Returns pointer to thread_t's randgen_t object.

§ run()

void thread_t::run ( )
privatevirtual

Implements thread_wrapper_t.

§ setuppool()

void thread_t::setuppool ( thread_pool apool)
inlineprivate

§ setupthr()

void thread_t::setupthr ( )
private

§ thread_name()

std::string thread_t::thread_name ( )
inline

§ work()

virtual void thread_t::work ( )
pure virtual

Member Data Documentation

§ _delete_me

bool thread_t::_delete_me
protected

§ _ppool

thread_pool* thread_t::_ppool
private

smthread_t::fork() is going to call run()

§ _randgen

randgen_t thread_t::_randgen
private

§ _thread_name

std::string thread_t::_thread_name
private

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