Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reader_writer_lock.h File Reference
Include dependency graph for reader_writer_lock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tbb::interface5::scoped_lock
 The scoped lock pattern for write locks. More...
 
class  tbb::interface5::scoped_lock_read
 The scoped lock pattern for read locks. More...
 

Namespaces

 tbb
 The graph class.
 
 tbb::interface5
 

Macros

#define __TBB_reader_writer_lock_H
 
#define __TBB_reader_writer_lock_H_include_area
 

Enumerations

enum  tbb::interface5::status_t { tbb::interface5::waiting_nonblocking, tbb::interface5::waiting, tbb::interface5::active, tbb::interface5::invalid }
 Status type for nodes associated with lock instances. More...
 

Functions

 tbb::interface5::reader_writer_lock ()
 Constructs a new reader_writer_lock. More...
 
 tbb::interface5::~reader_writer_lock ()
 Destructs a reader_writer_lock object. More...
 
void __TBB_EXPORTED_METHOD tbb::interface5::lock ()
 Acquires the reader_writer_lock for write. More...
 
bool __TBB_EXPORTED_METHOD tbb::interface5::try_lock ()
 Tries to acquire the reader_writer_lock for write. More...
 
void __TBB_EXPORTED_METHOD tbb::interface5::lock_read ()
 Acquires the reader_writer_lock for read. More...
 
bool __TBB_EXPORTED_METHOD tbb::interface5::try_lock_read ()
 Tries to acquire the reader_writer_lock for read. More...
 
void __TBB_EXPORTED_METHOD tbb::interface5::unlock ()
 Releases the reader_writer_lock. More...
 
void __TBB_EXPORTED_METHOD tbb::interface5::internal_construct ()
 
void __TBB_EXPORTED_METHOD tbb::interface5::internal_destroy ()
 
bool tbb::interface5::start_write (scoped_lock *)
 Attempts to acquire write lock. More...
 
void tbb::interface5::set_next_writer (scoped_lock *w)
 Sets writer_head to w and attempts to unblock. More...
 
void tbb::interface5::end_write (scoped_lock *)
 Relinquishes write lock to next waiting writer or group of readers. More...
 
bool tbb::interface5::is_current_writer ()
 Checks if current thread holds write lock. More...
 
void tbb::interface5::start_read (scoped_lock_read *)
 Attempts to acquire read lock. More...
 
void tbb::interface5::unblock_readers ()
 Unblocks pending readers. More...
 
void tbb::interface5::end_read ()
 Relinquishes read lock by decrementing counter; last reader wakes pending writer. More...
 

Variables

class friend class("tbb::reader_writer_lock
is deprecated, use
std::shared_mutex")
reader_writer_lock 
tbb::interface5::scoped_lock_read
 Writer-preference reader-writer lock with local-only spinning on readers. More...
 
atomic< scoped_lock_read * > tbb::interface5::reader_head
 The list of pending readers. More...
 
atomic< scoped_lock * > tbb::interface5::writer_head
 The list of pending writers. More...
 
atomic< scoped_lock * > tbb::interface5::writer_tail
 The last node in the list of pending writers. More...
 
tbb_thread::id tbb::interface5::my_current_writer
 Writer that owns the mutex; tbb_thread::id() otherwise. More...
 
atomic< uintptr_t > tbb::interface5::rdr_count_and_flags
 Status of mutex. More...
 

Macro Definition Documentation

#define __TBB_reader_writer_lock_H

Definition at line 29 of file reader_writer_lock.h.

#define __TBB_reader_writer_lock_H_include_area

Definition at line 31 of file reader_writer_lock.h.


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.