Yate
AtomicOp Class Reference

Base class for atomic operations. More...

#include <yateclass.h>

Inheritance diagram for AtomicOp:
YAtomicNumber< int > 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()

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: