Public Member Functions | |
int | insert (ACE_thread_key_t key, void(*destructor)(void *)) |
void | thread_use_key (ACE_thread_key_t key) |
Mark a key as being used by this thread. | |
int | thread_detach_key (ACE_thread_key_t key) |
int | free_key (ACE_thread_key_t key) |
void | thread_exit (void) |
Private Types | |
typedef ACE_TSS_Info | ACE_TSS_TABLE [ACE_DEFAULT_THREAD_KEYS] |
typedef ACE_TSS_Info * | ACE_TSS_TABLE_ITERATOR |
Private Member Functions | |
void | dump (void) |
void | thread_release (ACE_TSS_Info &info, ACE_TSS_Info::Destructor &destructor, void *&tss_obj) |
int | remove_key (ACE_TSS_Info &info) |
bool | find_tss_keys (ACE_TSS_Keys *&thread_keys) const |
ACE_TSS_Keys * | tss_keys () |
ACE_TSS_Cleanup (void) | |
Ensure singleton. | |
~ACE_TSS_Cleanup (void) | |
Private Attributes | |
ACE_TSS_TABLE | table_ |
Table of <ACE_TSS_Info>'s. | |
ACE_thread_key_t | in_use_ |
Friends | |
class | TSS_Cleanup_Instance |
ACE_TSS_Cleanup access only via TSS_Cleanup_Instance. |
typedef ACE_TSS_Info ACE_TSS_Cleanup::ACE_TSS_TABLE[ACE_DEFAULT_THREAD_KEYS] [private] |
typedef ACE_TSS_Info* ACE_TSS_Cleanup::ACE_TSS_TABLE_ITERATOR [private] |
ACE_TSS_Cleanup::ACE_TSS_Cleanup | ( | void | ) | [private] |
Ensure singleton.
ACE_TSS_Cleanup::~ACE_TSS_Cleanup | ( | void | ) | [private] |
int ACE_TSS_Cleanup::insert | ( | ACE_thread_key_t | key, | |
void(*)(void *) | destructor | |||
) |
Register a newly-allocated key
key | the key to be monitored | |
destructor | the function to call to delete objects stored via this key |
void ACE_TSS_Cleanup::thread_use_key | ( | ACE_thread_key_t | key | ) |
Mark a key as being used by this thread.
int ACE_TSS_Cleanup::thread_detach_key | ( | ACE_thread_key_t | key | ) |
This thread is no longer using this key call destructor if appropriate
int ACE_TSS_Cleanup::free_key | ( | ACE_thread_key_t | key | ) |
This key is no longer used Release key if use count == 0 fail if use_count != 0;
key | the key to be released |
void ACE_TSS_Cleanup::thread_exit | ( | void | ) |
Cleanup the thread-specific objects. Does _NOT_ exit the thread. For each used key perform the same actions as free_key.
void ACE_TSS_Cleanup::dump | ( | void | ) | [private] |
void ACE_TSS_Cleanup::thread_release | ( | ACE_TSS_Info & | info, | |
ACE_TSS_Info::Destructor & | destructor, | |||
void *& | tss_obj | |||
) | [private] |
Release a key used by this thread
info | reference to the info for this key | |
destructor | out arg to receive destructor function ptr | |
tss_obj | out arg to receive pointer to deletable object |
int ACE_TSS_Cleanup::remove_key | ( | ACE_TSS_Info & | info | ) | [private] |
remove key if it's unused (thread_count == 0)
info | reference to the info for this key |
bool ACE_TSS_Cleanup::find_tss_keys | ( | ACE_TSS_Keys *& | thread_keys | ) | const [private] |
Find the TSS keys (if any) for this thread.
thread_keys | reference to pointer to be filled in by this function. |
ACE_TSS_Keys * ACE_TSS_Cleanup::tss_keys | ( | ) | [private] |
Accessor for this threads ACE_TSS_Keys instance. Creates the keys if necessary.
friend class TSS_Cleanup_Instance [friend] |
ACE_TSS_Cleanup access only via TSS_Cleanup_Instance.
ACE_TSS_TABLE ACE_TSS_Cleanup::table_ [private] |
Table of <ACE_TSS_Info>'s.
ACE_thread_key_t ACE_TSS_Cleanup::in_use_ [private] |
Key for the thread-specific ACE_TSS_Keys Used by find_tss_keys() or tss_keys() to find the bit array that records whether each TSS key is in use by this thread.