void wxMutexGuiEnter()
{
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
}
void wxMutexGuiLeave()
{
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
}
#endif
void wxThread::SetPriority(int WXUNUSED(prio)) { }
int wxThread::GetPriority() const { return 0; }
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
wxThread::wxThread()
{
};
bool wxThreadModule::OnInit() {
- wxMainMutex.Lock();
+ wxMainMutex = new wxMutex();
+ wxMainMutex->Lock();
return TRUE;
}
void wxThreadModule::OnExit()
{
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
+ delete wxMainMutex;
}
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
static wxMutex p_list_mutex;
static wxList p_threads_list;
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
/////////////////////////////////////////////////////////////////////////////
// GUI thread manager
wxYield();
if (do_unlock)
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
pthread_join(p_internal->thread_id, &status);
if (do_unlock)
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
p_list_mutex.Lock();
delete p_threads_list.Nth(p_internal->id);
DECLARE_DYNAMIC_CLASS(wxThreadModule)
public:
virtual bool OnInit() {
+ wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = pthread_self();
p_threads_list = wxList(wxKEY_INTEGER);
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
return TRUE;
}
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
wxThreadGuiExit();
+ delete wxMainMutex;
}
};
/////////////////////////////////////////////////////////////////////////////
static int p_mainid;
-wxMutex wxMainMutex;
+wxMutex *wxMainMutex;
#include "threadgui.inc"
int stat;
if (do_unlock)
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
waitpid(p_internal->thread_id, &stat, 0);
if (do_unlock)
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
if (!WIFEXITED(stat) && !WIFSIGNALED(stat))
return 0;
p_internal->state = STATE_IDLE;
DECLARE_DYNAMIC_CLASS(wxThreadModule)
public:
virtual bool OnInit() {
+ wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = (int)getpid();
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
}
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
wxThreadGuiExit();
+ delete wxMainMutex;
}
};
void wxMutexGuiEnter()
{
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
}
void wxMutexGuiLeave()
{
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
}
#endif
void wxThread::SetPriority(int WXUNUSED(prio)) { }
int wxThread::GetPriority() const { return 0; }
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
wxThread::wxThread()
{
};
bool wxThreadModule::OnInit() {
- wxMainMutex.Lock();
+ wxMainMutex = new wxMutex();
+ wxMainMutex->Lock();
return TRUE;
}
void wxThreadModule::OnExit()
{
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
+ delete wxMainMutex;
}
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
static wxMutex p_list_mutex;
static wxList p_threads_list;
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
/////////////////////////////////////////////////////////////////////////////
// GUI thread manager
wxYield();
if (do_unlock)
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
pthread_join(p_internal->thread_id, &status);
if (do_unlock)
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
p_list_mutex.Lock();
delete p_threads_list.Nth(p_internal->id);
DECLARE_DYNAMIC_CLASS(wxThreadModule)
public:
virtual bool OnInit() {
+ wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = pthread_self();
p_threads_list = wxList(wxKEY_INTEGER);
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
return TRUE;
}
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
wxThreadGuiExit();
+ delete wxMainMutex;
}
};
/////////////////////////////////////////////////////////////////////////////
static int p_mainid;
-wxMutex wxMainMutex;
+wxMutex *wxMainMutex;
#include "threadgui.inc"
int stat;
if (do_unlock)
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
waitpid(p_internal->thread_id, &stat, 0);
if (do_unlock)
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
if (!WIFEXITED(stat) && !WIFSIGNALED(stat))
return 0;
p_internal->state = STATE_IDLE;
DECLARE_DYNAMIC_CLASS(wxThreadModule)
public:
virtual bool OnInit() {
+ wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = (int)getpid();
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
}
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
wxThreadGuiExit();
+ delete wxMainMutex;
}
};
// Static variables
/////////////////////////////////////////////////////////////////////////////
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
/////////////////////////////////////////////////////////////////////////////
// Windows implementation
public:
virtual bool OnInit() {
/* TODO p_mainid = GetCurrentThread(); */
- wxMainMutex.Lock();
+ wxMainMutex = new wxMutex();
+ wxMainMutex->Lock();
return TRUE;
}
// Global cleanup
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
+ delete wxMainMutex;
}
};
/////////////////////////////////////////////////////////////////////////////
static HANDLE p_mainid;
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
/////////////////////////////////////////////////////////////////////////////
// Windows implementation
return NULL;
if (wxThread::IsMain())
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
WaitForSingleObject(p_internal->thread_id, INFINITE);
if (wxThread::IsMain())
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
GetExitCodeThread(p_internal->thread_id, &exit_code);
CloseHandle(p_internal->thread_id);
DECLARE_DYNAMIC_CLASS(wxThreadModule)
public:
virtual bool OnInit() {
+ wxMainMutex = new wxMutex();
p_mainid = GetCurrentThread();
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
return TRUE;
}
// Global cleanup
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
+ delete wxMainMutex;
}
};
void wxThread::SetPriority(int WXUNUSED(prio)) { }
int wxThread::GetPriority() const { return 0; }
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
wxThread::wxThread()
{
};
bool wxThreadModule::OnInit() {
- wxMainMutex.Lock();
+ wxMainMutex = new wxMutex();
+ wxMainMutex->Lock();
return TRUE;
}
void wxThreadModule::OnExit()
{
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
+ delete wxMainMutex;
}
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
static wxMutex p_list_mutex;
static wxList p_threads_list;
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
/////////////////////////////////////////////////////////////////////////////
// GUI thread manager
wxYield();
if (do_unlock)
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
pthread_join(p_internal->thread_id, &status);
if (do_unlock)
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
p_list_mutex.Lock();
delete p_threads_list.Nth(p_internal->id);
DECLARE_DYNAMIC_CLASS(wxThreadModule)
public:
virtual bool OnInit() {
+ wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = pthread_self();
p_threads_list = wxList(wxKEY_INTEGER);
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
return TRUE;
}
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
wxThreadGuiExit();
+ delete wxMainMutex;
}
};
/////////////////////////////////////////////////////////////////////////////
static int p_mainid;
-wxMutex wxMainMutex;
+wxMutex *wxMainMutex;
#include "threadgui.inc"
int stat;
if (do_unlock)
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
waitpid(p_internal->thread_id, &stat, 0);
if (do_unlock)
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
if (!WIFEXITED(stat) && !WIFSIGNALED(stat))
return 0;
p_internal->state = STATE_IDLE;
DECLARE_DYNAMIC_CLASS(wxThreadModule)
public:
virtual bool OnInit() {
+ wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = (int)getpid();
- wxMainMutex.Lock();
+ wxMainMutex->Lock();
}
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
wxThreadGuiExit();
+ delete wxMainMutex;
}
};
// Static variables
/////////////////////////////////////////////////////////////////////////////
-wxMutex wxMainMutex; // controls access to all GUI functions
+wxMutex *wxMainMutex; // controls access to all GUI functions
/////////////////////////////////////////////////////////////////////////////
// Windows implementation
public:
virtual bool OnInit() {
/* TODO p_mainid = GetCurrentThread(); */
- wxMainMutex.Lock();
+ wxMainMutex = new wxMutex();
+ wxMainMutex->Lock();
return TRUE;
}
// Global cleanup
virtual void OnExit() {
- wxMainMutex.Unlock();
+ wxMainMutex->Unlock();
+ delete wxMainMutex;
}
};