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

View File

@@ -10,6 +10,8 @@
#include "bench.h"
#include "wx/tls.h"
#if defined(__UNIX__)
#define HAVE_PTHREAD
#include <pthread.h>
@@ -171,3 +173,18 @@ BENCHMARK_FUNC(BoostTLS)
}
#endif // HAVE_BOOST_THREAD
BENCHMARK_FUNC(wxTLS)
{
static wxTLS_TYPE(int) s_global;
for ( int n = 0; n < NUM_ITER; n++ )
{
if ( n % 2 )
s_global = 0;
else
s_global = n;
}
return !s_global;
}