#include <OS_NS_Thread.h>
Public Types | |
| typedef void(* | Destructor )(void *) |
| Declare pointer to function to destroy tss object. | |
Public Member Functions | |
| ACE_TSS_Info (ACE_thread_key_t key, Destructor dest=0) | |
| Constructor. | |
| ACE_TSS_Info (void) | |
| Default constructor. | |
| int | key_in_use (void) const |
| Returns 1 if the key is in use, 0 if not. | |
| void | key_in_use (int flag) |
| bool | operator== (const ACE_TSS_Info &) const |
| Check for equality. | |
| bool | operator!= (const ACE_TSS_Info &) const |
| Check for inequality. | |
| void | dump (void) |
| Dump the state. | |
Private Attributes | |
| ACE_thread_key_t | key_ |
| Key to the thread-specific storage item. | |
| Destructor | destructor_ |
| "Destructor" that gets called when the item is finally released. | |
| int | thread_count_ |
Friends | |
| class | ACE_TSS_Cleanup |
This class maps a key to a "destructor."
Definition at line 925 of file OS_NS_Thread.h.
|
|
Declare pointer to function to destroy tss object.
Definition at line 929 of file OS_NS_Thread.h. Referenced by ACE_TSS_Cleanup::thread_detach_key(), ACE_TSS_Cleanup::thread_exit(), and ACE_TSS_Cleanup::thread_release(). |
|
||||||||||||
|
Constructor.
|
|
|
Default constructor.
Definition at line 408 of file OS_NS_Thread.cpp. References ACE_OS_TRACE, destructor_(), and thread_count_().
00409 : key_ (ACE_OS::NULL_key), 00410 destructor_ (0), 00411 thread_count_ (-1) 00412 { 00413 ACE_OS_TRACE ("ACE_TSS_Info::ACE_TSS_Info"); 00414 } |
|
|
Dump the state.
Definition at line 449 of file OS_NS_Thread.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TEXT, and LM_DEBUG. Referenced by ACE_TSS_Cleanup::dump().
00450 {
00451 # if defined (ACE_HAS_DUMP)
00452 // ACE_OS_TRACE ("ACE_TSS_Info::dump");
00453
00454 # if 0
00455 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00456 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key_ = %u\n"), this->key_));
00457 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("destructor_ = %u\n"), this->destructor_));
00458 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00459 # endif /* 0 */
00460 # endif /* ACE_HAS_DUMP */
00461 }
|
|
|
Mark the key as being in use if the flag is non-zero, or not in use if the flag is 0. Definition at line 943 of file OS_NS_Thread.h. References thread_count_.
00943 { thread_count_ = flag == 0 ? -1 : 1; }
|
|
|
Returns 1 if the key is in use, 0 if not.
Definition at line 939 of file OS_NS_Thread.h. References thread_count_. Referenced by ACE_TSS_Cleanup::remove_key(), ACE_TSS_Cleanup::thread_detach_key(), ACE_TSS_Cleanup::thread_exit(), and ACE_TSS_Cleanup::thread_use_key().
00939 { return thread_count_ != -1; }
|
|
|
Check for inequality.
Definition at line 441 of file OS_NS_Thread.cpp. References ACE_OS_TRACE.
00442 {
00443 ACE_OS_TRACE ("ACE_TSS_Info::operator !=");
00444
00445 return !(*this == info);
00446 }
|
|
|
Check for equality.
Definition at line 432 of file OS_NS_Thread.cpp. References ACE_OS_TRACE, and key_.
00433 {
00434 ACE_OS_TRACE ("ACE_TSS_Info::operator==");
00435
00436 return this->key_ == info.key_;
00437 }
|
|
|
Definition at line 965 of file OS_NS_Thread.h. |
|
|
"Destructor" that gets called when the item is finally released.
Definition at line 959 of file OS_NS_Thread.h. Referenced by ACE_TSS_Cleanup::remove_key(), and ACE_TSS_Cleanup::thread_release(). |
|
|
Key to the thread-specific storage item.
Definition at line 956 of file OS_NS_Thread.h. Referenced by operator==(), ACE_TSS_Cleanup::remove_key(), ACE_TSS_Cleanup::thread_exit(), and ACE_TSS_Cleanup::thread_release(). |
|
|
Count of threads that are using this key. Contains -1 when the key is not in use. Definition at line 963 of file OS_NS_Thread.h. Referenced by ACE_TSS_Cleanup::insert(), key_in_use(), ACE_TSS_Cleanup::remove_key(), ACE_TSS_Cleanup::thread_release(), and ACE_TSS_Cleanup::thread_use_key(). |
1.3.6