Reference

ACE_Local_RLock(3)

Class that acquires, renews, and releases a readers lock that is local to the process.

NAME

ACE_Local_RLock - Class that acquires, renews, and releases a readers lock that is local to the process.

SYNOPSIS

#include <ace/Local_Tokens.h>
class ACE_Local_RLock : public ACE_Token_Proxy
{
  public:
    ACE_Local_RLock (
        const ASYS_TCHAR *token_name = 0,
        int ignore_deadlock = 0,
        int debug = 0
        );
    ~ACE_Local_RLock (void);
    void dump (void) const;
    virtual int type (void) const;
    virtual ACE_Token_Proxy *clone (void) const;
  protected:
    virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
};

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.

Initialization and termination.

ACE_Local_RLock (
    const ASYS_TCHAR *token_name = 0,
    int ignore_deadlock = 0,
    int debug = 0
    );

token_name uniquely id's the token. ignore_deadlock will allow deadlock to occur (useful for testing). debug prints a bunch of messages.

~ACE_Local_RLock (void);

Destructor

void dump (void) const;

Dump the state of the class.

virtual int type (void) const;

Returns ACE_RW_Token::RLOCK.

virtual ACE_Token_Proxy *clone (void) const;

Return deep copy.

AUTHOR

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

LIBRARY

ace