Template Class RWLock

Class Documentation

template<MemoryScope scope = MemoryScope::SYSTEM>
class RWLock

readers-writer lock

Public Functions

inline RWLock()
~RWLock() = default
RWLock(const RWLock&) = delete
RWLock &operator=(const RWLock&) = delete
RWLock(RWLock&&) = delete
__host__ __device__ inline void AcquireShared()

Blocking method to acquire the lock for reading.

__host__ __device__ inline bool TryAcquireShared()

Non-blocking method to acquire the lock for reading.

__host__ __device__ inline void ReleaseShared()

method to release the shared reading lock

__host__ __device__ inline void Acquire()

blocking method to acquire the exclusive writing lock

__host__ __device__ inline bool TryAcquire()

non-blocking method to acquire the exclusive writing lock

__host__ __device__ inline void Release()

method to release the exclusive writing lock