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

@@ -50,6 +50,7 @@ the corresponding topic.
\helpref{wxCreateDynamicObject}{wxcreatedynamicobject}\\
\helpref{wxCreateFileTipProvider}{wxcreatefiletipprovider}\\
\helpref{wxCRIT\_SECT\_DECLARE}{wxcritsectdeclare}\\
\helpref{wxCRIT\_SECT\_DECLARE\_MEMBER}{wxcritsectdeclaremember}\\
\helpref{wxCRIT\_SECT\_LOCKER}{wxcritsectlocker}\\
\helpref{wxCRITICAL\_SECTION}{wxcriticalsectionmacro}\\ % wxcs already taken!
\helpref{wxDDECleanUp}{wxddecleanup}\\
@@ -705,6 +706,17 @@ This macro declares a (static) critical section object named {\it cs} if
{\tt wxUSE\_THREADS} is $1$ and does nothing if it is $0$.
\membersection{wxCRIT\_SECT\_DECLARE\_MEMBER}\label{wxcritsectdeclaremember}
\func{}{wxCRIT\_SECT\_DECLARE}{\param{}{cs}}
This macro declares a critical section object named {\it cs} if
{\tt wxUSE\_THREADS} is $1$ and does nothing if it is $0$. As it doesn't
include the {\tt static} keyword (unlike
\helpref{wxCRIT\_SECT\_DECLARE}{wxcritsectdeclare}), it can be used to declare
a class or struct member which explains its name.
\membersection{wxCRIT\_SECT\_LOCKER}\label{wxcritsectlocker}
\func{}{wxCRIT\_SECT\_LOCKER}{\param{}{name}, \param{}{cs}}

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