Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

clRWLock Class Reference

Class implementation of SUSv2 read-write locks. More...

#include <RWLock.hh>

List of all members.

Public Member Functions

 clRWLock ()
 Constructor; creates and initializes the read-write lock.

 ~clRWLock ()
 Desctructor; destroys the read-write lock.

bool WaitRead ()
 Obtain read-lock.

bool WaitWrite ()
 Obtain exclusive write-lock.

bool Release ()
 Release lock.

bool TryRead ()
 Try to obtain read-lock (non-blocking).

bool TryWrite ()
 Try to obtain exclusive write-lock (non-blocking).


Private Attributes

pthread_rwlock_t ptrwlLock


Detailed Description

Class implementation of SUSv2 read-write locks.

Definition at line 47 of file RWLock.hh.


Constructor & Destructor Documentation

clRWLock::clRWLock  )  [inline]
 

Constructor; creates and initializes the read-write lock.

Definition at line 54 of file RWLock.hh.

References ptrwlLock.

clRWLock::~clRWLock  )  [inline]
 

Desctructor; destroys the read-write lock.

Definition at line 59 of file RWLock.hh.

References ptrwlLock.


Member Function Documentation

bool clRWLock::WaitRead  )  [inline]
 

Obtain read-lock.

There can be multiple read-locks at the same time.

Returns:
Success

Definition at line 67 of file RWLock.hh.

References ptrwlLock.

bool clRWLock::WaitWrite  )  [inline]
 

Obtain exclusive write-lock.

There can be only one write-lock and no read-locks at the same time.

Returns:
Success

Definition at line 80 of file RWLock.hh.

References ptrwlLock.

bool clRWLock::Release  )  [inline]
 

Release lock.

Returns:
Success

Definition at line 91 of file RWLock.hh.

References ptrwlLock.

bool clRWLock::TryRead  )  [inline]
 

Try to obtain read-lock (non-blocking).

Returns:
Success

Definition at line 102 of file RWLock.hh.

References ptrwlLock.

bool clRWLock::TryWrite  )  [inline]
 

Try to obtain exclusive write-lock (non-blocking).

Returns:
Success

Definition at line 113 of file RWLock.hh.

References ptrwlLock.


Member Data Documentation

pthread_rwlock_t clRWLock::ptrwlLock [private]
 

Definition at line 49 of file RWLock.hh.

Referenced by clRWLock(), Release(), TryRead(), TryWrite(), WaitRead(), WaitWrite(), and ~clRWLock().


The documentation for this class was generated from the following file:
Generated on Tue Mar 2 19:47:14 2004 for libDSP by doxygen 1.3.6