Acquire/release a RWlock RAII-style.
More...
#include <RWlock.h>
Acquire/release a RWlock RAII-style.
- Author
- Adam McKee
Definition at line 116 of file RWlock.h.
◆ RWlockGuard() [1/2]
utl::RWlockGuard::RWlockGuard |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 120 of file RWlock.h.
◆ RWlockGuard() [2/2]
utl::RWlockGuard::RWlockGuard |
( |
RWlock * |
rwlock, |
|
|
uint_t |
mode |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
rwlock | RWlock to lock |
mode | (io_rd : read-lock, io_wr : write-lock) |
Definition at line 131 of file RWlock.h.
◆ ~RWlockGuard()
utl::RWlockGuard::~RWlockGuard |
( |
| ) |
|
|
inline |
◆ lock() [1/2]
void utl::RWlockGuard::lock |
( |
RWlock * |
rwlock, |
|
|
uint_t |
mode |
|
) |
| |
|
inline |
Acquire read- or write-lock.
- Parameters
-
rwlock | RWlock to lock |
mode | (io_rd : read-lock, io_wr : write-lock) |
Definition at line 150 of file RWlock.h.
◆ lock() [2/2]
void utl::RWlockGuard::lock |
( |
uint_t |
mode | ) |
|
|
inline |
Acquire read- or write-lock.
- Parameters
-
mode | (io_rd : read-lock, io_wr : write-lock) |
Definition at line 162 of file RWlock.h.
References utl::io_rd.
◆ rdlock() [1/2]
void utl::RWlockGuard::rdlock |
( |
RWlock * |
rwlock | ) |
|
|
inline |
Acquire read-lock.
- Parameters
-
Definition at line 172 of file RWlock.h.
◆ wrlock() [1/2]
void utl::RWlockGuard::wrlock |
( |
RWlock * |
rwlock | ) |
|
|
inline |
Acquire write-lock.
- Parameters
-
Definition at line 184 of file RWlock.h.
◆ rdlock() [2/2]
void utl::RWlockGuard::rdlock |
( |
| ) |
|
|
inline |
Acquire read-lock.
Definition at line 193 of file RWlock.h.
◆ wrlock() [2/2]
void utl::RWlockGuard::wrlock |
( |
| ) |
|
|
inline |
Acquire write-lock.
Definition at line 201 of file RWlock.h.
◆ trylock() [1/2]
bool utl::RWlockGuard::trylock |
( |
RWlock * |
rwlock, |
|
|
uint_t |
mode |
|
) |
| |
|
inline |
Try to acquire read- or write-lock (without blocking).
- Parameters
-
rwlock | RWlock to lock |
mode | (io_rd : read-lock, io_wr : write-lock) |
- Returns
- true if lock acquired, false otherwise
Definition at line 214 of file RWlock.h.
◆ trylock() [2/2]
bool utl::RWlockGuard::trylock |
( |
uint_t |
mode | ) |
|
|
inline |
Try to acquire read- or write-lock (without blocking).
- Parameters
-
mode | (io_rd : read-lock, io_wr : write-lock) |
- Returns
- true if lock acquired, false otherwise
Definition at line 227 of file RWlock.h.
References utl::io_rd.
◆ tryrdlock() [1/2]
bool utl::RWlockGuard::tryrdlock |
( |
RWlock * |
rwlock | ) |
|
|
inline |
Try to acquire read-lock (without blocking).
- Parameters
-
- Returns
- true if read-lock acquired, false otherwise
Definition at line 238 of file RWlock.h.
◆ trywrlock() [1/2]
bool utl::RWlockGuard::trywrlock |
( |
RWlock * |
rwlock | ) |
|
|
inline |
Try to acquire write-lock (without blocking).
- Parameters
-
- Returns
- true if write-lock acquired, false otherwise
Definition at line 251 of file RWlock.h.
◆ tryrdlock() [2/2]
bool utl::RWlockGuard::tryrdlock |
( |
| ) |
|
|
inline |
Try to acquire read-lock (without blocking).
- Returns
- true if read-lock acquired, false otherwise
Definition at line 263 of file RWlock.h.
◆ trywrlock() [2/2]
bool utl::RWlockGuard::trywrlock |
( |
| ) |
|
|
inline |
Try to acquire write-lock (without blocking).
- Returns
- true if write-lock acquired, false otherwise
Definition at line 274 of file RWlock.h.
◆ unlock()
void utl::RWlockGuard::unlock |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: