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

#include <trx_worker.h>

Inheritance diagram for base_worker_t:
thread_t thread_wrapper_t trx_worker_t

Public Member Functions

 base_worker_t (ShoreEnv *env, std::string tname, const int use_sli)
 
virtual ~base_worker_t ()
 
void set_next (base_worker_t *apworker)
 
base_worker_tget_next ()
 
void set_data_owner_state (const eDataOwnerState ados)
 
bool is_alone_owner ()
 
unsigned set_ws (const unsigned new_ws)
 
unsigned get_ws ()
 
bool can_continue (const unsigned my_ws)
 
bool is_sleeping (void)
 
int condex_sleep ()
 
void condex_wakeup ()
 
unsigned get_control ()
 
bool set_control (const unsigned awc)
 
void stop ()
 
void start ()
 
void pause ()
 
int work_PAUSED ()
 
int work_ACTIVE ()
 
int work_STOPPED ()
 
void work ()
 
bool abort_one_trx (xct_t *axct)
 
void stats ()
 
worker_stats_t get_stats ()
 
void reset_stats ()
 
- Public Member Functions inherited from thread_t
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

virtual int _work_PAUSED_impl ()
 
virtual int _work_ACTIVE_impl ()=0
 
virtual int _work_STOPPED_impl ()
 
virtual int _pre_STOP_impl ()=0
 
void _print_stats_impl () const
 
- Protected Member Functions inherited from thread_t
 thread_t (const std::string &name)
 

Protected Attributes

unsigned _control
 
eDataOwnerState _data_owner
 
unsigned _ws
 
condex _notify
 
ShoreEnv_env
 
base_worker_t_next
 
tatas_lock _next_lock
 
worker_stats_t _stats
 
bool _is_bound
 
int _use_sli
 
- Protected Attributes inherited from thread_t
bool _delete_me
 

Private Member Functions

 base_worker_t (base_worker_t const &)
 
void operator= (base_worker_t const &)
 

Constructor & Destructor Documentation

§ base_worker_t() [1/2]

base_worker_t::base_worker_t ( ShoreEnv env,
std::string  tname,
const int  use_sli 
)
inline

§ ~base_worker_t()

virtual base_worker_t::~base_worker_t ( )
inlinevirtual

§ base_worker_t() [2/2]

base_worker_t::base_worker_t ( base_worker_t const &  )
private

Member Function Documentation

§ _pre_STOP_impl()

virtual int base_worker_t::_pre_STOP_impl ( )
protectedpure virtual

Implemented in trx_worker_t.

§ _print_stats_impl()

void base_worker_t::_print_stats_impl ( ) const
protected

§ _work_ACTIVE_impl()

virtual int base_worker_t::_work_ACTIVE_impl ( )
protectedpure virtual

Implemented in trx_worker_t.

§ _work_PAUSED_impl()

int base_worker_t::_work_PAUSED_impl ( )
protectedvirtual

§ _work_STOPPED_impl()

int base_worker_t::_work_STOPPED_impl ( )
protectedvirtual

§ abort_one_trx()

bool base_worker_t::abort_one_trx ( xct_t axct)

§ can_continue()

bool base_worker_t::can_continue ( const unsigned  my_ws)
inline

§ condex_sleep()

int base_worker_t::condex_sleep ( )
inline

§ condex_wakeup()

void base_worker_t::condex_wakeup ( )
inline

§ get_control()

unsigned base_worker_t::get_control ( )
inline

§ get_next()

base_worker_t* base_worker_t::get_next ( )
inline

§ get_stats()

worker_stats_t base_worker_t::get_stats ( )

§ get_ws()

unsigned base_worker_t::get_ws ( )
inline

§ is_alone_owner()

bool base_worker_t::is_alone_owner ( )
inline

§ is_sleeping()

bool base_worker_t::is_sleeping ( void  )
inline

§ operator=()

void base_worker_t::operator= ( base_worker_t const &  )
private

§ pause()

void base_worker_t::pause ( )
inline

§ reset_stats()

void base_worker_t::reset_stats ( )
inline

§ set_control()

bool base_worker_t::set_control ( const unsigned  awc)
inline

§ set_data_owner_state()

void base_worker_t::set_data_owner_state ( const eDataOwnerState  ados)
inline

§ set_next()

void base_worker_t::set_next ( base_worker_t apworker)
inline

§ set_ws()

unsigned base_worker_t::set_ws ( const unsigned  new_ws)
inline

§ start()

void base_worker_t::start ( )
inline

§ stats()

void base_worker_t::stats ( )

§ stop()

void base_worker_t::stop ( )
inline

§ work()

void base_worker_t::work ( )
virtual

The previously used run() is already used by smthread core. Thus, run() now does the thread_t specific setup and calls work(). That is, work() is the new entry function for thread_t instead of run().

Implements thread_t.

§ work_ACTIVE()

int base_worker_t::work_ACTIVE ( )
inline

§ work_PAUSED()

int base_worker_t::work_PAUSED ( )
inline

§ work_STOPPED()

int base_worker_t::work_STOPPED ( )
inline

Member Data Documentation

§ _control

unsigned base_worker_t::_control
protected

§ _data_owner

eDataOwnerState base_worker_t::_data_owner
protected

§ _env

ShoreEnv* base_worker_t::_env
protected

§ _is_bound

bool base_worker_t::_is_bound
protected

§ _next

base_worker_t* base_worker_t::_next
protected

§ _next_lock

tatas_lock base_worker_t::_next_lock
protected

§ _notify

condex base_worker_t::_notify
protected

§ _stats

worker_stats_t base_worker_t::_stats
protected

§ _use_sli

int base_worker_t::_use_sli
protected

§ _ws

unsigned base_worker_t::_ws
protected

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