|
Peano
|
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. | |
| MultiReadSingleWriteSemaphore & | operator= (const MultiReadSingleWriteSemaphore &) |
| You may not copy a semaphore. | |
Private Attributes | |
| ::oneapi::tbb::spin_rw_mutex | _mutex |
Friends | |
| class | tarch::multicore::MultiReadSingleWriteLock |
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.
| using tarch::multicore::MultiReadSingleWriteSemaphore::Lock = tarch::multicore::MultiReadSingleWriteLock |
Definition at line 70 of file MultiReadSingleWriteSemaphore.h.
|
privatedelete |
You may not copy a semaphore.
| tarch::multicore::MultiReadSingleWriteSemaphore::MultiReadSingleWriteSemaphore | ( | bool | highPriorityToWrites = true | ) |
Argument is ignored in TBB version.
|
default |
|
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++.
|
private |
|
private |
Tells the semaphore that it is about to leave.
|
private |
|
private |
You may not copy a semaphore.
Definition at line 61 of file MultiReadSingleWriteSemaphore.h.
|
friend |
Definition at line 33 of file MultiReadSingleWriteSemaphore.h.
|
private |
Definition at line 35 of file MultiReadSingleWriteSemaphore.h.