19 #if !defined(__TBB_show_deprecation_message_reader_writer_lock_H) && defined(__TBB_show_deprecated_header_message)
20 #define __TBB_show_deprecation_message_reader_writer_lock_H
21 #pragma message("TBB Warning: tbb/reader_writer_lock.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")
24 #if defined(__TBB_show_deprecated_header_message)
25 #undef __TBB_show_deprecated_header_message
28 #ifndef __TBB_reader_writer_lock_H
29 #define __TBB_reader_writer_lock_H
31 #define __TBB_reader_writer_lock_H_include_area
39 namespace interface5 {
114 void*
operator new(
size_t s) {
117 void operator delete(
void*
p) {
151 void*
operator new(
size_t s) {
154 void operator delete(
void*
p) {
244 #undef __TBB_reader_writer_lock_H_include_area
void const char const char int ITT_FORMAT __itt_group_sync s
tbb_thread::id my_current_writer
Writer that owns the mutex; tbb_thread::id() otherwise.
atomic< scoped_lock * > writer_head
The list of pending writers.
scoped_lock_read * next
The next queued competitor for the mutex.
scoped_lock_read(reader_writer_lock &lock)
Construct with blocking attempt to acquire read lock on the passed-in lock.
bool start_write(scoped_lock *)
Attempts to acquire write lock.
void set_next_writer(scoped_lock *w)
Sets writer_head to w and attempts to unblock.
status_t
Status type for nodes associated with lock instances.
The scoped lock pattern for write locks.
bool is_current_writer()
Checks if current thread holds write lock.
Base class for types that should not be copied or assigned.
reader_writer_lock * mutex
The pointer to the mutex to lock.
void end_read()
Relinquishes read lock by decrementing counter; last reader wakes pending writer. ...
atomic< status_t > status
Status flag of the thread associated with this node.
reader_writer_lock()
Constructs a new reader_writer_lock.
void __TBB_EXPORTED_METHOD internal_construct()
scoped_lock * next
The next queued competitor for the mutex.
class __TBB_DEPRECATED_IN_VERBOSE_MODE_MSG("tbb::aligned_space is deprecated, use std::aligned_storage") aligned_space
Block of space aligned sufficiently to construct an array T with N elements.
~reader_writer_lock()
Destructs a reader_writer_lock object.
bool __TBB_EXPORTED_METHOD try_lock()
Tries to acquire the reader_writer_lock for write.
void start_read(scoped_lock_read *)
Attempts to acquire read lock.
void __TBB_EXPORTED_METHOD internal_destroy()
void __TBB_EXPORTED_METHOD lock_read()
Acquires the reader_writer_lock for read.
The scoped lock pattern for read locks.
atomic< status_t > status
Status flag of the thread associated with this node.
#define __TBB_EXPORTED_METHOD
atomic< uintptr_t > rdr_count_and_flags
Status of mutex.
atomic< scoped_lock * > writer_tail
The last node in the list of pending writers.
void __TBB_EXPORTED_METHOD unlock()
Releases the reader_writer_lock.
void const char const char int ITT_FORMAT __itt_group_sync p
~scoped_lock_read()
Destructor, releases the read lock.
atomic< scoped_lock_read * > reader_head
The list of pending readers.
~scoped_lock()
Destructor, releases the write lock.
reader_writer_lock * mutex
The pointer to the mutex to lock.
void __TBB_EXPORTED_METHOD lock()
Acquires the reader_writer_lock for write.
scoped_lock(reader_writer_lock &lock)
Construct with blocking attempt to acquire write lock on the passed-in lock.
void __TBB_EXPORTED_FUNC deallocate_via_handler_v3(void *p)
Deallocates memory using FreeHandler.
void unblock_readers()
Unblocks pending readers.
void end_write(scoped_lock *)
Relinquishes write lock to next waiting writer or group of readers.
bool __TBB_EXPORTED_METHOD try_lock_read()
Tries to acquire the reader_writer_lock for read.
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id id
void *__TBB_EXPORTED_FUNC allocate_via_handler_v3(size_t n)
Allocates memory using MallocHandler.
class friend class("tbb::reader_writer_lock is deprecated, use std::shared_mutex") reader_writer_lock scoped_lock_read
Writer-preference reader-writer lock with local-only spinning on readers.