Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
17 #ifndef __TBB_queuing_rw_mutex_H
18 #define __TBB_queuing_rw_mutex_H
20 #define __TBB_queuing_rw_mutex_H_include_area
38 #if TBB_USE_THREADING_TOOLS
152 #undef __TBB_queuing_rw_mutex_H_include_area
~scoped_lock()
Release lock (if lock is held).
void acquire_internal_lock()
Acquire the internal lock.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
static const bool is_rw_mutex
Queuing reader-writer mutex with local-only spinning.
queuing_rw_mutex * my_mutex
The pointer to the mutex owned, or NULL if not holding a mutex.
void poison_pointer(T *__TBB_atomic &)
~queuing_rw_mutex()
Destructor asserts if the mutex is acquired, i.e. q_tail is non-NULL.
void unblock_or_wait_on_internal_lock(uintptr_t)
A helper function.
scoped_lock *__TBB_atomic my_prev
The pointer to the previous and next competitors for a mutex.
void __TBB_EXPORTED_METHOD internal_construct()
void initialize()
Initialize fields to mean "no lock held".
static const bool is_fair_mutex
atomic< scoped_lock * > q_tail
The last competitor requesting the lock.
bool try_acquire(queuing_rw_mutex &m, bool write=true)
Acquire lock on given mutex if free (i.e. non-blocking)
scoped_lock *__TBB_atomic *__TBB_atomic my_next
unsigned char __TBB_atomic my_going
The local spin-wait variable.
scoped_lock(queuing_rw_mutex &m, bool write=true)
Acquire lock on given mutex.
bool downgrade_to_reader()
Downgrade writer to become a reader.
void release()
Release lock.
static const bool is_recursive_mutex
bool upgrade_to_writer()
Upgrade reader to become a writer.
The scoped locking pattern.
Base class for types that should not be copied or assigned.
unsigned char my_internal_lock
A tiny internal lock.
void release_internal_lock()
Release the internal lock.
bool try_acquire_internal_lock()
Try to acquire the internal lock.
void wait_for_release_of_internal_lock()
Wait for internal lock to be released.
#define __TBB_DEFINE_PROFILING_SET_NAME(sync_object_type)
#define __TBB_EXPORTED_METHOD
queuing_rw_mutex()
Construct unacquired mutex.
scoped_lock()
Construct lock that has not acquired a mutex.
void acquire(queuing_rw_mutex &m, bool write=true)
Acquire lock on given mutex.
atomic< state_t > my_state
State of the request: reader, writer, active reader, other service states.
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.