dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::lock< lock_t > Class Template Reference

#include <dxd_sync_platform.h>

Public Member Functions

 lock()
 lock(const lock &)= delete
 lock(const lock &)= delete
 lock(lock&& lock)
 the lock travels with the guard: whoever holds it releases it exactly once
 lock(lock&& lock)
 lock(lock_t& lock)
 lock(lock_t& lock)
bool trylock(lock_t& lock)
 true if the mutex could be obtained, false if it is held elsewhere
bool trylock(lock_t& lock)
 ~lock()
 ~lock()

Public Attributes

os_result status

Constructor & Destructor Documentation

◆ lock() [1/7]

template<class lock_t= mutex>
dxd::lock<lock_t>::lock(lock_t& lock)
inline

◆ lock() [2/7]

template<class lock_t= mutex>
dxd::lock<lock_t>::lock(lock<lock_t>&& lock)
inline

the lock travels with the guard: whoever holds it releases it exactly once

◆ lock() [3/7]

template<class lock_t= mutex>
dxd::lock<lock_t>::lock(const lock<lock_t>&)
delete

◆ ~lock() [1/2]

template<class lock_t= mutex>
dxd::lock<lock_t>::~lock()
inline

◆ lock() [4/7]

template<class lock_t= mutex>
dxd::lock<lock_t>::lock()
inline

this constructor is only used in conjunction with trylock(): where the mutex or rwlock might be obtained at trylock() time

Here is the caller graph for this function:

◆ lock() [5/7]

template<class lock_t= mutex>
dxd::lock<lock_t>::lock(lock_t& lock)
inline

standard constructor

Parameters
lockthe mutex or rwlock object to lock

◆ lock() [6/7]

template<class lock_t= mutex>
dxd::lock<lock_t>::lock(lock<lock_t>&& lock)
inline

the lock travels with the guard: whoever holds it releases it exactly once

◆ lock() [7/7]

template<class lock_t= mutex>
dxd::lock<lock_t>::lock(const lock<lock_t>&)
delete

◆ ~lock() [2/2]

template<class lock_t= mutex>
dxd::lock<lock_t>::~lock()
inline

standard destructor

Member Function Documentation

◆ trylock() [1/2]

template<class lock_t= mutex>
bool dxd::lock<lock_t>::trylock(lock_t& lock)
inline

true if the mutex could be obtained, false if it is held elsewhere

◆ trylock() [2/2]

template<class lock_t= mutex>
bool dxd::lock<lock_t>::trylock(lock_t& lock)
inline

try to obtain the lock for the mutex or rwlock object; returns true if mutex or rwlock object could be successfully locked; false if mutex was locked elsewhere

Parameters
lockthe mutex or rwlock object to lock

Member Data Documentation

◆ status

template<class lock_t= mutex>
os_result dxd::lock<lock_t>::status

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