#undef Yield
#endif
+#ifdef __WXMSW__
+ #include "wx/msw/wrapwin.h"
+#endif
+
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// include windows.h from this public header and we also have to use the
// union to force the correct (i.e. maximal) alignment
//
- // if CRITICAL_SECTION size changes in Windows, you'll get an assert from
- // thread.cpp and will need to increase the buffer size
+ // if CRITICAL_SECTION size changes in Windows, you'll get an assert below
//
// finally, we need this typedef instead of declaring m_buffer directly
// because otherwise the assert mentioned above wouldn't compile with some
#else // __WIN32__
typedef char wxCritSectBuffer[24];
#endif
+
+wxCOMPILE_TIME_ASSERT( sizeof(CRITICAL_SECTION) <= sizeof(wxCritSectBuffer),
+ wxCriticalSectionBufferTooSmall );
+
union
{
unsigned long m_dummy1;
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);