Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

omni_thread Class Reference

#include <omnithread.h>

Inheritance diagram for omni_thread:

_internal_omni_thread_dummy omni_thread_dummy omni_thread_dummy omni_thread_dummy omni_thread_dummy omni_thread_dummy List of all members.

Public Types

typedef unsigned int key_t
enum  priority_t { PRIORITY_LOW, PRIORITY_NORMAL, PRIORITY_HIGH }
enum  state_t { STATE_NEW, STATE_RUNNING, STATE_TERMINATED }

Public Member Functions

 omni_thread (void(*fn)(void *), void *arg=NULL, priority_t pri=PRIORITY_NORMAL)
 omni_thread (void *(*fn)(void *), void *arg=NULL, priority_t pri=PRIORITY_NORMAL)
void start (void)
void join (void **)
void set_priority (priority_t)
value_tset_value (key_t k, value_t *v)
value_tget_value (key_t k)
value_tremove_value (key_t k)
priority_t priority (void)
state_t state (void)
int id (void)

Static Public Member Functions

static omni_threadcreate (void(*fn)(void *), void *arg=NULL, priority_t pri=PRIORITY_NORMAL)
static omni_threadcreate (void *(*fn)(void *), void *arg=NULL, priority_t pri=PRIORITY_NORMAL)
static void exit (void *return_value=NULL)
static omni_threadself (void)
static void yield (void)
static void sleep (unsigned long secs, unsigned long nanosecs=0)
static void get_time (unsigned long *abs_sec, unsigned long *abs_nsec, unsigned long rel_sec=0, unsigned long rel_nsec=0)
static void stacksize (unsigned long sz)
static unsigned long stacksize ()
static key_t allocate_key ()
static omni_threadcreate_dummy (void)
static void release_dummy ()

Protected Member Functions

 omni_thread (void *arg=NULL, priority_t pri=PRIORITY_NORMAL)
void start_undetached (void)
virtual ~omni_thread (void)

Private Member Functions

virtual void run (void *)
virtual void * run_undetached (void *)
void common_constructor (void *arg, priority_t pri, int det)
 omni_thread (const omni_thread &)
omni_threadoperator= (const omni_thread &)

Private Attributes

omni_mutex mutex
state_t _state
priority_t _priority
int _id
void(* fn_void )(void *)
void *(* fn_ret )(void *)
void * thread_arg
int detached
int _dummy
value_t ** _values
unsigned long _value_alloc

Static Private Attributes

static omni_mutexnext_id_mutex = 0
static int next_id = 0

Friends

class init_t
class omni_thread_dummy

Classes

class  ensure_self
class  init_t
class  value_t

Member Typedef Documentation

typedef unsigned int omni_thread::key_t
 


Member Enumeration Documentation

enum omni_thread::priority_t
 

Enumeration values:
PRIORITY_LOW 
PRIORITY_NORMAL 
PRIORITY_HIGH 

enum omni_thread::state_t
 

Enumeration values:
STATE_NEW 
STATE_RUNNING 
STATE_TERMINATED 


Constructor & Destructor Documentation

omni_thread::omni_thread void(*)(void *)  fn,
void *  arg = NULL,
priority_t  pri = PRIORITY_NORMAL
 

omni_thread::omni_thread void *(*)(void *)  fn,
void *  arg = NULL,
priority_t  pri = PRIORITY_NORMAL
 

omni_thread::omni_thread void *  arg = NULL,
priority_t  pri = PRIORITY_NORMAL
[protected]
 

omni_thread::~omni_thread void   )  [protected, virtual]
 

omni_thread::omni_thread const omni_thread  )  [private]
 


Member Function Documentation

omni_thread::key_t omni_thread::allocate_key  )  [static]
 

void omni_thread::common_constructor void *  arg,
priority_t  pri,
int  det
[private]
 

omni_thread * omni_thread::create void *(*)(void *)  fn,
void *  arg = NULL,
priority_t  pri = PRIORITY_NORMAL
[static]
 

omni_thread * omni_thread::create void(*)(void *)  fn,
void *  arg = NULL,
priority_t  pri = PRIORITY_NORMAL
[static]
 

omni_thread * omni_thread::create_dummy void   )  [static]
 

void omni_thread::exit void *  return_value = NULL  )  [static]
 

void omni_thread::get_time unsigned long *  abs_sec,
unsigned long *  abs_nsec,
unsigned long  rel_sec = 0,
unsigned long  rel_nsec = 0
[static]
 

omni_thread::value_t * omni_thread::get_value key_t  k  ) 
 

int omni_thread::id void   )  [inline]
 

void omni_thread::join void **   ) 
 

omni_thread& omni_thread::operator= const omni_thread  )  [private]
 

priority_t omni_thread::priority void   )  [inline]
 

void omni_thread::release_dummy  )  [static]
 

omni_thread::value_t * omni_thread::remove_value key_t  k  ) 
 

virtual void omni_thread::run void *   )  [inline, private, virtual]
 

virtual void* omni_thread::run_undetached void *   )  [inline, private, virtual]
 

omni_thread * omni_thread::self void   )  [static]
 

void omni_thread::set_priority priority_t   ) 
 

omni_thread::value_t * omni_thread::set_value key_t  k,
value_t v
 

void omni_thread::sleep unsigned long  secs,
unsigned long  nanosecs = 0
[static]
 

unsigned long omni_thread::stacksize  )  [static]
 

void omni_thread::stacksize unsigned long  sz  )  [static]
 

void omni_thread::start void   ) 
 

void omni_thread::start_undetached void   )  [protected]
 

state_t omni_thread::state void   )  [inline]
 

void omni_thread::yield void   )  [static]
 


Friends And Related Function Documentation

friend class init_t [friend]
 

friend class omni_thread_dummy [friend]
 


Member Data Documentation

int omni_thread::_dummy [private]
 

int omni_thread::_id [private]
 

priority_t omni_thread::_priority [private]
 

state_t omni_thread::_state [private]
 

unsigned long omni_thread::_value_alloc [private]
 

value_t** omni_thread::_values [private]
 

int omni_thread::detached [private]
 

void*(* omni_thread::fn_ret)(void *) [private]
 

void(* omni_thread::fn_void)(void *) [private]
 

omni_mutex omni_thread::mutex [private]
 

int omni_thread::next_id = 0 [static, private]
 

omni_mutex * omni_thread::next_id_mutex = 0 [static, private]
 

void* omni_thread::thread_arg [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Mar 23 12:30:38 2005 for GNU Radio by  doxygen 1.4.0