]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/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 ///////////////////////////////////////////////////////////////////////////// 
  12 // For compilers that support precompilation, includes "wx.h". 
  13 #include "wx/wxprec.h" 
  15 #include "wx/thread.h" 
  17 #include "wx/module.h" 
  28         wxLogDebug( "wxMutex warning: destroying a locked mutex (%d locks)", m_locked 
); 
  31 wxMutexError 
wxMutex::Lock() 
  34     return wxMUTEX_NO_ERROR
; 
  37 wxMutexError 
wxMutex::TryLock() 
  42     return wxMUTEX_NO_ERROR
; 
  45 wxMutexError 
wxMutex::Unlock() 
  48         return wxMUTEX_UNLOCKED
; 
  50     return wxMUTEX_NO_ERROR
; 
  53 wxCondition::wxCondition() 
  57 wxCondition::~wxCondition() 
  61 void wxCondition::Wait(wxMutex
& WXUNUSED(mutex
)) 
  65 bool wxCondition::Wait(wxMutex
& WXUNUSED(mutex
), unsigned long WXUNUSED(sec
), 
  66         unsigned long WXUNUSED(nsec
)) 
  71 void wxCondition::Signal() 
  75 void wxCondition::Broadcast() 
  79 struct wxThreadInternal
 
  85 wxThreadError 
wxThread::Create() 
  87     p_internal
->exit_status 
= Entry(); 
  89     return wxTHREAD_NO_ERROR
; 
  92 wxThreadError 
wxThread::Destroy() 
  94     return wxTHREAD_NOT_RUNNING
; 
  97 wxThreadError 
wxThread::Pause() 
  99     return wxTHREAD_NOT_RUNNING
; 
 102 wxThreadError 
wxThread::Resume() 
 104     return wxTHREAD_NOT_RUNNING
; 
 107 void wxThread::DeferDestroy( bool WXUNUSED(on
) ) 
 111 void wxThread::TestDestroy() 
 115 void *wxThread::Join() 
 117     return p_internal
->exit_status
; 
 120 unsigned long wxThread::GetID() const 
 125 bool wxThread::IsMain() 
 130 bool wxThread::IsRunning() const 
 135 bool wxThread::IsAlive() const 
 140 void wxThread::SetPriority(int WXUNUSED(prio
)) { } 
 141 int wxThread::GetPriority() const { return 0; } 
 143 wxMutex 
*wxMainMutex
; // controls access to all GUI functions 
 147     p_internal 
= new wxThreadInternal(); 
 150 wxThread::~wxThread() 
 157 // The default callback just joins the thread and throws away the result. 
 158 void wxThread::OnExit() 
 163 IMPLEMENT_DYNAMIC_CLASS(wxThreadModule
, wxModule
) 
 165 bool wxThreadModule::OnInit() 
 167     wxMainMutex 
= new wxMutex(); 
 172 void wxThreadModule::OnExit() 
 174     wxMainMutex
->Unlock(); 
 180 void wxMutexGuiEnter() 
 184 void wxMutexGuiLeave()