thread #ifdefs for WXPM
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -134,10 +134,12 @@ private:
|
|||||||
|
|
||||||
// in order to avoid any overhead under !MSW make all wxCriticalSection class
|
// in order to avoid any overhead under !MSW make all wxCriticalSection class
|
||||||
// functions inline - but this can't be done under MSW
|
// functions inline - but this can't be done under MSW
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__)
|
||||||
class WXDLLEXPORT wxCriticalSectionInternal;
|
class WXDLLEXPORT wxCriticalSectionInternal;
|
||||||
#define WXCRITICAL_INLINE
|
#define WXCRITICAL_INLINE
|
||||||
#else // !MSW
|
#elif defined(__WXPM__)
|
||||||
|
#define WXCRITICAL_INLINE
|
||||||
|
#else // !MSW && !PM
|
||||||
#define WXCRITICAL_INLINE inline
|
#define WXCRITICAL_INLINE inline
|
||||||
#endif // MSW/!MSW
|
#endif // MSW/!MSW
|
||||||
|
|
||||||
@@ -160,7 +162,7 @@ private:
|
|||||||
wxCriticalSection(const wxCriticalSection&);
|
wxCriticalSection(const wxCriticalSection&);
|
||||||
wxCriticalSection& operator=(const wxCriticalSection&);
|
wxCriticalSection& operator=(const wxCriticalSection&);
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__)
|
||||||
wxCriticalSectionInternal *m_critsect;
|
wxCriticalSectionInternal *m_critsect;
|
||||||
#else // !MSW
|
#else // !MSW
|
||||||
wxMutex m_mutex;
|
wxMutex m_mutex;
|
||||||
@@ -384,7 +386,7 @@ public:
|
|||||||
// implementation only until the end of file
|
// implementation only until the end of file
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__)
|
||||||
// unlock GUI if there are threads waiting for and lock it back when
|
// unlock GUI if there are threads waiting for and lock it back when
|
||||||
// there are no more of them - should be called periodically by the main
|
// there are no more of them - should be called periodically by the main
|
||||||
// thread
|
// thread
|
||||||
@@ -399,7 +401,18 @@ public:
|
|||||||
// return TRUE if the main thread is waiting for some other to terminate:
|
// return TRUE if the main thread is waiting for some other to terminate:
|
||||||
// wxApp then should block all "dangerous" messages
|
// wxApp then should block all "dangerous" messages
|
||||||
extern bool WXDLLEXPORT wxIsWaitingForThread();
|
extern bool WXDLLEXPORT wxIsWaitingForThread();
|
||||||
#else // !MSW
|
#elif defined(__WXPM__)
|
||||||
|
// unlock GUI if there are threads waiting for and lock it back when
|
||||||
|
// there are no more of them - should be called periodically by the main
|
||||||
|
// thread
|
||||||
|
extern void WXDLLEXPORT wxMutexGuiLeaveOrEnter();
|
||||||
|
|
||||||
|
// returns TRUE if the main thread has GUI lock
|
||||||
|
extern bool WXDLLEXPORT wxGuiOwnedByMainThread();
|
||||||
|
|
||||||
|
inline wxCriticalSection::wxCriticalSection() { }
|
||||||
|
inline wxCriticalSection::~wxCriticalSection() { }
|
||||||
|
#else // !MSW && !PM
|
||||||
// implement wxCriticalSection using mutexes
|
// implement wxCriticalSection using mutexes
|
||||||
inline wxCriticalSection::wxCriticalSection() { }
|
inline wxCriticalSection::wxCriticalSection() { }
|
||||||
inline wxCriticalSection::~wxCriticalSection() { }
|
inline wxCriticalSection::~wxCriticalSection() { }
|
||||||
|
Reference in New Issue
Block a user