X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9838df2cefc5b368bb11f98c784ecc78f45ecaf7..63cc5d9d20f997961881855811f6b6987679969d:/include/wx/thread.h diff --git a/include/wx/thread.h b/include/wx/thread.h index 1acb78279f..b0bbc261f7 100644 --- a/include/wx/thread.h +++ b/include/wx/thread.h @@ -13,10 +13,6 @@ #ifndef __THREADH__ #define __THREADH__ -#ifdef __GNUG__ - #pragma interface "thread.h" -#endif - // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- @@ -25,6 +21,10 @@ #include "wx/setup.h" #if wxUSE_THREADS +/* otherwise we get undefined references for non-thread case (KB)*/ +#ifdef __GNUG__ + #pragma interface "thread.h" +#endif // Windows headers define it #ifdef Yield @@ -151,9 +151,9 @@ public: WXCRITICAL_INLINE ~wxCriticalSection(); // enter the section (the same as locking a mutex) - void WXCRITICAL_INLINE Enter(); + WXCRITICAL_INLINE void Enter(); // leave the critical section (same as unlocking a mutex) - void WXCRITICAL_INLINE Leave(); + WXCRITICAL_INLINE void Leave(); private: // no assignment operator nor copy ctor @@ -301,7 +301,7 @@ public: // Returns true if the thread is running (not paused, not killed). bool IsRunning() const; // Returns true if the thread is suspended - bool IsPaused() const { return IsAlive() && !IsRunning(); } + bool IsPaused() const; // called when the thread exits - in the context of this thread // @@ -352,6 +352,8 @@ void WXDLLEXPORT wxMutexGuiLeave(); #else // !wxUSE_THREADS +#include // for WXDLLEXPORT + // no thread support inline void WXDLLEXPORT wxMutexGuiEnter() { } inline void WXDLLEXPORT wxMutexGuiLeave() { }