added wxTLS_TYPE() macro

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-08 02:59:32 +00:00
parent 375a5d3a93
commit 64a044d5a6
10 changed files with 773 additions and 121 deletions

27
interface/wx/tls.h Normal file
View File

@@ -0,0 +1,27 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/tls.h
// Purpose: wxTLS_TYPE()
// Author: Vadim Zeitlin
// RCS-ID: $Id$
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/**
Macro to be used for thread-specific variables declarations.
This macro can be used to define thread-specific variables of the specified
@a type. Such variables must be global or static. Example of use:
@code
struct PerThreadData
{
... data which will be different for every thread ...
};
static wxTLS_TYPE(PerThreadData *) s_threadPtr;
@endcode
Currently only types of size less than size of a pointer are supported.
This limitation will be lifted in the future.
*/
#define wxTLS_TYPE(type)