18 #if defined( _WIN32 ) && !defined( __SYMBIAN32__ )
36 class Thread::ThreadImpl
46 #if defined( _WIN32 ) && !defined( __SYMBIAN32__ )
48 #elif defined( HAVE_PTHREAD )
52 #if defined( _WIN32 ) && !defined( __SYMBIAN32__ )
53 static DWORD WINAPI redirect(
void* context );
54 #elif defined( HAVE_PTHREAD )
55 static void* redirect(
void* context );
60 #if defined( _WIN32 ) && !defined( __SYMBIAN32__ )
61 DWORD WINAPI Thread::ThreadImpl::redirect(
void* context )
63 Thread*
self =
static_cast<Thread*
>( context );
67 #elif defined( HAVE_PTHREAD )
68 void* Thread::ThreadImpl::redirect(
void* context )
70 Thread*
self =
static_cast<Thread*
>( context );
78 #if defined( _WIN32 ) && !defined( __SYMBIAN32__ )
79 m_self = CreateThread( 0, 0, redirect, thread, 0, 0 );
80 #elif defined( HAVE_PTHREAD )
81 pthread_create( &m_self, 0, redirect, thread );
87 #if defined( _WIN32 ) && !defined( __SYMBIAN32__ )
88 WaitForSingleObject( m_self, INFINITE );
89 #elif defined( HAVE_PTHREAD )
90 pthread_join( m_self, 0 );
97 : m_impl( new ThreadImpl() )
109 m_impl->start(
this );