third-party/tbb/src/doc/html/a00144.html
Public Member Functions | Protected Attributes | Friends | List of all members
tbb::spin_rw_mutex_v3::scoped_lock Class Reference
The scoped locking pattern. More...
#include <spin_rw_mutex.h>
Inheritance diagram for tbb::spin_rw_mutex_v3::scoped_lock:
|
|
| | scoped_lock () |
| | Construct lock that has not acquired a mutex. More...
|
| |
| | scoped_lock (spin_rw_mutex &m, bool write=true) |
| | Acquire lock on given mutex.
|
| |
| | ~scoped_lock () |
| | Release lock (if lock is held).
|
| |
| void | acquire (spin_rw_mutex &m, bool write=true) |
| | Acquire lock on given mutex.
|
| |
| bool | upgrade_to_writer () |
| | Upgrade reader to become a writer. More...
|
| |
| void | release () |
| | Release lock.
|
| |
| bool | downgrade_to_reader () |
| | Downgrade writer to become a reader.
|
| |
| bool | try_acquire (spin_rw_mutex &m, bool write=true) |
| | Try acquire lock on given mutex.
|
| |
|
|
| spin_rw_mutex * | mutex |
| | The pointer to the current mutex that is held, or NULL if no mutex is held.
|
| |
| bool | is_writer |
| | If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock. More...
|
| |
|
| | class | tbb::interface8::internal::x86_rtm_rw_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.
|
| tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock | ( | | ) | |
| inline |
Construct lock that has not acquired a mutex.
Equivalent to zero-initialization of *this.
|
| bool tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer | ( | | ) | |
| inline |
Upgrade reader to become a writer.
Returns whether the upgrade happened without releasing and re-acquiring the lock
References is_writer.
|
| bool tbb::spin_rw_mutex_v3::scoped_lock::is_writer |
| protected |
If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock.
Not defined if not holding a lock.
Referenced by acquire(), downgrade_to_reader(), release(), try_acquire(), and upgrade_to_writer().
The documentation for this class was generated from the following file:
Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.