Committing in .
OpenVMS specific changes: setup.h_vms : updated configuration for OpenVMS threadspsx.cpp : the type long on OpenVMS is 32 bits. therefor some casts are changed to long long, for OpenVMS only. Modified Files: Tag: WX_2_4_BRANCH wxWindows/setup.h_vms wxWindows/src/unix/threadpsx.cpp ---------------------------------------------------------------------- git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,6 +94,7 @@
|
|||||||
#undef __NETBSD__
|
#undef __NETBSD__
|
||||||
#undef __BSD__
|
#undef __BSD__
|
||||||
#undef __FREEBSD__
|
#undef __FREEBSD__
|
||||||
|
#undef __OPENBSD__
|
||||||
#define __VMS__
|
#define __VMS__
|
||||||
#undef __ULTRIX__
|
#undef __ULTRIX__
|
||||||
#undef __DATA_GENERAL__
|
#undef __DATA_GENERAL__
|
||||||
|
@@ -696,8 +696,12 @@ void *wxThreadInternal::PthreadStart(wxThread *thread)
|
|||||||
{
|
{
|
||||||
wxThreadInternal *pthread = thread->m_internal;
|
wxThreadInternal *pthread = thread->m_internal;
|
||||||
|
|
||||||
wxLogTrace(TRACE_THREADS, _T("Thread %ld started."), (long)pthread->GetId());
|
#ifdef __VMS
|
||||||
|
wxLogTrace(TRACE_THREADS, _T("Thread %ld started."), (long long)pthread->GetId());
|
||||||
|
#else
|
||||||
|
wxLogTrace(TRACE_THREADS, _T("Thread %ld started."), (long)pthread->GetId());
|
||||||
|
#endif
|
||||||
|
|
||||||
// associate the thread pointer with the newly created thread so that
|
// associate the thread pointer with the newly created thread so that
|
||||||
// wxThread::This() will work
|
// wxThread::This() will work
|
||||||
int rc = pthread_setspecific(gs_keySelf, thread);
|
int rc = pthread_setspecific(gs_keySelf, thread);
|
||||||
@@ -734,13 +738,21 @@ void *wxThreadInternal::PthreadStart(wxThread *thread)
|
|||||||
{
|
{
|
||||||
// call the main entry
|
// call the main entry
|
||||||
wxLogTrace(TRACE_THREADS, _T("Thread %ld about to enter its Entry()."),
|
wxLogTrace(TRACE_THREADS, _T("Thread %ld about to enter its Entry()."),
|
||||||
|
#ifdef __VMS
|
||||||
|
(long long)pthread->GetId());
|
||||||
|
#else
|
||||||
(long)pthread->GetId());
|
(long)pthread->GetId());
|
||||||
|
#endif
|
||||||
|
|
||||||
pthread->m_exitcode = thread->Entry();
|
pthread->m_exitcode = thread->Entry();
|
||||||
|
|
||||||
wxLogTrace(TRACE_THREADS, _T("Thread %ld Entry() returned %lu."),
|
wxLogTrace(TRACE_THREADS, _T("Thread %ld Entry() returned %lu."),
|
||||||
|
#ifdef __VMS
|
||||||
|
(long long)pthread->GetId(), (unsigned long)pthread->m_exitcode);
|
||||||
|
#else
|
||||||
(long)pthread->GetId(), (unsigned long)pthread->m_exitcode);
|
(long)pthread->GetId(), (unsigned long)pthread->m_exitcode);
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
wxCriticalSectionLocker lock(thread->m_critsect);
|
wxCriticalSectionLocker lock(thread->m_critsect);
|
||||||
|
|
||||||
@@ -849,8 +861,12 @@ void wxThreadInternal::Wait()
|
|||||||
wxMutexGuiLeave();
|
wxMutexGuiLeave();
|
||||||
|
|
||||||
wxLogTrace(TRACE_THREADS,
|
wxLogTrace(TRACE_THREADS,
|
||||||
|
#ifdef __VMS
|
||||||
|
_T("Starting to wait for thread %ld to exit."), (long long)GetId());
|
||||||
|
#else
|
||||||
_T("Starting to wait for thread %ld to exit."), (long)GetId());
|
_T("Starting to wait for thread %ld to exit."), (long)GetId());
|
||||||
|
#endif
|
||||||
|
|
||||||
// to avoid memory leaks we should call pthread_join(), but it must only be
|
// to avoid memory leaks we should call pthread_join(), but it must only be
|
||||||
// done once so use a critical section to serialize the code below
|
// done once so use a critical section to serialize the code below
|
||||||
{
|
{
|
||||||
@@ -888,8 +904,12 @@ void wxThreadInternal::Pause()
|
|||||||
wxCHECK_RET( m_state == STATE_PAUSED,
|
wxCHECK_RET( m_state == STATE_PAUSED,
|
||||||
wxT("thread must first be paused with wxThread::Pause().") );
|
wxT("thread must first be paused with wxThread::Pause().") );
|
||||||
|
|
||||||
wxLogTrace(TRACE_THREADS, _T("Thread %ld goes to sleep."), (long)GetId());
|
#ifdef __VMS
|
||||||
|
wxLogTrace(TRACE_THREADS, _T("Thread %ld goes to sleep."), (long long)GetId());
|
||||||
|
#else
|
||||||
|
wxLogTrace(TRACE_THREADS, _T("Thread %ld goes to sleep."), (long)GetId());
|
||||||
|
#endif
|
||||||
|
|
||||||
// wait until the semaphore is Post()ed from Resume()
|
// wait until the semaphore is Post()ed from Resume()
|
||||||
m_semSuspend.Wait();
|
m_semSuspend.Wait();
|
||||||
}
|
}
|
||||||
@@ -903,8 +923,12 @@ void wxThreadInternal::Resume()
|
|||||||
// TestDestroy() since the last call to Pause() for example
|
// TestDestroy() since the last call to Pause() for example
|
||||||
if ( IsReallyPaused() )
|
if ( IsReallyPaused() )
|
||||||
{
|
{
|
||||||
wxLogTrace(TRACE_THREADS, _T("Waking up thread %ld"), (long)GetId());
|
#ifdef __VMS
|
||||||
|
wxLogTrace(TRACE_THREADS, _T("Waking up thread %ld"), (long long)GetId());
|
||||||
|
#else
|
||||||
|
wxLogTrace(TRACE_THREADS, _T("Waking up thread %ld"), (long)GetId());
|
||||||
|
#endif
|
||||||
|
|
||||||
// wake up Pause()
|
// wake up Pause()
|
||||||
m_semSuspend.Post();
|
m_semSuspend.Post();
|
||||||
|
|
||||||
@@ -914,7 +938,11 @@ void wxThreadInternal::Resume()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogTrace(TRACE_THREADS, _T("Thread %ld is not yet really paused"),
|
wxLogTrace(TRACE_THREADS, _T("Thread %ld is not yet really paused"),
|
||||||
|
#ifdef __VMS
|
||||||
|
(long long)GetId());
|
||||||
|
#else
|
||||||
(long)GetId());
|
(long)GetId());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SetState(STATE_RUNNING);
|
SetState(STATE_RUNNING);
|
||||||
|
Reference in New Issue
Block a user