mb_worker Class Reference

Worker thread for thread_per_block runtime. More...

#include <mb_worker.h>

Inheritance diagram for mb_worker:

Inheritance graph
[legend]

List of all members.

Public Types

enum  worker_state_t { TS_UNINITIALIZED, TS_RUNNING, TS_DEAD }
 worker thread states More...
enum  cause_of_death_t {
  RIP_NOT_DEAD_YET, RIP_EXIT, RIP_TERMINATE, RIP_CTOR_EXCEPTION,
  RIP_INIT_EXCEPTION, RIP_UNHANDLED_EXCEPTION
}
 why we're dead More...

Public Member Functions

 mb_worker (mb_runtime_thread_per_block *runtime, mb_mblock_maker_t maker, const std::string &instance_name, pmt_t user_arg)
void worker_thread_top_level ()
 This code runs as the top-level of the new thread.
void * run_undetached (void *arg)
 Invokes the top-level of the new thread (name kind of sucks).

Public Attributes

mb_runtime_thread_per_blockd_runtime
mb_mblock_maker_t d_maker
std::string d_instance_name
pmt_t d_user_arg
mb_mblock_sptr d_mblock
omni_mutex d_mutex
 General mutex for all these fields.
omni_condition d_state_cond
worker_state_t d_state
cause_of_death_t d_why_dead


Detailed Description

Worker thread for thread_per_block runtime.

Member Enumeration Documentation

why we're dead

Enumerator:
RIP_NOT_DEAD_YET 
RIP_EXIT 
RIP_TERMINATE 
RIP_CTOR_EXCEPTION 
RIP_INIT_EXCEPTION 
RIP_UNHANDLED_EXCEPTION 

worker thread states

Enumerator:
TS_UNINITIALIZED 
TS_RUNNING 
TS_DEAD 


Constructor & Destructor Documentation

mb_worker::mb_worker ( mb_runtime_thread_per_block runtime,
mb_mblock_maker_t  maker,
const std::string &  instance_name,
pmt_t  user_arg 
)


Member Function Documentation

void* mb_worker::run_undetached ( void *  arg  )  [virtual]

Invokes the top-level of the new thread (name kind of sucks).

Reimplemented from omni_thread.

void mb_worker::worker_thread_top_level (  ) 

This code runs as the top-level of the new thread.


Member Data Documentation

General mutex for all these fields.

They are accessed by both the main runtime thread and the newly created thread that runs the mblock's main loop.


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

Generated on Wed Jul 29 07:22:55 2009 for GNU Radio 3.2.2 C++ API by  doxygen 1.5.8