| 
    HDK
    
   | 
 
#include <bigRWMutex.h>
Public Member Functions | |
| ScopedLock (TfBigRWMutex &m, bool write=true) | |
| ScopedLock () | |
Construct a scoped lock not associated with a mutex.  More... | |
| ~ScopedLock () | |
| void | Acquire (TfBigRWMutex &m, bool write=true) | 
| void | Acquire (bool write=true) | 
| void | Release () | 
| void | AcquireRead () | 
| void | AcquireWrite () | 
| bool | UpgradeToWriter () | 
Static Public Attributes | |
| static constexpr int | NotAcquired = -1 | 
| static constexpr int | WriteAcquired = -2 | 
Scoped lock utility class. API modeled after tbb::spin_rw_mutex::scoped_lock.
Definition at line 69 of file bigRWMutex.h.
      
  | 
  inlineexplicit | 
Construct a scoped lock for mutex m and acquire either a read or a write lock depending on write. 
Definition at line 79 of file bigRWMutex.h.
      
  | 
  inline | 
Construct a scoped lock not associated with a mutex. 
Definition at line 86 of file bigRWMutex.h.
      
  | 
  inline | 
If this scoped lock is acquired for either read or write, Release() it.
Definition at line 90 of file bigRWMutex.h.
      
  | 
  inline | 
If the current scoped lock is acquired, Release() it, then associate this lock with m and acquire either a read or a write lock, depending on write. 
Definition at line 97 of file bigRWMutex.h.
      
  | 
  inline | 
Acquire either a read or write lock on this lock's associated mutex depending on write. This lock must be associated with a mutex (typically by construction or by a call to Acquire() that takes a mutex). This lock must not already be acquired when calling Acquire(). 
Definition at line 108 of file bigRWMutex.h.
      
  | 
  inline | 
Acquire a read lock on this lock's associated mutex. This lock must not already be acquired when calling AcquireRead(). 
Definition at line 134 of file bigRWMutex.h.
      
  | 
  inline | 
Acquire a write lock on this lock's associated mutex. This lock must not already be acquired when calling AcquireWrite(). 
Definition at line 141 of file bigRWMutex.h.
      
  | 
  inline | 
Release the currently required lock on the associated mutex. If this lock is not currently acquired, silently do nothing.
Definition at line 119 of file bigRWMutex.h.
      
  | 
  inline | 
Change this lock's acquisition state from a read lock to a write lock. This lock must already be acquired for reading. For consistency with tbb, this function returns a bool indicating whether the upgrade was done atomically, without releasing the read-lock. However the current implementation always releases the read lock so this function always returns false.
Definition at line 153 of file bigRWMutex.h.
      
  | 
  static | 
Definition at line 74 of file bigRWMutex.h.
      
  | 
  static | 
Definition at line 75 of file bigRWMutex.h.