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

# ACE_TSS_Keys Class Reference

Collection of in-use flags for a thread's TSS keys. For internal use only by ACE_TSS_Cleanup; it is public because some compilers can't use nested classes for template instantiation parameters. More...

`#include <OS.h>`

List of all members.

## Public Methods
| ACE_TSS_Keys (void)
| Default constructor, to initialize all bits to zero (unused).
int | test_and_set (const ACE_thread_key_t key)
| Mark the specified key as being in use, if it was not already so marked. Returns 1 if the had already been marked, 0 if not.
int | test_and_clear (const ACE_thread_key_t key)
| Mark the specified key as not being in use, if it was not already so cleared. Returns 1 if the had already been cleared, 0 if not.
## Private Types
enum | { ACE_WORDS = (ACE_DEFAULT_THREAD_KEYS - 1) / ACE_BITS_PER_WORD + 1 }
## Private Attributes
u_long | key_bit_words_ [ACE_WORDS]
| Bit flag collection. A bit value of 1 indicates that the key is in use by this thread.
## Static Private Methods
void | find (const u_int key, u_int &word, u_int &bit)
| For a given key, find the word and bit number that represent it.

## Detailed Description

Collection of in-use flags for a thread's TSS keys. For internal use only by ACE_TSS_Cleanup; it is public because some compilers can't use nested classes for template instantiation parameters.

Wrapper around array of whether each key is in use. A simple typedef doesn't work with Sun C++ 4.2.

## Member Enumeration Documentation

anonymous enum`[private]`

  | Enumeration values:
  ACE_WORDS |

## Constructor & Destructor Documentation

ACE_TSS_Keys::ACE_TSS_Keys ( | void )

| Default constructor, to initialize all bits to zero (unused).

## Member Function Documentation

void ACE_TSS_Keys::find ( | const u_int key,
| u_int & word,
| u_int & bit )`[static, private]`

| For a given key, find the word and bit number that represent it.

int ACE_TSS_Keys::test_and_clear ( | const ACE_thread_key_t key )

| Mark the specified key as not being in use, if it was not already so cleared. Returns 1 if the had already been cleared, 0 if not.

int ACE_TSS_Keys::test_and_set ( | const ACE_thread_key_t key )

| Mark the specified key as being in use, if it was not already so marked. Returns 1 if the had already been marked, 0 if not.

## Member Data Documentation

u_long ACE_TSS_Keys::key_bit_words_[ACE_WORDS]`[private]`

| Bit flag collection. A bit value of 1 indicates that the key is in use by this thread.

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

- OS.h
- OS.cpp