---
name: "ACE_RW_Thread_Mutex"
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_RW_Thread_Mutex"
---

# ACE\_RW\_Thread\_Mutex(3)

Wrapper for readers/writer locks that exist within a process.

## NAME

ACE\_RW\_Thread\_Mutex -  Wrapper for readers/writer locks that exist within a process.

## SYNOPSIS

```
#include <ace/Synch.h>
class ACE_RW_Thread_Mutex : public ACE_RW_Mutex
{
  public:
    ACE_RW_Thread_Mutex (LPCTSTR name = 0, void *arg = 0);
    ~ACE_RW_Thread_Mutex (void);
    int tryacquire_write_upgrade (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
};
```

## DESCRIPTION

Wrappers for various synchronization routines.

## PUBLIC MEMBERS

```
ACE_RW_Thread_Mutex (LPCTSTR name = 0, void *arg = 0);
```

```
~ACE_RW_Thread_Mutex (void);
```

Default dtor.

```
int tryacquire_write_upgrade (void);
```

Conditionally upgrade a read lock to a write lock.  This only works if there are no other readers present, in which case the method returns 0.  Otherwise, the method returns -1 and sets errno to EBUSY.  Note that the caller of this method \*must\* already possess this lock as a read lock (but this condition is not checked by the current implementation).

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

Dump the state of an object.

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
