---
name: "ACE_RWLock_Invariants"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_RWLock_Invariants"
---

# ACE\_RWLock\_Invariants(3)

RWLock Invariants

## NAME

ACE\_RWLock\_Invariants -  RWLock Invariants

## SYNOPSIS

```
#include <ace/Token_Invariants.h>
class ACE_RWLock_Invariants
{
  public:
    ACE_RWLock_Invariants (void);
    int writer_acquired (void);
    int reader_acquired (void);
    void releasing (void);
    ACE_RWLock_Invariants (const ACE_RWLock_Invariants &rhs);
    void operator= (const ACE_RWLock_Invariants &rhs);
    void dump (void) const;
  private:
    int writers_;
    int readers_;
};
```

## DESCRIPTION

Allows applications to test that invariants are always satisfied.  Can test mutexes and readers/writer locks.  Does not test recursive acquisition.

## Map\_Manager operations.

```
ACE_RWLock_Invariants (const ACE_RWLock_Invariants &rhs);
```

Copy construction.

```
void operator= (const ACE_RWLock_Invariants &rhs);
```

Copy.

```
void dump (void) const;
```

Dump the state of the class.

## AUTHOR

Tim Harrison (harrison@cs.wustl.edu)

## INVARIANTS

1\. Only one writer at a time. 2. If there is an owning writer, there are no owning readers.

## LIBRARY

ace
