From 0e2ae18a97fd507bac872031888d34c3a7d8b17b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 3 Sep 2010 16:20:38 +0200 Subject: Implement Win32 TLS support --- odb/details/tls.hxx | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'odb/details/tls.hxx') diff --git a/odb/details/tls.hxx b/odb/details/tls.hxx index 7ce5c19..d2627be 100644 --- a/odb/details/tls.hxx +++ b/odb/details/tls.hxx @@ -50,7 +50,9 @@ namespace odb #elif defined(ODB_THREADS_WIN32) -# ifdef ODB_THREADS_TLS_DECLSPEC_POINTER +# include + +# ifdef ODB_THREADS_TLS_DECLSPEC # define ODB_TLS_POINTER(type) __declspec(thread) type* namespace odb @@ -74,29 +76,9 @@ namespace odb } # else -# error unsupported TLS pointer model -# endif - -# ifdef ODB_THREADS_TLS_DECLSPEC_OBJECT -# define ODB_TLS_OBJECT(type) __declspec(thread) type - -namespace odb -{ - namespace details - { - template - inline T& - tls_get (T& x) - { - return x; - } - } -} - -# else -# error unsupported TLS object model +# define ODB_TLS_POINTER(type) tls # endif - +# define ODB_TLS_OBJECT(type) tls #else # error unknown threading model #endif -- cgit v1.1