Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
17 #ifndef __TBB_spin_rw_mutex_H
18 #define __TBB_spin_rw_mutex_H
27 #if __TBB_TSX_AVAILABLE
28 namespace interface8 {
namespace internal {
29 class x86_rtm_rw_mutex;
33 class spin_rw_mutex_v3;
71 #if TBB_USE_THREADING_TOOLS
87 #if __TBB_TSX_AVAILABLE
88 friend class tbb::interface8::internal::x86_rtm_rw_mutex;
128 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
141 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
188 #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT
227 #if __TBB_TSX_AVAILABLE
232 namespace interface8 {
242 #if __TBB_TSX_AVAILABLE
bool try_acquire(spin_rw_mutex &m, bool write=true)
Try acquire lock on given mutex.
bool __TBB_EXPORTED_METHOD internal_upgrade()
Internal upgrade reader to become a writer.
spin_rw_mutex_v3()
Construct unacquired mutex.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Fast, unfair, spinning reader-writer lock with backoff and writer-preference.
static const state_t BUSY
static const bool is_recursive_mutex
void acquire(spin_rw_mutex &m, bool write=true)
Acquire lock on given mutex.
void lock()
Acquire writer lock.
bool upgrade_to_writer()
Upgrade reader to become a writer.
static const state_t WRITER
spin_rw_mutex_v3 spin_rw_mutex
interface7::internal::padded_mutex< tbb::spin_rw_mutex, true > speculative_spin_rw_mutex
A cross-platform spin reader/writer mutex with speculative lock acquisition.
void __TBB_EXPORTED_METHOD internal_release_reader()
Internal release read lock.
state_t state
State of lock.
static const bool is_fair_mutex
static const bool is_rw_mutex
bool __TBB_EXPORTED_METHOD internal_try_acquire_writer()
Internal try_acquire write lock.
bool try_lock()
Try acquiring writer lock (non-blocking)
void __TBB_EXPORTED_METHOD internal_release_writer()
Out of line code for releasing a write lock.
void __TBB_EXPORTED_METHOD internal_construct()
scoped_lock(spin_rw_mutex &m, bool write=true)
Acquire lock on given mutex.
void __TBB_AtomicAND(volatile void *operand, uintptr_t addend)
void __TBB_EXPORTED_METHOD internal_downgrade()
Out of line code for downgrading a writer to a reader.
static const state_t ONE_READER
bool __TBB_EXPORTED_METHOD internal_acquire_writer()
Internal acquire write lock.
bool is_writer
If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock.
bool try_lock_read()
Try acquiring reader lock (non-blocking)
The scoped locking pattern.
spin_rw_mutex * mutex
The pointer to the current mutex that is held, or NULL if no mutex is held.
Base class for types that should not be copied or assigned.
void unlock()
Release lock.
void lock_read()
Acquire reader lock.
bool downgrade_to_reader()
Downgrade writer to become a reader.
void release()
Release lock.
bool __TBB_EXPORTED_METHOD internal_try_acquire_reader()
Internal try_acquire read lock.
#define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)
static const state_t WRITER_PENDING
~scoped_lock()
Release lock (if lock is held).
#define __TBB_EXPORTED_METHOD
#define __TBB_FetchAndAddWrelease(P, V)
static const state_t READERS
void __TBB_EXPORTED_METHOD internal_acquire_reader()
Internal acquire read lock.
scoped_lock()
Construct lock that has not acquired a mutex.
Copyright © 2005-2020 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.