---
name: "ACE_TSS_Info"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_TSS_Info"
---

# ACE\_TSS\_Info(3)

Thread Specific Key management.

## NAME

ACE\_TSS\_Info -  Thread Specific Key management.

## SYNOPSIS

```
#include <ace/OS.h>
class ACE_TSS_Info
{
  public:
    ACE_TSS_Info (ACE_thread_key_t key, void (*dest)(
        void *) = 0,
        void *tss_inst = 0
        );
    ACE_TSS_Info (void);
    inline int key_in_use (void) const;
    inline void key_in_use (int flag);
    int operator== (const ACE_TSS_Info &) const;
    int operator!= (const ACE_TSS_Info &) const;
    void dump (void);
  private:
    ACE_thread_key_t key_;
    void (*destructor_)(void *);
    void *tss_obj_;
    int thread_count_;
    friend class ACE_TSS_Cleanup;
};
```

## DESCRIPTION

This class maps a key to a "destructor."

## PUBLIC MEMBERS

```
ACE_TSS_Info (ACE_thread_key_t key, void (*dest)(
    void *) = 0,
    void *tss_inst = 0
    );
```

Constructor

```
ACE_TSS_Info (void);
```

Default constructor

```
inline int key_in_use (void) const;
```

Returns 1 if the key is in use, 0 if not.

```
inline void key_in_use (int flag);
```

Mark the key as being in use if the flag is non-zero, or not in use if the flag is 0.

```
int operator== (const ACE_TSS_Info &) const;
```

Check for equality.

```
int operator!= (const ACE_TSS_Info &) const;
```

Check for inequality.

```
void dump (void);
```

Dump the state.

## PRIVATE MEMBERS

```
ACE_thread_key_t key_;
```

Key to the thread-specific storage item.

```
void (*destructor_)(void *);
```

"Destructor" that gets called when the item is finally released.

```
void *tss_obj_;
```

Pointer to ACE\_TSSxxx instance that has/will allocate the key.

```
int thread_count_;
```

Count of threads that are using this key.  Contains -1 when the key is not in use.

```
friend class ACE_TSS_Cleanup;
```

## AUTHOR

Doug Schmidt schmidt@cs.wustl.edu, Jesper S. M\|ller stophph@diku.dk, and a cast of thousands...

## The ACE\_Sched\_Priority type should be used for platform-

independent thread and process priorities, by convention. int should be used for OS-specific priorities.

## typedef for the \_stat data structure

## Giving unique ACE scoped names for some important

RTSignal-Related constants. Becuase sometimes, different platforms use different names for these constants.

## LIBRARY

ace
