added wxCRIT_SECT_DECLARE_MEMBER

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-06-30 01:18:10 +00:00
parent adb4b1488a
commit db882c5431
2 changed files with 14 additions and 0 deletions

View File

@@ -594,6 +594,7 @@ void WXDLLEXPORT wxMutexGuiLeave();
#define wxENTER_CRIT_SECT(cs) (cs).Enter()
#define wxLEAVE_CRIT_SECT(cs) (cs).Leave()
#define wxCRIT_SECT_DECLARE(cs) static wxCriticalSection cs
#define wxCRIT_SECT_DECLARE_MEMBER(cs) wxCriticalSection cs
#define wxCRIT_SECT_LOCKER(name, cs) wxCriticalSectionLocker name(cs)
// function for checking if we're in the main thread which may be used whether
@@ -611,6 +612,7 @@ inline void WXDLLEXPORT wxMutexGuiLeave() { }
#define wxENTER_CRIT_SECT(cs)
#define wxLEAVE_CRIT_SECT(cs)
#define wxCRIT_SECT_DECLARE(cs)
#define wxCRIT_SECT_DECLARE_MEMBER(cs)
#define wxCRIT_SECT_LOCKER(name, cs)
// if there is only one thread, it is always the main one