NAME

ACE_TSS_Emulation - Thread-specific storage emulation.

SYNOPSIS

#include <ace/OS.h>

class ACE_TSS_Emulation { public: typedef void (*ACE_TSS_DESTRUCTOR)(void *value) /* throw () */; enum { ACE_TSS_THREAD_KEYS_MAX = ACE_DEFAULT_THREAD_KEYS }; static u_int total_keys (); static int next_key (ACE_thread_key_t &key); static ACE_TSS_DESTRUCTOR tss_destructor ( const ACE_thread_key_t key ); static void tss_destructor ( const ACE_thread_key_t key, ACE_TSS_DESTRUCTOR destructor ); static void *&ts_object (const ACE_thread_key_t key); static void *tss_open (void *ts_storage[ACE_TSS_THREAD_KEYS_MAX]); static void tss_close (); private: static u_int total_keys_; static ACE_TSS_DESTRUCTOR tss_destructor_ [ACE_TSS_THREAD_KEYS_MAX]; static void **tss_base ( void* ts_storage[] = 0, u_int *ts_created = 0 ); static void **&tss_base (); static ACE_OS_thread_key_t native_tss_key_; static int key_created_; };

DESCRIPTION

This provides a thread-specific storage implementation. It is intended for use on platforms that don't have a native TSS, or have a TSS with limitations such as the number of keys or lack of support for removing keys.

PUBLIC MEMBERS

typedef void (*ACE_TSS_DESTRUCTOR)(void *value) /* throw () */;

static u_int total_keys ();

static int next_key (ACE_thread_key_t &key);

static ACE_TSS_DESTRUCTOR tss_destructor (const ACE_thread_key_t key);

static void tss_destructor (
    const ACE_thread_key_t key,
    ACE_TSS_DESTRUCTOR destructor
    );

static void *&ts_object (const ACE_thread_key_t key);

static void *tss_open (void *ts_storage[ACE_TSS_THREAD_KEYS_MAX]);

static void tss_close ();

PRIVATE MEMBERS

static u_int total_keys_;

static ACE_TSS_DESTRUCTOR tss_destructor_ [ACE_TSS_THREAD_KEYS_MAX];

static void **tss_base (
    void* ts_storage[] = 0,
    u_int *ts_created = 0
    );

static void **&tss_base ();

static ACE_OS_thread_key_t native_tss_key_;

static int key_created_;

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