X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aaa38880c4b267f00077f3ce47685d25cf9e8f5e..cfad3750c3ecc821ffae8b9b3de852551270846d:/src/motif/thread.cpp?ds=inline diff --git a/src/motif/thread.cpp b/src/motif/thread.cpp index cf16365374..96d7af417a 100644 --- a/src/motif/thread.cpp +++ b/src/motif/thread.cpp @@ -13,15 +13,20 @@ #pragma implementation "thread.h" #endif -#include -#include -#include -#include +#include "wx/defs.h" + +#if wxUSE_THREADS + #include "wx/module.h" #include "wx/thread.h" #include "wx/utils.h" #include "wx/log.h" +#include +#include +#include +#include + #include #include @@ -409,29 +414,34 @@ void wxThread::OnExit() // wxThreadModule //-------------------------------------------------------------------- -class wxThreadModule : public wxModule +class wxThreadModule : public wxModule { - DECLARE_DYNAMIC_CLASS(wxThreadModule) - public: - virtual bool OnInit() - { - wxMainMutex = new wxMutex(); - wxThreadGuiInit(); - p_mainid = pthread_self(); - wxMainMutex->Lock(); + virtual bool OnInit(); + virtual void OnExit(); - return TRUE; - } - - virtual void OnExit() - { - wxMainMutex->Unlock(); - wxThreadGuiExit(); - delete wxMainMutex; - } +private: + DECLARE_DYNAMIC_CLASS(wxThreadModule) }; IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) +bool wxThreadModule::OnInit() +{ + wxMainMutex = new wxMutex(); + wxThreadGuiInit(); + p_mainid = pthread_self(); + wxMainMutex->Lock(); + + return TRUE; +} +void wxThreadModule::OnExit() +{ + wxMainMutex->Unlock(); + wxThreadGuiExit(); + delete wxMainMutex; +}; + +#endif + // wxUSE_THREADS