Yate: AtomicOp Class Reference

Yate

Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AtomicOp Class Reference

Base class for atomic operations. More...

`#include <yateclass.h>`

Inheritance diagram for AtomicOp:

## Public Member Functions
| AtomicOp ()
RWLock * | lock () const

## Static Public Member Functions
static bool | efficient ()

## Protected Attributes
RWLock * | m_lock

## Detailed Description

Base class for atomic operations.

Holds an optional lock protecting an atomic operation

## Constructor & Destructor Documentation

## ◆ AtomicOp()

AtomicOp | ( |  | ) |

Constructor

## Member Function Documentation

## ◆ efficient()

static bool efficient | ( |  | ) |
| static

Check if atomic operations are used efficiently

Returns
  True if efficient, false otherwise (lock is used)

## ◆ lock()

RWLock * lock | ( |  | ) | const
| inline

Retrieve the lock used to protect the atomic operation

Returns
  RWLock pointer, NULL if atomic operation is available

## Member Data Documentation

## ◆ m_lock

RWLock* m_lock
| mutableprotected

Mutex used to protect changes if atomic operation is not available

The documentation for this class was generated from the following file:

- yateclass.h