#if wxUSE_THREADS
-// only for wxUSE_THREADS - otherwise we'd get undefined symbols
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma interface "thread.h"
-#endif
-
// Windows headers define it
#ifdef Yield
#undef Yield
// in order to avoid any overhead under platforms where critical sections are
// just mutexes make all wxCriticalSection class functions inline
-#if !defined(__WXMSW__)
+#if !defined(__WXMSW__) && !defined(__WXMAC__)
#define wxCRITSECT_IS_MUTEX 1
#define wxCRITSECT_INLINE inline
wxCritSectBuffer m_buffer;
};
+#elif defined(__WXMAC__)
+ void *m_critRegion ;
#endif // Unix&OS2/Win32
DECLARE_NO_COPY_CLASS(wxCriticalSection)
#undef wxCRITSECT_IS_MUTEX
// wxCriticalSectionLocker is the same to critical sections as wxMutexLocker is
-// to th mutexes
+// to mutexes
class WXDLLIMPEXP_BASE wxCriticalSectionLocker
{
public:
bool IsOk() const;
// NB: the associated mutex MUST be locked beforehand by the calling thread
- //
+ //
// it atomically releases the lock on the associated mutex
// and starts waiting to be woken up by a Signal()/Broadcast()
// once its signaled, then it will wait until it can reacquire
// timeout ellapses even if the condition hasn't been signalled: in this
// case, the return value is false, otherwise (i.e. in case of a normal
// return) it is true
- //
+ //
// the timeeout parameter specifies a interval that needs to be waited in
// milliseconds
wxCondError WaitTimeout(unsigned long milliseconds);
};
// ----------------------------------------------------------------------------
-// wxThread: class encpasulating a thread of execution
+// wxThread: class encapsulating a thread of execution
// ----------------------------------------------------------------------------
// there are two different kinds of threads: joinable and detached (default)
#if wxUSE_THREADS
-#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXPM__) || defined(__EMX__)
+#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__OS2__) || defined(__EMX__)
// 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
// returns true if the main thread has GUI lock
extern bool WXDLLIMPEXP_BASE wxGuiOwnedByMainThread();
-#ifndef __WXPM__
// wakes up the main thread if it's sleeping inside ::GetMessage()
extern void WXDLLIMPEXP_BASE wxWakeUpMainThread();
-#endif // !OS/2
// return true if the main thread is waiting for some other to terminate:
// wxApp then should block all "dangerous" messages
#endif // wxUSE_THREADS
#endif // _WX_THREAD_H_
-