Peano
Loading...
Searching...
No Matches
MultiReadSingleWriteLock.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6namespace tarch {
7 namespace multicore {
8 class MultiReadSingleWriteSemaphore;
9 class MultiReadSingleWriteLock;
10 }
11}
12
13
20 private:
22 const bool _isReadLock;
24 public:
25 static constexpr bool Read = true;
26 static constexpr bool Write = false;
27
34 MultiReadSingleWriteLock( tarch::multicore::MultiReadSingleWriteSemaphore& semaphore, bool isReadLock, bool aquireLockImmediately = true );
36
37 void lock();
38 void free();
39};
40
Create a lock around a boolean semaphore region.
MultiReadSingleWriteLock(tarch::multicore::MultiReadSingleWriteSemaphore &semaphore, bool isReadLock, bool aquireLockImmediately=true)
Construct lock.
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19