~ubuntu-branches/debian/sid/gsmartcontrol/sid

« back to all changes in this revision

Viewing changes to src/hz/tls_policy_win32.h

  • Committer: Package Import Robot
  • Author(s): Giuseppe Iuculano
  • Date: 2013-05-31 11:41:52 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130531114152-5ljhkuswwpt4kdwo
Tags: 0.8.7-1
* [314881d] Updated debian/watch
* [18ebada] Imported Upstream version 0.8.7
* [c2a1f1b] debian/rules: Provide build-arch and build-indep
* [d3036a4] Enabled Hardening Options
* [2edfb87] Refreshed patches and removed patches apllied upstream
* [ac3b953] Bump to standard versions 3.9.4
* [292c276] Remove quilt from depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**************************************************************************
2
2
 Copyright:
3
 
      (C) 2008 - 2011  Alexander Shaduri <ashaduri 'at' gmail.com>
 
3
      (C) 2008 - 2012  Alexander Shaduri <ashaduri 'at' gmail.com>
4
4
 License: See LICENSE_zlib.txt file
5
5
***************************************************************************/
 
6
/// \file
 
7
/// \author Alexander Shaduri
 
8
/// \ingroup hz
 
9
/// \weakgroup hz
 
10
/// @{
6
11
 
7
12
#ifndef HZ_TLS_POLICY_WIN32_H
8
13
#define HZ_TLS_POLICY_WIN32_H
23
28
#endif
24
29
 
25
30
 
26
 
 
27
 
// Win32 Threads-based TLS.
28
 
 
29
 
// NOTE: On-thread-exit cleanup functions ARE NOT implemented.
30
 
// They are called on object destruction and reset(), however.
31
 
// Implementing on-thread-exit callbacks requires some really ugly
32
 
// hacks, introducing some really ugly problems and limitations.
33
 
// See http://lists.boost.org/Archives/boost/2003/02/44905.php
34
 
 
 
31
/**
 
32
\file
 
33
Win32-threads-based thread-local storage.
 
34
 
 
35
NOTE On-thread-exit cleanup functions ARE NOT implemented.
 
36
They are called on object destruction and reset(), however.
 
37
Implementing on-thread-exit callbacks requires some really ugly
 
38
hacks, introducing some really ugly problems and limitations.
 
39
See http://lists.boost.org/Archives/boost/2003/02/44905.php
 
40
*/
35
41
 
36
42
 
37
43
namespace hz {
38
44
 
39
45
 
40
 
 
 
46
/// Win32-threads-based TLS policy
41
47
class TlsPolicyWin32 {
42
48
        public:
43
49
 
88
94
        private:
89
95
 
90
96
                DWORD key_;
91
 
                native_cleanup_func_t native_cleanup_;  // may be NULL
92
 
                bool inited_;  // if the key has been associated with the non-NULL value at least once.
 
97
                native_cleanup_func_t native_cleanup_;  ///< may be NULL
 
98
                bool inited_;  ///< True if the key has been associated with the non-NULL value at least once.
93
99
 
94
100
                TlsPolicyWin32(const TlsPolicyWin32&);
95
101
                TlsPolicyWin32& operator= (const TlsPolicyWin32& from);
105
111
 
106
112
 
107
113
#endif
 
114
 
 
115
/// @}