SystemThread Class Reference

#include <system_abstraction.h>

List of all members.

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


Detailed Description

Definition at line 85 of file system_abstraction.h.


Constructor & Destructor Documentation

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]

Definition at line 101 of file system_abstraction.h.

References join().

00101 { join(); }


Member Function Documentation

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         }


Member Data Documentation

pthread_t SystemThread::thread [private]

Definition at line 87 of file system_abstraction.h.

Referenced by join(), and SystemThread().

void*(* SystemThread::thread_f)(void *) [private]

Referenced by ThreadProc().

void* SystemThread::thread_param [private]

Definition at line 89 of file system_abstraction.h.

Referenced by ThreadProc().


The documentation for this class was generated from the following file:

Generated on Wed Mar 19 15:00:00 2008 for rwlock by  doxygen 1.5.5