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:
Jouk Jansen
2002-10-22 07:11:32 +00:00
parent 6a8dabe2ae
commit 7f42651bb1
2 changed files with 38 additions and 9 deletions

View File

@@ -94,6 +94,7 @@
#undef __NETBSD__
#undef __BSD__
#undef __FREEBSD__
#undef __OPENBSD__
#define __VMS__
#undef __ULTRIX__
#undef __DATA_GENERAL__

View File

@@ -696,7 +696,11 @@ void *wxThreadInternal::PthreadStart(wxThread *thread)
{
wxThreadInternal *pthread = thread->m_internal;
#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
// wxThread::This() will work
@@ -734,12 +738,20 @@ void *wxThreadInternal::PthreadStart(wxThread *thread)
{
// call the main entry
wxLogTrace(TRACE_THREADS, _T("Thread %ld about to enter its Entry()."),
#ifdef __VMS
(long long)pthread->GetId());
#else
(long)pthread->GetId());
#endif
pthread->m_exitcode = thread->Entry();
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);
#endif
{
wxCriticalSectionLocker lock(thread->m_critsect);
@@ -849,7 +861,11 @@ void wxThreadInternal::Wait()
wxMutexGuiLeave();
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());
#endif
// 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
@@ -888,7 +904,11 @@ void wxThreadInternal::Pause()
wxCHECK_RET( m_state == STATE_PAUSED,
wxT("thread must first be paused with wxThread::Pause().") );
#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()
m_semSuspend.Wait();
@@ -903,7 +923,11 @@ void wxThreadInternal::Resume()
// TestDestroy() since the last call to Pause() for example
if ( IsReallyPaused() )
{
#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()
m_semSuspend.Post();
@@ -914,7 +938,11 @@ void wxThreadInternal::Resume()
else
{
wxLogTrace(TRACE_THREADS, _T("Thread %ld is not yet really paused"),
#ifdef __VMS
(long long)GetId());
#else
(long)GetId());
#endif
}
SetState(STATE_RUNNING);