#include <system_abstraction.h>
Public Member Functions | |
| SystemThread (void *(*f)(void *), void *param) | |
| ~SystemThread () | |
| int | join (unsigned milliseconds=~(unsigned) 0) |
Static Private Member Functions | |
| static void * | ThreadProc (void *parameter) |
Private Attributes | |
| pthread_t | thread |
| void *(* | thread_f )(void *) |
| void * | thread_param |
Definition at line 85 of file system_abstraction.h.
| SystemThread::SystemThread | ( | void *(*)(void *) | f, | |
| void * | param | |||
| ) | [inline] |
Definition at line 97 of file system_abstraction.h.
References thread, and ThreadProc().
00097 : thread_f(f), thread_param(param) 00098 { 00099 assert( pthread_create( &thread, NULL, &SystemThread::ThreadProc, (void*)this)==0 ); 00100 }
| SystemThread::~SystemThread | ( | ) | [inline] |
| static void* SystemThread::ThreadProc | ( | void * | parameter | ) | [inline, static, private] |
Definition at line 91 of file system_abstraction.h.
References thread_f, and thread_param.
Referenced by SystemThread().
00092 { 00093 SystemThread *this_ptr=(SystemThread *)parameter; 00094 return (void*)this_ptr->thread_f(this_ptr->thread_param); 00095 }
| int SystemThread::join | ( | unsigned | milliseconds = ~(unsigned)0 |
) | [inline] |
Definition at line 102 of file system_abstraction.h.
References thread.
Referenced by RWLockTester::run_test(), and ~SystemThread().
00103 { 00104 return pthread_join(thread, NULL); 00105 }
pthread_t SystemThread::thread [private] |
void*(* SystemThread::thread_f)(void *) [private] |
Referenced by ThreadProc().
void* SystemThread::thread_param [private] |
1.5.5