]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/threadno.cpp
06acae02606801fe4633579055102e4eaf4ca83f
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     No thread support 
   4 // Author:      Original from Wolfram Gloger/Guilhem Lavaux 
   8 // Copyright:   (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998) 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 #pragma implementation "thread.h" 
  17 wxMutex::wxMutex(void) 
  22 wxMutex::~wxMutex(void) 
  26 MutexError 
wxMutex::Lock(void) 
  32 MutexError 
wxMutex::TryLock(void) 
  38 MutexError 
wxMutex::Unlock(void) 
  44 wxCondition::wxCondition(void) 
  48 wxCondition::~wxCondition(void) 
  52 void wxCondition::Wait(wxMutex
& WXUNUSED(mutex
)) 
  56 bool wxCondition::Wait(wxMutex
& WXUNUSED(mutex
), unsigned long WXUNUSED(sec
), 
  57                       unsigned long WXUNUSED(nsec
)) 
  62 void wxCondition::Signal(void) 
  66 void wxCondition::Broadcast(void) 
  70 struct wxThreadPrivate 
{ 
  75 ThreadError 
wxThread::Create(void) 
  77   p_internal
->exit_status 
= Entry(); 
  82 ThreadError 
wxThread::Destroy(void) 
  87 void wxThread::DifferDestroy(void) 
  91 void wxThread::TestDestroy(void) 
  95 void *wxThread::Join() 
  97   return p_internal
->exit_status
; 
 100 unsigned long wxThread::GetID() 
 105 bool wxThread::IsMain(void) 
 110 bool wxThread::IsAlive(void) 
 115 void wxThread::SetPriority(int WXUNUSED(prio
)) { } 
 116 int wxThread::GetPriority(void) { } 
 118 wxMutex wxMainMutex
; // controls access to all GUI functions 
 122   p_internal 
= new wxThreadPrivate(); 
 125 wxThread::~wxThread() 
 132 // The default callback just joins the thread and throws away the result. 
 133 void wxThread::OnExit() 
 138 // Global initialization 
 139 static void wxThreadInit(void *WXUNUSED(client
)) 
 145 static void wxThreadExit(void *WXUNUSED(client
)) 
 147   wxMainMutex
.Unlock(); 
 150 // Let automatic initialization be performed from wxCommonInit(). 
 154       wxRegisterModuleFunction(wxThreadInit
, wxThreadExit
, NULL
);