NAME

ACE_Mutex_Token - Not a public interface.

SYNOPSIS


#include <ace/Local_Tokens>


class ACE_Mutex_Token : public ACE_Tokens
{
  public:
    ACE_Mutex_Token (const char* name);
    ~ACE_Mutex_Token (void);
    virtual int acquire (
        ACE_TPQ_Entry *caller,
        int ignore_deadlock,
        int notify
        );
    virtual int tryacquire (ACE_TPQ_Entry *caller);
    virtual int renew (ACE_TPQ_Entry *caller, int requeue_position);
    virtual int release (ACE_TPQ_Entry *caller);
    void dump (void) const;
    virtual int type (void) const;
    virtual int owners (OWNER_STACK &o, const char *id);
    virtual int is_waiting_for (const char *id);
    virtual int is_owner (const char *id);
  private:
    ACE_TOKEN_CONST::MUTEX lock_;
};

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

Synchronization operations.

With acquire, renew, and release, the caller must be specified so that multiple proxies (e.g. ACE_Local_Mutex) can use the same token.
virtual int acquire (
    ACE_TPQ_Entry *caller,
    int ignore_deadlock,
    int notify
    );
virtual int tryacquire (ACE_TPQ_Entry *caller);
virtual int renew (ACE_TPQ_Entry *caller, int requeue_position);
virtual int release (ACE_TPQ_Entry *caller);
void dump (void) const;
virtual int type (void) const;
virtual int owners (OWNER_STACK &o, const char *id);
virtual int is_waiting_for (const char *id);
virtual int is_owner (const char *id);

AUTHOR

Karl-Heinz Dorn (kdorn@erlh.siemens.de) Douglas C. Schmidt (schmidt@cs.wustl.edu) Tim Harrison (harrison@cs.wustl.edu)

DESCRIPTION

Class that acquires, renews, and releases a process-local synchronization token. This class is a more general-purpose synchronization mechanism than SunOS 5.x mutexes. For example, it implements "recursive mutex" semantics, where a thread that owns the token can reacquire it without deadlocking. In addition, threads that are blocked awaiting the token are serviced in strict FIFO order as other threads release the token (SunOS 5.x mutexes don't strictly enforce an acquisition order).

LIBRARY

ace