|
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_t * | set_value (key_t k, value_t *v) |
| value_t * | get_value (key_t k) |
| value_t * | remove_value (key_t k) |
| priority_t | priority (void) |
| state_t | state (void) |
| int | id (void) |
Static Public Member Functions |
| omni_thread * | create (void(*fn)(void *), void *arg=NULL, priority_t pri=PRIORITY_NORMAL) |
| omni_thread * | create (void *(*fn)(void *), void *arg=NULL, priority_t pri=PRIORITY_NORMAL) |
| void | exit (void *return_value=NULL) |
| omni_thread * | self (void) |
| void | yield (void) |
| void | sleep (unsigned long secs, unsigned long nanosecs=0) |
| void | get_time (unsigned long *abs_sec, unsigned long *abs_nsec, unsigned long rel_sec=0, unsigned long rel_nsec=0) |
| void | stacksize (unsigned long sz) |
| unsigned long | stacksize () |
| key_t | allocate_key () |
| omni_thread * | create_dummy (void) |
| 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_thread & | operator= (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 |
| omni_mutex * | next_id_mutex = 0 |
| int | next_id = 0 |