linuxsampler 2.3.1
LinuxSampler::SynchronizedConfig< T >::Reader Class Reference

#include <SynchronizedConfig.h>

Inheritance diagram for LinuxSampler::SynchronizedConfig< T >::Reader:
LinuxSampler::FrontBuffer< T >

Public Member Functions

TLock ()
 Gets the configuration object for use by the real time thread.
 
void Unlock ()
 Unlock the configuration object.
 
 Reader (SynchronizedConfig &config)
 
 Reader (SynchronizedConfig *config)
 
virtual ~Reader ()
 

Friends

class SynchronizedConfig
 

Detailed Description

template<class T>
class LinuxSampler::SynchronizedConfig< T >::Reader

Definition at line 66 of file SynchronizedConfig.h.

Constructor & Destructor Documentation

◆ Reader() [1/2]

template<class T >
LinuxSampler::SynchronizedConfig< T >::Reader::Reader ( SynchronizedConfig config)

Definition at line 199 of file SynchronizedConfig.h.

◆ Reader() [2/2]

template<class T >
LinuxSampler::SynchronizedConfig< T >::Reader::Reader ( SynchronizedConfig config)

Definition at line 205 of file SynchronizedConfig.h.

◆ ~Reader()

template<class T >
LinuxSampler::SynchronizedConfig< T >::Reader::~Reader ( )
virtual

Definition at line 211 of file SynchronizedConfig.h.

Member Function Documentation

◆ Lock()

template<class T >
T & LinuxSampler::SynchronizedConfig< T >::Reader::Lock ( )
inline

Gets the configuration object for use by the real time thread.

The object is safe to use (read only) until Unlock() is called.

Returns
a reference to the configuration object to be read by the real time thread

Definition at line 77 of file SynchronizedConfig.h.

References LinuxSampler::atomic_thread_fence(), LinuxSampler::atomic< int >::load(), LinuxSampler::memory_order_acquire, LinuxSampler::memory_order_relaxed, LinuxSampler::memory_order_seq_cst, and LinuxSampler::atomic< int >::store().

◆ Unlock()

template<class T >
void LinuxSampler::SynchronizedConfig< T >::Reader::Unlock ( )
inline

Unlock the configuration object.

Unlock() must be called by the real time thread after it has finished reading the configuration object. If the non real time thread is waiting in SwitchConfig() it will be awaken when no real time threads are locked anymore.

Definition at line 92 of file SynchronizedConfig.h.

References LinuxSampler::memory_order_release, and LinuxSampler::atomic< int >::store().

Friends And Related Symbol Documentation

◆ SynchronizedConfig

template<class T >
friend class SynchronizedConfig
friend

Definition at line 100 of file SynchronizedConfig.h.


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