]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/threadno.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     Solaris thread support 
   4 // Author:      Guilhem Lavaux 
   8 // Copyright:   (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  13     #pragma implementation "thread.h" 
  17 #include "wx/module.h" 
  18 #include "wx/thread.h" 
  29         wxLogDebug( "wxMutex warning: destroying a locked mutex (%d locks)", m_locked 
); 
  32 wxMutexError 
wxMutex::Lock() 
  35     return wxMUTEX_NO_ERROR
; 
  38 wxMutexError 
wxMutex::TryLock() 
  43     return wxMUTEX_NO_ERROR
; 
  46 wxMutexError 
wxMutex::Unlock() 
  49         return wxMUTEX_UNLOCKED
; 
  51     return wxMUTEX_NO_ERROR
; 
  54 wxCondition::wxCondition() 
  58 wxCondition::~wxCondition() 
  62 void wxCondition::Wait(wxMutex
& WXUNUSED(mutex
)) 
  66 bool wxCondition::Wait(wxMutex
& WXUNUSED(mutex
), unsigned long WXUNUSED(sec
), 
  67         unsigned long WXUNUSED(nsec
)) 
  72 void wxCondition::Signal() 
  76 void wxCondition::Broadcast() 
  80 struct wxThreadInternal
 
  86 wxThreadError 
wxThread::Create() 
  88     p_internal
->exit_status 
= Entry(); 
  90     return wxTHREAD_NO_ERROR
; 
  93 wxThreadError 
wxThread::Destroy() 
  95     return wxTHREAD_NOT_RUNNING
; 
  98 wxThreadError 
wxThread::Pause() 
 100     return wxTHREAD_NOT_RUNNING
; 
 103 wxThreadError 
wxThread::Resume() 
 105     return wxTHREAD_NOT_RUNNING
; 
 108 void wxThread::DeferDestroy( bool WXUNUSED(on
) ) 
 112 void wxThread::TestDestroy() 
 116 void *wxThread::Join() 
 118     return p_internal
->exit_status
; 
 121 unsigned long wxThread::GetID() const 
 126 bool wxThread::IsMain() 
 131 bool wxThread::IsRunning() const 
 136 bool wxThread::IsAlive() const 
 141 void wxThread::SetPriority(int WXUNUSED(prio
)) { } 
 142 int wxThread::GetPriority() const { return 0; } 
 144 wxMutex 
*wxMainMutex
; // controls access to all GUI functions 
 148     p_internal 
= new wxThreadInternal(); 
 151 wxThread::~wxThread() 
 158 // The default callback just joins the thread and throws away the result. 
 159 void wxThread::OnExit() 
 164 IMPLEMENT_DYNAMIC_CLASS(wxThreadModule
, wxModule
) 
 166 bool wxThreadModule::OnInit() 
 168     wxMainMutex 
= new wxMutex(); 
 173 void wxThreadModule::OnExit() 
 175     wxMainMutex
->Unlock(); 
 181 void wxMutexGuiEnter() 
 185 void wxMutexGuiLeave()