Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Threads / TSS_Data.h
blob3ea13e5f4b19709452e407aa6f8de7f053ccffab
2 //=============================================================================
3 /**
4 * @file TSS_Data.h
6 * @author Prashant Jain and Doug Schmidt
7 */
8 //=============================================================================
11 #include "ace/Singleton.h"
13 #if !defined (ACE_LACKS_PRAGMA_ONCE)
14 # pragma once
15 #endif /* ACE_LACKS_PRAGMA_ONCE */
17 #include "ace/Synch_Traits.h"
19 /**
20 * @class TSS_Data
22 * @brief Data that is stored in thread-specific storage.
24 class TSS_Data
26 public:
27 void *data () { return this->data_; }
28 void data (void *v) { this->data_ = v; }
30 private:
31 // = data_ will be thread-specific data so it doesn't need a lock.
32 void *data_;
35 typedef ACE_TSS_Singleton<TSS_Data, ACE_SYNCH_MUTEX> TSS_DATA;