#include <ThreadPT.hxx>
|
static void | detach () |
| Detach thread to release resources on exit. More...
|
|
static void | exit (void *what) |
|
static void | sleep (unsigned long usec) |
|
Definition at line 31 of file ThreadPT.hxx.
typedef void*(* YACS::BASES::ThreadPT::ThreadJob)(void *) |
ThreadPT::ThreadPT |
( |
ThreadJob |
funcPtr, |
|
|
void * |
stack, |
|
|
size_t |
stackSize = 0 |
|
) |
| |
void ThreadPT::detach |
( |
| ) |
|
|
static |
Detach thread to release resources on exit.
Definition at line 62 of file ThreadPT.cxx.
64 pthread_detach(pthread_self());
void ThreadPT::exit |
( |
void * |
what | ) |
|
|
static |
void ThreadPT::go |
( |
ThreadJob |
funcPtr, |
|
|
void * |
stack, |
|
|
size_t |
stackSize = 0 |
|
) |
| |
Definition at line 40 of file ThreadPT.cxx.
References _threadId.
Referenced by ThreadPT().
43 void **stackT=(
void **) stack;
45 pthread_attr_init(&attr);
48 err = pthread_attr_setstacksize(&attr, stackSize);
49 if (err != 0)
throw Exception(
"Error when setting thread stack size");
51 err = pthread_create(&
_threadId, &attr, funcPtr, stackT);
52 pthread_attr_destroy(&attr);
53 if(err!=0)
throw Exception(
"Error in thread creation");
bool ThreadPT::operator== |
( |
const ThreadPT & |
other | ) |
|
void ThreadPT::sleep |
( |
unsigned long |
usec | ) |
|
|
static |
pthread_t YACS::BASES::ThreadPT::_threadId |
|
private |
The documentation for this class was generated from the following files: