#include <ace/Local_Tokens.h>
class ACE_Tokens {
public:
ACE_Tokens (void);
virtual int acquire ( ACE_TPQ_Entry *caller, int ignore_deadlock, int notify ) = 0;
virtual int tryacquire (ACE_TPQ_Entry *caller) = 0;
virtual int renew ( ACE_TPQ_Entry *caller, int requeue_position ) = 0;
virtual int release (ACE_TPQ_Entry *caller) = 0;
void make_owner (ACE_TPQ_Entry *caller);
void remove (ACE_TPQ_Entry *caller);
typedef ACE_Unbounded_Stack<ACE_TPQ_Entry *> OWNER_STACK;
virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id) = 0;
virtual int is_waiting_for (const ASYS_TCHAR *id) = 0;
virtual int is_owner (const ASYS_TCHAR *id) = 0;
virtual ACE_Token_Proxy_Queue *waiters (void);
virtual int no_of_waiters (void);
const ASYS_TCHAR *owner_id (void);
const ASYS_TCHAR* name (void);
void inc_reference (void);
int dec_reference (void);
void dump (void) const;
enum TOKEN_TYPES { MUTEX, RWLOCK };
virtual int type (void) const = 0;
void visit (int v);
int visited (void);
ACE_TPQ_Entry *owner (void);
protected:
int visited_;
int reference_count_;
ACE_Token_Proxy_Queue waiters_;
ASYS_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
};
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
typedef ACE_Unbounded_Stack<ACE_TPQ_Entry *> OWNER_STACK;
virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id) = 0;
id
is non-zero, returns 1 if id is an owner.
virtual int is_waiting_for (const ASYS_TCHAR *id) = 0;
id
is waiting for this token. 0 otherwise.
virtual int is_owner (const ASYS_TCHAR *id) = 0;
id
is an owner of this token. 0 otherwise.
virtual ACE_Token_Proxy_Queue *waiters (void);
virtual int no_of_waiters (void);
const ASYS_TCHAR *owner_id (void);
const ASYS_TCHAR* name (void);
void inc_reference (void);
int dec_reference (void);
void dump (void) const;
virtual int type (void) const = 0;
void visit (int v);
int visited (void);
ACE_TPQ_Entry *owner (void);