Peano
Loading...
Searching...
No Matches
tarch::multicore::MultiReadSingleWriteSemaphore Class Reference

Read/write Semaphore. More...

#include <MultiReadSingleWriteSemaphore.h>

Public Types

using Lock = tarch::multicore::MultiReadSingleWriteLock
 

Public Member Functions

 MultiReadSingleWriteSemaphore (bool highPriorityToWrites=true)
 Argument is ignored in TBB version.
 
 ~MultiReadSingleWriteSemaphore ()=default
 

Private Member Functions

void enterCriticalReadSection ()
 Delegate to TBB.
 
void enterCriticalWriteSection ()
 
void leaveCriticalReadSection ()
 Tells the semaphore that it is about to leave.
 
void leaveCriticalWriteSection ()
 
 MultiReadSingleWriteSemaphore (const MultiReadSingleWriteSemaphore &)=delete
 You may not copy a semaphore.
 
MultiReadSingleWriteSemaphoreoperator= (const MultiReadSingleWriteSemaphore &)
 You may not copy a semaphore.
 

Private Attributes

::oneapi::tbb::spin_rw_mutex _mutex
 

Friends

class tarch::multicore::MultiReadSingleWriteLock
 

Detailed Description

Read/write Semaphore.

TBB-specific implementation of this class. There's a generic implementation of tarch::multicore::MultiReadSingleWriteSemaphore in the parent folder. However, TBB already offers exactly this feature (as opposed to other multithreading runtimes), so it makes no sense not to use this bespoke implementation contributed by Intel.

Definition at line 31 of file MultiReadSingleWriteSemaphore.h.

Member Typedef Documentation

◆ Lock

Constructor & Destructor Documentation

◆ MultiReadSingleWriteSemaphore() [1/2]

tarch::multicore::MultiReadSingleWriteSemaphore::MultiReadSingleWriteSemaphore ( const MultiReadSingleWriteSemaphore & )
privatedelete

You may not copy a semaphore.

◆ MultiReadSingleWriteSemaphore() [2/2]

tarch::multicore::MultiReadSingleWriteSemaphore::MultiReadSingleWriteSemaphore ( bool highPriorityToWrites = true)

Argument is ignored in TBB version.

◆ ~MultiReadSingleWriteSemaphore()

tarch::multicore::MultiReadSingleWriteSemaphore::~MultiReadSingleWriteSemaphore ( )
default

Member Function Documentation

◆ enterCriticalReadSection()

void tarch::multicore::MultiReadSingleWriteSemaphore::enterCriticalReadSection ( )
private

Delegate to TBB.

Basically, this is a renaming of TBB's function calls to make it compatible with our manual implementation that we have to use for OpenMP and native C++.

◆ enterCriticalWriteSection()

void tarch::multicore::MultiReadSingleWriteSemaphore::enterCriticalWriteSection ( )
private

◆ leaveCriticalReadSection()

void tarch::multicore::MultiReadSingleWriteSemaphore::leaveCriticalReadSection ( )
private

Tells the semaphore that it is about to leave.

◆ leaveCriticalWriteSection()

void tarch::multicore::MultiReadSingleWriteSemaphore::leaveCriticalWriteSection ( )
private

◆ operator=()

MultiReadSingleWriteSemaphore & tarch::multicore::MultiReadSingleWriteSemaphore::operator= ( const MultiReadSingleWriteSemaphore & )
private

You may not copy a semaphore.

Definition at line 61 of file MultiReadSingleWriteSemaphore.h.

Friends And Related Symbol Documentation

◆ tarch::multicore::MultiReadSingleWriteLock

Definition at line 33 of file MultiReadSingleWriteSemaphore.h.

Field Documentation

◆ _mutex

::oneapi::tbb::spin_rw_mutex tarch::multicore::MultiReadSingleWriteSemaphore::_mutex
private

Definition at line 35 of file MultiReadSingleWriteSemaphore.h.


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