Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   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:

Collaboration graph
[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.

int insert (ACE_thread_key_t key, void(*destructor)(void *), void *inst)
 Insert a <key, destructor> tuple into the table.

int remove (ACE_thread_key_t key)
 Remove a <key, destructor> tuple from the table.

int detach (void *inst)
 Detaches a tss_instance from its key.

void key_used (ACE_thread_key_t key)
 Mark a key as being used by this thread.

int free_all_keys_left (void)
 Free all keys left in the table before destruction.


Static Public Methods

ACE_TSS_Cleanup * instance (void)
int lockable ()

Protected Methods

void dump (void)
 ACE_TSS_Cleanup (void)
 Ensure singleton.


Private Types

typedef ACE_TSS_Info ACE_TSS_TABLE [ACE_DEFAULT_THREAD_KEYS]
typedef ACE_TSS_InfoACE_TSS_TABLE_ITERATOR

Private Methods

ACE_TSS_Keystss_keys ()
 Accessor for this threads ACE_TSS_Keys instance.


Private Attributes

ACE_TSS_TABLE table_
 Table of <ACE_TSS_Info>'s.

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


Static Private Attributes

ACE_TSS_Cleanup * instance_ = 0
 Pointer to the singleton instance.


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:
Generated on Fri Apr 2 16:55:13 2004 for ACE by doxygen1.2.18