third-party/tbb/src/doc/html/a00154.html
Classes | Public Member Functions | Static Public Attributes | Friends | List of all members
tbb::spin_mutex Class Reference Synchronization
A lock that occupies a single byte. More...
#include <spin_mutex.h>
Inheritance diagram for tbb::spin_mutex:
|
|
| class | scoped_lock |
| | Represents acquisition of a mutex. More...
|
| |
|
|
| | spin_mutex () |
| | Construct unacquired lock. More...
|
| |
| void __TBB_EXPORTED_METHOD | internal_construct () |
| | Internal constructor with ITT instrumentation.
|
| |
| void | lock () |
| | Acquire lock.
|
| |
| bool | try_lock () |
| | Try acquiring lock (non-blocking) More...
|
| |
| void | unlock () |
| | Release lock.
|
| |
|
| | static const bool | is_rw_mutex = false | | | | static const bool | is_recursive_mutex = false | | | | static const bool | is_fair_mutex = false | | |
|
| | class | scoped_lock | | |
A lock that occupies a single byte.
A spin_mutex is a spin mutex that fits in a single byte. It should be used only for locking short critical sections (typically less than 20 instructions) when fairness is not an issue. If zero-initialized, the mutex is considered unheld.
|
| tbb::spin_mutex::spin_mutex | ( | | ) | |
| inline |
Construct unacquired lock.
Equivalent to zero-initialization of *this.
References internal_construct().
|
| bool tbb::spin_mutex::try_lock | ( | | ) | |
| inline |
Try acquiring lock (non-blocking)
Return true if lock acquired; false otherwise.
References tbb::aligned_space< T, N >::begin().
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.