Yate
AtomicOp Class Reference

Base class for atomic operations. More...

#include <yateclass.h>

Inheritance diagram for AtomicOp:
YAtomicNumber< int > YAtomicNumber< unsigned int > YAtomicNumber< int64_t > YAtomicNumber< uint64_t > YAtomicNumber< int32_t > YAtomicNumber< uint32_t > YAtomicNumber< Type >

Public Member Functions

 AtomicOp ()
RWLocklock () const

Static Public Member Functions

static bool efficient ()

Protected Attributes

RWLockm_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()

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

References m_lock.

Member Data Documentation

◆ m_lock

RWLock* m_lock
mutableprotected

Mutex used to protect changes if atomic operation is not available

Referenced by lock().


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