#include <posix.h>
Public Types | |
typedef pthread_t | id_t |
Public Member Functions | |
posix_thread () | |
A cheap constructor. | |
~posix_thread () | |
The thread may be still running (But this would be a bug...). | |
int | create (posix_fun_ptr aFunc, void *aData) |
void | cancel (void) |
void | join (void) |
bool | exec_lock (void) |
Static Public Member Functions | |
static id_t | self (void) |
Private Member Functions | |
posix_thread (const posix_thread &) | |
Threads are not copiable, nor assignable. | |
posix_thread & | operator= (const posix_thread &) |
Private Attributes | |
pthread_t | _thread |
The actual POSIX thread. | |
bool | _created |
typedef pthread_t rpa::posix_thread::id_t |
rpa::posix_thread::posix_thread | ( | const posix_thread & | ) | [private] |
Threads are not copiable, nor assignable.
rpa::posix_thread::posix_thread | ( | ) |
A cheap constructor.
rpa::posix_thread::~posix_thread | ( | ) |
The thread may be still running (But this would be a bug...).
void rpa::posix_thread::cancel | ( | void | ) |
int rpa::posix_thread::create | ( | posix_fun_ptr | aFunc, | |
void * | aData | |||
) |
If there are not enough resources to create a new thread, it is possible to call the function in the current thread.
bool rpa::posix_thread::exec_lock | ( | void | ) |
void rpa::posix_thread::join | ( | void | ) |
posix_thread& rpa::posix_thread::operator= | ( | const posix_thread & | ) | [private] |
static id_t rpa::posix_thread::self | ( | void | ) | [inline, static] |
Returns the id of the current thread. It is not mandatory to implement this member.
bool rpa::posix_thread::_created [private] |
pthread_t rpa::posix_thread::_thread [private] |
The actual POSIX thread.