|
Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
The scoped locking pattern. More...
#include <mutex.h>
Public Member Functions | |
| scoped_lock () | |
| Construct lock that has not acquired a mutex. More... | |
| scoped_lock (mutex &mutex) | |
| Acquire lock on given mutex. More... | |
| ~scoped_lock () | |
| Release lock (if lock is held). More... | |
| void | acquire (mutex &mutex) |
| Acquire lock on given mutex. More... | |
| bool | try_acquire (mutex &mutex) |
| Try acquire lock on given mutex. More... | |
| void | release () |
| Release lock. More... | |
| scoped_lock () | |
| Construct lock that has not acquired a recursive_mutex. More... | |
| scoped_lock (recursive_mutex &mutex) | |
| Acquire lock on given mutex. More... | |
| ~scoped_lock () | |
| Release lock (if lock is held). More... | |
| void | acquire (recursive_mutex &mutex) |
| Acquire lock on given mutex. More... | |
| bool | try_acquire (recursive_mutex &mutex) |
| Try acquire lock on given recursive_mutex. More... | |
| void | release () |
| Release lock. More... | |
Private Member Functions | |
| void __TBB_EXPORTED_METHOD | internal_acquire (mutex &m) |
| All checks from acquire using mutex.state were moved here. More... | |
| bool __TBB_EXPORTED_METHOD | internal_try_acquire (mutex &m) |
| All checks from try_acquire using mutex.state were moved here. More... | |
| void __TBB_EXPORTED_METHOD | internal_release () |
| All checks from release using mutex.state were moved here. More... | |
| void __TBB_EXPORTED_METHOD | internal_acquire (recursive_mutex &m) |
| All checks from acquire using mutex.state were moved here. More... | |
| bool __TBB_EXPORTED_METHOD | internal_try_acquire (recursive_mutex &m) |
| All checks from try_acquire using mutex.state were moved here. More... | |
| void __TBB_EXPORTED_METHOD | internal_release () |
| All checks from release using mutex.state were moved here. More... | |
Private Member Functions inherited from tbb::internal::no_copy | |
| no_copy (const no_copy &)=delete | |
| no_copy ()=default | |
Private Attributes | |
| mutex * | my_mutex |
| The pointer to the current mutex to work. More... | |
| recursive_mutex * | my_mutex |
| The pointer to the current recursive_mutex to work. More... | |
Friends | |
| class | mutex |
| class | recursive_mutex |
The scoped locking pattern.
It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.
|
inline |
Construct lock that has not acquired a mutex.
Definition at line 88 of file mutex.h.
|
inline |
Acquire lock on given mutex.
Definition at line 91 of file mutex.h.
References tbb::acquire.
|
inline |
Release lock (if lock is held).
Definition at line 96 of file mutex.h.
References tbb::release.
|
inline |
Construct lock that has not acquired a recursive_mutex.
Definition at line 97 of file recursive_mutex.h.
|
inline |
Acquire lock on given mutex.
Definition at line 100 of file recursive_mutex.h.
References tbb::acquire.
|
inline |
Release lock (if lock is held).
Definition at line 108 of file recursive_mutex.h.
References tbb::release.
Acquire lock on given mutex.
Definition at line 102 of file mutex.h.
|
inline |
Acquire lock on given mutex.
Definition at line 114 of file recursive_mutex.h.
|
private |
All checks from acquire using mutex.state were moved here.
|
private |
All checks from acquire using mutex.state were moved here.
|
private |
All checks from release using mutex.state were moved here.
|
private |
All checks from release using mutex.state were moved here.
|
private |
All checks from try_acquire using mutex.state were moved here.
|
private |
All checks from try_acquire using mutex.state were moved here.
|
inline |
Release lock.
Definition at line 124 of file mutex.h.
|
inline |
Release lock.
Definition at line 136 of file recursive_mutex.h.
|
inline |
Try acquire lock on given mutex.
Definition at line 112 of file mutex.h.
|
inline |
Try acquire lock on given recursive_mutex.
Definition at line 124 of file recursive_mutex.h.
|
friend |
Definition at line 158 of file recursive_mutex.h.
|
private |
|
private |
The pointer to the current recursive_mutex to work.
Definition at line 147 of file recursive_mutex.h.