Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tbb::interface5::scoped_lock_read Class Reference

The scoped lock pattern for read locks. More...

#include <reader_writer_lock.h>

Inheritance diagram for tbb::interface5::scoped_lock_read:
Collaboration diagram for tbb::interface5::scoped_lock_read:

Public Member Functions

 scoped_lock_read (reader_writer_lock &lock)
 Construct with blocking attempt to acquire read lock on the passed-in lock. More...
 
 ~scoped_lock_read ()
 Destructor, releases the read lock. More...
 
voidoperator new (size_t s)
 
void operator delete (void *p)
 

Private Member Functions

 scoped_lock_read ()
 Construct scoped_lock_read that is not holding lock. More...
 
void __TBB_EXPORTED_METHOD internal_construct (reader_writer_lock &)
 
void __TBB_EXPORTED_METHOD internal_destroy ()
 
- Private Member Functions inherited from tbb::internal::no_copy
 no_copy (const no_copy &)=delete
 
 no_copy ()=default
 

Private Attributes

reader_writer_lockmutex
 The pointer to the mutex to lock. More...
 
scoped_lock_readnext
 The next queued competitor for the mutex. More...
 
atomic< status_tstatus
 Status flag of the thread associated with this node. More...
 

Friends

class reader_writer_lock
 

Detailed Description

The scoped lock pattern for read locks.

Definition at line 137 of file reader_writer_lock.h.

Constructor & Destructor Documentation

tbb::interface5::scoped_lock_read::scoped_lock_read ( reader_writer_lock lock)
inline

Construct with blocking attempt to acquire read lock on the passed-in lock.

Definition at line 142 of file reader_writer_lock.h.

References tbb::interface5::internal_construct().

142  {
144  }
void __TBB_EXPORTED_METHOD internal_construct(reader_writer_lock &)
void __TBB_EXPORTED_METHOD lock()
Acquires the reader_writer_lock for write.
Definition: mutex.h:157

Here is the call graph for this function:

tbb::interface5::scoped_lock_read::~scoped_lock_read ( )
inline

Destructor, releases the read lock.

Definition at line 147 of file reader_writer_lock.h.

References tbb::interface5::internal_destroy().

147  {
149  }
void __TBB_EXPORTED_METHOD internal_destroy()

Here is the call graph for this function:

tbb::interface5::scoped_lock_read::scoped_lock_read ( )
private

Construct scoped_lock_read that is not holding lock.

Member Function Documentation

void __TBB_EXPORTED_METHOD tbb::interface5::scoped_lock_read::internal_construct ( reader_writer_lock )
private
void __TBB_EXPORTED_METHOD tbb::interface5::scoped_lock_read::internal_destroy ( )
private
void tbb::interface5::scoped_lock_read::operator delete ( void p)
inline

Definition at line 154 of file reader_writer_lock.h.

References tbb::internal::deallocate_via_handler_v3(), and p.

154  {
156  }
void const char const char int ITT_FORMAT __itt_group_sync p
void __TBB_EXPORTED_FUNC deallocate_via_handler_v3(void *p)
Deallocates memory using FreeHandler.

Here is the call graph for this function:

void* tbb::interface5::scoped_lock_read::operator new ( size_t  s)
inline

Definition at line 151 of file reader_writer_lock.h.

References tbb::internal::allocate_via_handler_v3(), and s.

151  {
153  }
void const char const char int ITT_FORMAT __itt_group_sync s
void *__TBB_EXPORTED_FUNC allocate_via_handler_v3(size_t n)
Allocates memory using MallocHandler.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class reader_writer_lock
friend

Definition at line 139 of file reader_writer_lock.h.

Member Data Documentation

reader_writer_lock* tbb::interface5::scoped_lock_read::mutex
private

The pointer to the mutex to lock.

Definition at line 160 of file reader_writer_lock.h.

scoped_lock_read* tbb::interface5::scoped_lock_read::next
private

The next queued competitor for the mutex.

Definition at line 162 of file reader_writer_lock.h.

Referenced by tbb::interface5::start_read().

atomic<status_t> tbb::interface5::scoped_lock_read::status
private

Status flag of the thread associated with this node.

Definition at line 164 of file reader_writer_lock.h.

Referenced by tbb::interface5::start_read(), and tbb::interface5::unblock_readers().


The documentation for this class was generated from the following file:

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.