Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_TSS_Cleanup Class Reference

Singleton that knows how to clean up all the thread-specific resources for Win32. More...

Collaboration diagram for ACE_TSS_Cleanup:

[legend]
List of all members.

## Public Methods
| ~ACE_TSS_Cleanup (void)
void | exit (void *status)
| Cleanup the thread-specific objects. Does _NOT_ exit the thread. More...
int | insert (ACE_thread_key_t key, void(*destructor)(void *), void *inst)
| Insert a <key, destructor> tuple into the table. More...
int | remove (ACE_thread_key_t key)
| Remove a <key, destructor> tuple from the table. More...
int | detach (void *inst)
| Detaches a tss_instance from its key. More...
void | key_used (ACE_thread_key_t key)
| Mark a key as being used by this thread. More...
int | free_all_keys_left (void)
| Free all keys left in the table before destruction. More...
## Static Public Methods
ACE_TSS_Cleanup * | instance (void)
int | lockable ()
| Indication of whether the ACE_TSS_CLEANUP_LOCK is usable, and therefore whether we are in static constructor/destructor phase or not. More...
## Protected Methods
void | dump (void)
| ACE_TSS_Cleanup (void)
| Ensure singleton. More...
## Private Types
typedef ACE_TSS_Info | ACE_TSS_TABLE [ACE_DEFAULT_THREAD_KEYS]
typedef ACE_TSS_Info * | ACE_TSS_TABLE_ITERATOR
## Private Methods
ACE_TSS_Keys * | tss_keys ()
| Accessor for this threads ACE_TSS_Keys instance. More...
## Private Attributes
ACE_TSS_TABLE | table_
| Table of <ACE_TSS_Info>'s. More...
ACE_thread_key_t | in_use_
| Key for the thread-specific array of whether each TSS key is in use. More...
## Static Private Attributes
ACE_TSS_Cleanup * | instance_ = 0
| Pointer to the singleton instance. More...

## Detailed Description

Singleton that knows how to clean up all the thread-specific resources for Win32.

All this nonsense is required since Win32 doesn't automatically cleanup thread-specific storage on thread exit, unlike real operating systems... ;-)

## Member Typedef Documentation

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]`

## Constructor & Destructor Documentation

ACE_TSS_Cleanup::~ACE_TSS_Cleanup | ( | void |  | ) |

ACE_TSS_Cleanup::ACE_TSS_Cleanup | ( | void |  | ) | `[protected]`

| Ensure singleton.

## Member Function Documentation

int ACE_TSS_Cleanup::detach | ( | void * | inst | ) |

| Detaches a tss_instance from its key.

void ACE_TSS_Cleanup::dump | ( | void |  | ) | `[protected]`

void ACE_TSS_Cleanup::exit | ( | void * | status | ) |

| Cleanup the thread-specific objects. Does _NOT_ exit the thread.

int ACE_TSS_Cleanup::free_all_keys_left | ( | void |  | ) |

| Free all keys left in the table before destruction.

int ACE_TSS_Cleanup::insert | ( | ACE_thread_key_t | key,
|  | void(* | destructor)(void *),
|  | void * | inst
| ) |

| Insert a <key, destructor> tuple into the table.

ACE_TSS_Cleanup * ACE_TSS_Cleanup::instance | ( | void |  | ) | `[static]`

void ACE_TSS_Cleanup::key_used | ( | ACE_thread_key_t | key | ) |

| Mark a key as being used by this thread.

int ACE_TSS_Cleanup::lockable | ( |  | ) | `[inline, static]`

| Indication of whether the ACE_TSS_CLEANUP_LOCK is usable, and therefore whether we are in static constructor/destructor phase or not.

int ACE_TSS_Cleanup::remove | ( | ACE_thread_key_t | key | ) |

| Remove a <key, destructor> tuple from the table.

ACE_TSS_Keys * ACE_TSS_Cleanup::tss_keys | ( |  | ) | `[private]`

| Accessor for this threads ACE_TSS_Keys instance.

## Member Data Documentation

ACE_thread_key_t ACE_TSS_Cleanup::in_use_`[private]`

| Key for the thread-specific array of whether each TSS key is in use.

ACE_TSS_Cleanup * ACE_TSS_Cleanup::instance_ = 0`[static, private]`

| Pointer to the singleton instance.

ACE_TSS_TABLE ACE_TSS_Cleanup::table_`[private]`

| Table of <ACE_TSS_Info>'s.

The documentation for this class was generated from the following file:

- OS.cpp