Reference

ACE_TPQ_Entry(3)

Token Proxy Queue entry. Used in the ACE_Token_Proxy_Queue

NAME

ACE_TPQ_Entry - Token Proxy Queue entry. Used in the ACE_Token_Proxy_Queue

SYNOPSIS

#include <ace/Local_Tokens.h>
class ACE_TPQ_Entry
{
  public:
    friend class ACE_Token_Manager;
    typedef void (*PTVF) (void *);
    ACE_TPQ_Entry (void);
    ACE_TPQ_Entry (
        const ACE_Token_Proxy *proxy,
        const ASYS_TCHAR *client_id
        );
    ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs);
    ~ACE_TPQ_Entry (void);
    void operator= (const ACE_TPQ_Entry &rhs);
    ACE_Token_Proxy *proxy (void) const;
    void proxy (ACE_Token_Proxy *);
    int nesting_level (void) const;
    void nesting_level (int delta);
    const ASYS_TCHAR *client_id (void) const;
    void client_id (const ASYS_TCHAR *);
    int equal_client_id (const ASYS_TCHAR *id);
    void set (void (*sleep_hook)(void *));
    void sleep_hook (void (*sh)(void *));
    PTVF sleep_hook (void) const;
    void call_sleep_hook (void);
    void dump (void) const;
    ACE_TOKEN_CONST::COND_VAR cond_var_;
    ACE_TOKEN_CONST::MUTEX lock_;
    ACE_TPQ_Entry *next_;
    int waiting (void) const;
    void waiting (int w);
  private:
    int waiting_;
    ACE_Token_Proxy *proxy_;
    int nesting_level_;
    void *arg_;
    ASYS_TCHAR client_id_[ACE_MAXCLIENTIDLEN];
    void (*sleep_hook_)(void *);
};

DESCRIPTION

This file contains definitions for the following classes:

public:
7. ACE_Token_Proxy
8. ACE_Null_Token : public ACE_Token_Proxy
9. ACE_Local_Mutex : public ACE_Token_Proxy
*. ACE_Local_RLock : public ACE_Local_Mutex
&. ACE_Local_WLock : public ACE_Local_Mutex private:
1. ACE_TOKEN_CONST
3. ACE_TPQ_Entry
b. ACE_TSS_TPQ_Entry
c. ACE_TPQ_Iterator
4. ACE_Token_Proxy_Queue
5. ACE_Tokens
6. ACE_Mutex_Token : public ACE_Tokens
12. ACE_RW_Token : public ACE_Tokens
a. ACE_Token_Name

Note that the locking classes defined in this file are *not*
intended to be used as general-purpose synchronization
mechanisms, such as mutexes or semaphores. Instead, you should
use the ACE_Recursive_Thread_Mutex, ACE_Thread_Mutex,
ACE_Thread_Semaphore, etc., that are defined in
$ACE_ROOT/ace/Synch.h and $ACE_ROOT/ace/Synch_T.h or the
ACE_Token that's defined in $ACE_ROOT/ace/Token.h.

Set/get top of the queue.

ACE_Token_Proxy *proxy (void) const;

void proxy (ACE_Token_Proxy *);

Delta/get nesting level of the entry.

int nesting_level (void) const;

void nesting_level (int delta);

Set/get client_id of the entry.

const ASYS_TCHAR *client_id (void) const;

void client_id (const ASYS_TCHAR *);

int equal_client_id (const ASYS_TCHAR *id);

Returns 1 if id == client id. Does not check for id == 0.

void set (void (*sleep_hook)(void *));

One method for arg and sleep_hook.

Set/get sleep hook of the entry.

void sleep_hook (void (*sh)(void *));

PTVF sleep_hook (void) const;

void call_sleep_hook (void);

Call the sleep hook function or method passing arg.

void dump (void) const;

Dump the state of the class.

Used to block the thread if an acquire fails with EWOULDBLOCK.

ACE_TOKEN_CONST::COND_VAR cond_var_;

ACE_TOKEN_CONST::MUTEX lock_;

ACE_TPQ_Entry *next_;

Pointer to next in list.

Get/set whether this client is blocked waiting for a token.

int waiting (void) const;

void waiting (int w);

AUTHOR

Karl-Heinz Dorn [email protected], Douglas C. Schmidt [email protected], and Tim Harrison [email protected]

LIBRARY

ace