proxygen
PosixRWLock Struct Reference

Public Member Functions

 PosixRWLock ()
 
 ~PosixRWLock ()
 
void lock ()
 
void unlock ()
 
void lock_shared ()
 
void unlock_shared ()
 

Public Attributes

pthread_rwlock_t lock_
 

Detailed Description

Definition at line 472 of file SharedMutexTest.cpp.

Constructor & Destructor Documentation

PosixRWLock::PosixRWLock ( )
inline

Definition at line 475 of file SharedMutexTest.cpp.

475  {
476  pthread_rwlock_init(&lock_, nullptr);
477  }
pthread_rwlock_t lock_
PosixRWLock::~PosixRWLock ( )
inline

Definition at line 479 of file SharedMutexTest.cpp.

479  {
480  pthread_rwlock_destroy(&lock_);
481  }
pthread_rwlock_t lock_

Member Function Documentation

void PosixRWLock::lock ( )
inline

Definition at line 483 of file SharedMutexTest.cpp.

483  {
484  pthread_rwlock_wrlock(&lock_);
485  }
pthread_rwlock_t lock_
void PosixRWLock::lock_shared ( )
inline

Definition at line 491 of file SharedMutexTest.cpp.

491  {
492  pthread_rwlock_rdlock(&lock_);
493  }
pthread_rwlock_t lock_
void PosixRWLock::unlock ( )
inline

Definition at line 487 of file SharedMutexTest.cpp.

487  {
488  pthread_rwlock_unlock(&lock_);
489  }
pthread_rwlock_t lock_
void PosixRWLock::unlock_shared ( )
inline

Definition at line 495 of file SharedMutexTest.cpp.

495  {
496  pthread_rwlock_unlock(&lock_);
497  }
pthread_rwlock_t lock_

Member Data Documentation

pthread_rwlock_t PosixRWLock::lock_

Definition at line 473 of file SharedMutexTest.cpp.


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